diff --git a/src/SolidGui.Tests/Engine/SolidReport_Test.cs b/src/SolidGui.Tests/Engine/SolidReport_Test.cs index 43370e87..de99d4df 100644 --- a/src/SolidGui.Tests/Engine/SolidReport_Test.cs +++ b/src/SolidGui.Tests/Engine/SolidReport_Test.cs @@ -9,7 +9,7 @@ namespace SolidGui.Tests.Engine public class SolidReportTest { - [TestFixtureSetUp] + [SetUp] public void Init() { } @@ -48,7 +48,7 @@ public void SolidReport_AddEntry_Correct() */ [Test] - [Ignore] // TODO !!! Streaming isn't working yet. But currently we don't need to save it anyway. + [Ignore("TODO !!! Streaming isn't working yet. But currently we don't need to save it anyway.")] public void SolidReport_SaveOpen_Correct() { var save = new SolidReport(); diff --git a/src/SolidGui.Tests/Engine/sfmreader_read_test.cs b/src/SolidGui.Tests/Engine/sfmreader_read_test.cs index f9082c33..f4471766 100644 --- a/src/SolidGui.Tests/Engine/sfmreader_read_test.cs +++ b/src/SolidGui.Tests/Engine/sfmreader_read_test.cs @@ -11,7 +11,7 @@ namespace SolidGui.Tests.Engine public class SfmReader_Read_Test { - [TestFixtureSetUp] + [SetUp] public void Init() { } diff --git a/src/SolidGui.Tests/Export/ExportFactory_Test.cs b/src/SolidGui.Tests/Export/ExportFactory_Test.cs index 4b65c447..dfbceb82 100644 --- a/src/SolidGui.Tests/Export/ExportFactory_Test.cs +++ b/src/SolidGui.Tests/Export/ExportFactory_Test.cs @@ -11,7 +11,7 @@ public class ExportFactory_Test { ExportFactory _f; - [TestFixtureSetUp] + [SetUp] public void Init() { _f = ExportFactory.Singleton(); diff --git a/src/SolidGui.Tests/Export/ExportFileTestConstraint.cs b/src/SolidGui.Tests/Export/ExportFileTestConstraint.cs deleted file mode 100644 index 6ed73a8b..00000000 --- a/src/SolidGui.Tests/Export/ExportFileTestConstraint.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using NUnit.Framework.Constraints; - -namespace SolidGui.Tests.Export -{ - - public class ExportFileTestConstraint : NUnit.Framework.Constraints.Constraint - { - private string _templateFilePath; - private string _message; - private string _templateLine; - private string _outputLine; - - public ExportFileTestConstraint(string filePath) - { - _templateFilePath = filePath; - } - - public override bool Matches(object value) - { - string outputFilePath = value as string; - TextReader outputFile = new StreamReader(outputFilePath); - //Console.WriteLine("Testing {0:s}", _templateFilePath); - bool retval = true; - - try - { - TextReader templateFile = new StreamReader(_templateFilePath); - - int lineCount = 0; - while ((_outputLine = outputFile.ReadLine()) != null) - { - lineCount++; - _templateLine = templateFile.ReadLine(); - if (_templateLine == null) - { - _message = string.Format("null fail"); - retval = false; - break; - } - - if (_templateLine.Contains("*")) - { - string patternString = _templateLine.Replace("*", ".*"); - var pattern = new Regex(patternString); - Match match = pattern.Match(_outputLine); - if (!match.Success) - { - retval = false; - break; - } - } - else if (_templateLine != _outputLine) - { - _message = string.Format( - "\n{0:s}\n\tFile compare fail in _line {3:d}:\n\texp: {1:s}\n\tgot: {2:s}", - _templateFilePath, _templateLine, _outputLine, lineCount - ); - retval = false; - break; - } - } - templateFile.Close(); - } - catch (IOException e) - { - _message = string.Format("\n{0:s}\n\t{1:s}", _templateFilePath, e.Message); - retval = false; - } - outputFile.Close(); - return retval; - } - - public override void WriteDescriptionTo(MessageWriter writer) - { - writer.DisplayStringDifferences(_templateLine, _outputLine, 0, false, true); - } - } -} diff --git a/src/SolidGui.Tests/Export/ExportLiftTests.cs b/src/SolidGui.Tests/Export/ExportLiftTests.cs index 77a0adf7..5d276e75 100644 --- a/src/SolidGui.Tests/Export/ExportLiftTests.cs +++ b/src/SolidGui.Tests/Export/ExportLiftTests.cs @@ -10,13 +10,13 @@ namespace SolidGui.Tests.Export [TestFixture] public class ExportLiftTests { - [TestFixtureSetUp] + [SetUp] public void TestFixtureSetUp() { Sldr.Initialize(); } - [TestFixtureTearDown] + [TearDown] public void TestFixtureTearDown() { Sldr.Cleanup(); diff --git a/src/SolidGui.Tests/Export/ExportLift_RelationsTests.cs b/src/SolidGui.Tests/Export/ExportLift_RelationsTests.cs index 03841b24..ca6ff8bf 100644 --- a/src/SolidGui.Tests/Export/ExportLift_RelationsTests.cs +++ b/src/SolidGui.Tests/Export/ExportLift_RelationsTests.cs @@ -8,13 +8,13 @@ namespace SolidGui.Tests.Export [TestFixture] public class ExportLift_RelationTests { - [TestFixtureSetUp] + [SetUp] public void TestFixtureSetUp() { Sldr.Initialize(); } - [TestFixtureTearDown] + [TearDown] public void TestFixtureTearDown() { Sldr.Cleanup(); diff --git a/src/SolidGui.Tests/MappingPMTests.cs b/src/SolidGui.Tests/MappingPMTests.cs deleted file mode 100644 index cd44e4d1..00000000 --- a/src/SolidGui.Tests/MappingPMTests.cs +++ /dev/null @@ -1,64 +0,0 @@ -using NUnit.Framework; - -namespace SolidGui.Tests -{ - [TestFixture] - public class MappingPMTests - { - private MappingPM _model; - - [SetUp] - public void Setup() - { - _model = new MappingPM(); - } - - [TearDown] - public void TearDown() - { - - } - - [Test] - public void FindsAtLeastTwoMappingSystem() - { - _model.TargetSystem = _model.TargetChoices[0]; - Assert.Greater(_model.TargetChoices.Count,1); - } - - [Test] - public void GivesListOfConceptsForFLEx() - { - _model.TargetSystem = _model.TargetChoices[0]; - Assert.Greater(_model.TargetSystem.Concepts.Count, 20); - } - - [Test] - public void ChangingTargetChangesConceptList() - { - _model.TargetSystem = _model.TargetChoices[0]; - int conceptsInFirstSystem = _model.TargetChoices.Count; - _model.TargetSystem = _model.TargetChoices[1]; - Assert.AreNotEqual(conceptsInFirstSystem, _model.TargetSystem.Concepts.Count); - } - - [Test] - public void SomeConceptIsChosenWhenTargetSelected() - { - _model.TargetSystem = _model.TargetChoices[0]; - Assert.IsNotNull(_model.SelectedConcept); - _model.TargetSystem = _model.TargetChoices[1]; - Assert.IsNotNull(_model.SelectedConcept); - } - - [Test] - public void GivesHtmlForConcepts() - { - _model.TargetSystem = _model.TargetChoices[0]; - _model.SelectedConcept = _model.TargetSystem.Concepts[0]; - string html = _model.TransformInformationToHtml(_model.SelectedConcept.InformationAsXml); - Assert.IsFalse(string.IsNullOrEmpty(html)) ; - } - } - -} \ No newline at end of file diff --git a/src/SolidGui.Tests/MarkerRulesPMTest.cs b/src/SolidGui.Tests/MarkerRulesPMTest.cs index cb49cc02..2f4e4427 100644 --- a/src/SolidGui.Tests/MarkerRulesPMTest.cs +++ b/src/SolidGui.Tests/MarkerRulesPMTest.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.IO; using System.Xml; -using SolidConsole; +using SolidGui.Engine; using NUnit.Framework; +using SIL.TestUtilities; namespace SolidGui.Tests { diff --git a/src/SolidGui.Tests/SolidGui.Tests.csproj b/src/SolidGui.Tests/SolidGui.Tests.csproj index 4fd6a7c1..30b82716 100644 --- a/src/SolidGui.Tests/SolidGui.Tests.csproj +++ b/src/SolidGui.Tests/SolidGui.Tests.csproj @@ -1,208 +1,21 @@ - - + + - Debug - AnyCPU - 9.0.21022 - 2.0 - {3DC3F32B-28DF-469D-B69C-46181292D2BE} - Library - Properties - SolidGui.Tests - SolidGui.Tests - - - - - 3.5 - - - false - v4.6.1 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - + net461 + true + false + false + ..\..\output - - true - full - false - ..\..\output\debug\ - DEBUG;TRACE - prompt - 4 - x86 - AllRules.ruleset - false - - - pdbonly - true - ..\..\output\release\ - TRACE - prompt - 4 - AllRules.ruleset - false - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - AllRules.ruleset - false - - - ..\..\output\release\ - TRACE - true - pdbonly - x64 - prompt - AllRules.ruleset - false - - - true - ..\..\output\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - AllRules.ruleset - false - - - ..\..\output\release\ - TRACE - true - pdbonly - x86 - prompt - AllRules.ruleset - false - - - - False - ..\..\lib\L10NSharp.dll - - - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - - - ..\..\lib\SIL.Core.dll - - - ..\..\lib\SIL.DictionaryServices.dll - - - ..\..\lib\SIL.Lift.dll - - - ..\..\lib\SIL.TestUtilities.dll - - - False - ..\..\lib\SIL.WritingSystems.dll - - - - 4.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {30985726-18E5-44E3-9CAD-FE27E0323FA1} - SolidGui - - + - - False - .NET Framework 4.0 Client Profile - false - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - + + + + - + - - + \ No newline at end of file diff --git a/src/SolidGui/DummyProcessor.cs b/src/SolidGui/DummyProcessor.cs index 370afd7d..d86edc0a 100644 --- a/src/SolidGui/DummyProcessor.cs +++ b/src/SolidGui/DummyProcessor.cs @@ -6,7 +6,9 @@ using System.IO; using System.Text; using System.Xml.Serialization; -using SolidEngine; +using SolidGui.Engine; +using SolidGui.Filter; +using SolidGui.Model; namespace SolidGui { diff --git a/src/SolidGui/Export/ExportLift.cs b/src/SolidGui/Export/ExportLift.cs index 50deaa5c..c25a5de4 100644 --- a/src/SolidGui/Export/ExportLift.cs +++ b/src/SolidGui/Export/ExportLift.cs @@ -60,9 +60,14 @@ public void Export(IEnumerable sfmLexEntries, SolidSettings solidSetting } outerProgress.WriteMessage(""); outerProgress.WriteMessage("Checking result to make sure it is valid LIFT XML..."); - string result = Validator.GetAnyValidationErrors(outputFilePath, new NullValidationProgress(), ValidationOptions.All); - if(!string.IsNullOrEmpty(result)) - outerProgress.WriteError(result); + try + { + Validator.CheckLiftWithPossibleThrow(outputFilePath); + } + catch (Exception e) + { + outerProgress.WriteError(e.Message); + } WriteWritingSystemFolder(outputFilePath, solidSettings.MarkerSettings, outerProgress); outerProgress.WriteMessage("Done"); } diff --git a/src/SolidGui/Export/ExportSummary.cs b/src/SolidGui/Export/ExportSummary.cs index c4e54c35..101e9e54 100644 --- a/src/SolidGui/Export/ExportSummary.cs +++ b/src/SolidGui/Export/ExportSummary.cs @@ -6,7 +6,6 @@ using System.ComponentModel; using System.IO; using SIL.Progress; -using SIL.Windows.Forms.Progress; using SolidGui.Engine; using SolidGui.Model; diff --git a/src/SolidGui/MainWindowView.cs b/src/SolidGui/MainWindowView.cs index f01b201b..e9a5d2f6 100644 --- a/src/SolidGui/MainWindowView.cs +++ b/src/SolidGui/MainWindowView.cs @@ -531,7 +531,7 @@ private void OnWordFound(object sender, FindReplaceDialog.SearchResultEventArgs private void OnAboutBoxButton_Click(object sender, EventArgs e) { - using (SILAboutBox box = new SILAboutBox(FileLocator.GetFileDistributedWithApplication("aboutBox.htm"))) + using (SILAboutBox box = new SILAboutBox(FileLocationUtilities.GetFileDistributedWithApplication("aboutBox.htm"))) { box.ShowDialog(); } diff --git a/src/SolidGui/MarkerRulesPM.cs b/src/SolidGui/MarkerRulesPM.cs index b0f18b56..4ec41b8d 100644 --- a/src/SolidGui/MarkerRulesPM.cs +++ b/src/SolidGui/MarkerRulesPM.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Xml.Serialization; -using SolidConsole; +using SolidGui.Engine; namespace SolidGui { @@ -36,7 +36,7 @@ public void AddProperty(string parent, MultiplicityAdjacency ma) SolidStructureProperty structureProperty = GetProperty(parent); structureProperty.Parent = parent; - structureProperty.MultipleAdjacent = ma; + structureProperty.Multiplicity = ma; } } } @@ -50,7 +50,7 @@ private SolidMarkerSetting GetMarkerProperties(string marker) return mp; } } - SolidMarkerSetting newProperty = new SolidMarkerSetting(marker); + SolidMarkerSetting newProperty = new(marker, false); _markerProperties.Add(newProperty); return newProperty; } diff --git a/src/SolidGui/MarkerRulesView.Designer.cs b/src/SolidGui/MarkerRulesView.Designer.cs deleted file mode 100644 index b6b4866c..00000000 --- a/src/SolidGui/MarkerRulesView.Designer.cs +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) 2007-2014 SIL International -// Licensed under the MIT license: opensource.org/licenses/MIT - -namespace SolidGui -{ - partial class MarkerRulesView - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this._saveButton = new System.Windows.Forms.Button(); - this._markerComboBox = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this._ruleNameTextBox = new System.Windows.Forms.TextBox(); - this._yesRadioButton = new System.Windows.Forms.RadioButton(); - this._noRadioButton = new System.Windows.Forms.RadioButton(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this._ruleNameComboBox = new System.Windows.Forms.ComboBox(); - this.label3 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.SuspendLayout(); - // - // _saveButton - // - this._saveButton.Location = new System.Drawing.Point(120, 217); - this._saveButton.Name = "_saveButton"; - this._saveButton.Size = new System.Drawing.Size(77, 29); - this._saveButton.TabIndex = 0; - this._saveButton.Text = "&Save"; - this._saveButton.UseVisualStyleBackColor = true; - this._saveButton.Click += new System.EventHandler(this._saveButton_Click); - // - // _markerComboBox - // - this._markerComboBox.FormattingEnabled = true; - this._markerComboBox.Location = new System.Drawing.Point(76, 50); - this._markerComboBox.Name = "_markerComboBox"; - this._markerComboBox.Size = new System.Drawing.Size(116, 21); - this._markerComboBox.TabIndex = 1; - this._markerComboBox.SelectedIndexChanged += new System.EventHandler(this._markerComboBox_SelectedIndexChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(21, 53); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(40, 13); - this.label1.TabIndex = 2; - this.label1.Text = "Marker"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(1, 28); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(60, 13); - this.label2.TabIndex = 4; - this.label2.Text = "Rule Name"; - // - // _ruleNameTextBox - // - this._ruleNameTextBox.Location = new System.Drawing.Point(76, 24); - this._ruleNameTextBox.Name = "_ruleNameTextBox"; - this._ruleNameTextBox.Size = new System.Drawing.Size(116, 20); - this._ruleNameTextBox.TabIndex = 5; - // - // _yesRadioButton - // - this._yesRadioButton.AutoSize = true; - this._yesRadioButton.Location = new System.Drawing.Point(27, 20); - this._yesRadioButton.Name = "_yesRadioButton"; - this._yesRadioButton.Size = new System.Drawing.Size(43, 17); - this._yesRadioButton.TabIndex = 0; - this._yesRadioButton.TabStop = true; - this._yesRadioButton.Text = "Yes"; - this._yesRadioButton.UseVisualStyleBackColor = true; - // - // _noRadioButton - // - this._noRadioButton.AutoSize = true; - this._noRadioButton.Checked = true; - this._noRadioButton.Location = new System.Drawing.Point(105, 20); - this._noRadioButton.Name = "_noRadioButton"; - this._noRadioButton.Size = new System.Drawing.Size(39, 17); - this._noRadioButton.TabIndex = 1; - this._noRadioButton.TabStop = true; - this._noRadioButton.Text = "No"; - this._noRadioButton.UseVisualStyleBackColor = true; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this._noRadioButton); - this.groupBox1.Controls.Add(this._yesRadioButton); - this.groupBox1.Location = new System.Drawing.Point(12, 77); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(180, 47); - this.groupBox1.TabIndex = 3; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Marker Required"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this._ruleNameTextBox); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.groupBox1); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Controls.Add(this._markerComboBox); - this.groupBox2.Location = new System.Drawing.Point(5, 47); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(207, 153); - this.groupBox2.TabIndex = 6; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Edit Rule"; - // - // _ruleNameComboBox - // - this._ruleNameComboBox.FormattingEnabled = true; - this._ruleNameComboBox.Location = new System.Drawing.Point(82, 8); - this._ruleNameComboBox.Name = "_ruleNameComboBox"; - this._ruleNameComboBox.Size = new System.Drawing.Size(130, 21); - this._ruleNameComboBox.TabIndex = 7; - this._ruleNameComboBox.SelectedIndexChanged += new System.EventHandler(this._ruleNameComboBox_SelectedIndexChanged); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(37, 11); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(29, 13); - this.label3.TabIndex = 8; - this.label3.Text = "Rule"; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(29, 217); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(77, 29); - this.button1.TabIndex = 9; - this.button1.Text = "&Remove"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // MarkerRulesView - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.button1); - this.Controls.Add(this.label3); - this.Controls.Add(this._ruleNameComboBox); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this._saveButton); - this.Name = "MarkerRulesView"; - this.Size = new System.Drawing.Size(224, 264); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button _saveButton; - private System.Windows.Forms.ComboBox _markerComboBox; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox _ruleNameTextBox; - private System.Windows.Forms.RadioButton _yesRadioButton; - private System.Windows.Forms.RadioButton _noRadioButton; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.ComboBox _ruleNameComboBox; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button button1; - } -} diff --git a/src/SolidGui/MarkerRulesView.cs b/src/SolidGui/MarkerRulesView.cs deleted file mode 100644 index 72be2b68..00000000 --- a/src/SolidGui/MarkerRulesView.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2007-2014 SIL International -// Licensed under the MIT license: opensource.org/licenses/MIT - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; -using System.Windows.Forms; - -namespace SolidGui -{ - public partial class MarkerRulesView : UserControl - { - private MarkerRulesPM _markerRulesModel; - - public MarkerRulesView() - { - InitializeComponent(); - } - - public MarkerRulesPM MarkerRulesModel - { - get - { - return _markerRulesModel; - } - set - { - _markerRulesModel = value; - } - } - - public void UpdateRuleNameComboBox(string newRuleName) - { - _ruleNameComboBox.Items.Clear(); - _ruleNameComboBox.Items.Add("(New Rule)"); - - foreach (string ruleName in _markerRulesModel.GetAllRuleNames()) - { - _ruleNameComboBox.Items.Add(ruleName); - } - - _ruleNameComboBox.Text = newRuleName; - } - - public void UpdateEditRuleDisplay() - { - - _markerComboBox.Items.Clear(); - foreach( String marker in _markerRulesModel.AllMarkers) - { - _markerComboBox.Items.Add(marker); - } - - Rule currentRule = _markerRulesModel.GetRule(_ruleNameComboBox.Text); - - _noRadioButton.Checked = !currentRule.Required; - _yesRadioButton.Checked = currentRule.Required; - _ruleNameTextBox.Text = currentRule.Name; - _markerComboBox.SelectedIndex = _markerComboBox.Items.IndexOf(currentRule.Marker); - - } - - private void _markerComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - //UpdateDisplay(); - } - - private void _saveButton_Click(object sender, EventArgs e) - { - string name = _ruleNameTextBox.Text; - string marker = _markerComboBox.Text; - bool required = _yesRadioButton.Checked; - - _markerRulesModel.AddRule(name, marker, required); - _markerRulesModel.WriteRulesToXml(); - - UpdateRuleNameComboBox(_ruleNameTextBox.Text); - } - - private void _ruleNameComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - UpdateEditRuleDisplay(); - } - - private void button1_Click(object sender, EventArgs e) - { - _markerRulesModel.RemoveRule(_ruleNameComboBox.Text); - _markerRulesModel.WriteRulesToXml(); - UpdateRuleNameComboBox("(New Rule)"); - } - - } -} diff --git a/src/SolidGui/Program.cs b/src/SolidGui/Program.cs index 50332727..98058d59 100644 --- a/src/SolidGui/Program.cs +++ b/src/SolidGui/Program.cs @@ -10,6 +10,7 @@ using SIL.Windows.Forms.Keyboarding; using SIL.WritingSystems; using SolidGui.Setup; +using SIL.Windows.Forms.Reporting; namespace SolidGui { @@ -92,7 +93,7 @@ static void TryToOpen(string fileName, MainWindowPM model, MainWindowView form) private static void SetupErrorHandling() { - ExceptionHandler.Init(); + ExceptionHandler.Init(new WinFormsExceptionHandler()); Logger.Init(); ErrorReport.Init("solid@projects.palaso.org"); } diff --git a/src/SolidGui/SolidGui.csproj b/src/SolidGui/SolidGui.csproj index 657712e1..b33f18c6 100644 --- a/src/SolidGui/SolidGui.csproj +++ b/src/SolidGui/SolidGui.csproj @@ -1,497 +1,36 @@ - - + + - Debug - AnyCPU - 9.0.21022 - 2.0 - {30985726-18E5-44E3-9CAD-FE27E0323FA1} WinExe - Properties + net461 + enable + true + enable + true + 10 + false + ..\..\output SolidGui Solid - SolidGui.Program Resources\solid.ico - - - 3.5 - - - false - v4.6.1 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - true - full - false - ..\..\output\debug\ - DEBUG;TRACE - prompt - 4 - x86 - AllRules.ruleset - false - - - pdbonly - true - ..\..\output\release\ - TRACE - prompt - 4 - AllRules.ruleset - x86 - false - - - true - ..\..\output\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - AllRules.ruleset - false - - - ..\..\output\release\ - TRACE - true - pdbonly - x86 - prompt - AllRules.ruleset - false - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - AllRules.ruleset - false - - - ..\..\output\release\ - TRACE - true - pdbonly - x64 - prompt - AllRules.ruleset - false - - - - False - ..\..\lib\Commons.Xml.Relaxng.dll - - - ..\..\lib\GlacialList.dll - - - False - ..\..\lib\KeymanLink.dll - - - ..\..\lib\L10NSharp.dll - - - ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\..\lib\SIL.Core.dll - - - ..\..\lib\SIL.DictionaryServices.dll - - - ..\..\lib\SIL.Lift.dll - - - ..\..\lib\SIL.Windows.Forms.dll - - - ..\..\lib\SIL.Windows.Forms.Keyboarding.dll - - - ..\..\lib\SIL.Windows.Forms.WritingSystems.dll - - - ..\..\lib\SIL.WritingSystems.dll - - - - False - 4.0 - - - - - - - - - - - - Form - - - DataShapesDialog.cs - - - - - - - - - Form - - - ExportLogDialog.cs - - - - - - Form - - - SaveOptionsDialog.cs - - - - - - - - - Form - - - DataValuesDialog.cs - - - - - Form - - - MarkerSettingsDialog.cs - - - - - - - - - - - - - - - - - - - - - - UserControl - - - FilterChooserView.cs - - - Form - - - MainWindowView.cs - - - - UserControl - - - MappingView.cs - - - UserControl - - - MarkerSettingsListView.cs - - - True - True - Resources.resx - - - - - - Form - - - QuickFixForm.cs - - - Form - - - FindReplaceDialog.cs - - - - - - Form - - - EncodingChooser.cs - - - Form - - - WritingSystemsConfigDialog.cs - - - - UserControl - - - WritingSystemsConfigView.cs - - - UserControl - - - StructurePropertiesView.cs - - - - - DataShapesDialog.cs - - - ExportLogDialog.cs - Designer - - - SaveOptionsDialog.cs - - - Designer - FilterChooserView.cs - - - DataValuesDialog.cs - - - Designer - MainWindowView.cs - - - MappingView.cs - Designer - - - MarkerSettingsDialog.cs - - - Designer - MarkerSettingsListView.cs - - - QuickFixForm.cs - Designer - - - FindReplaceDialog.cs - - - EncodingChooser.cs - - - Designer - StructurePropertiesView.cs - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - Designer - RecordNavigatorView.cs - - - Designer - SfmEditorView.cs - - - Designer - TemplateChooser.cs - - - Designer - ValidateView.cs - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - UserControl - - - RecordNavigatorView.cs - - - - - - UserControl - - - SfmEditorView.cs - - - Form - - - TemplateChooser.cs - - - UserControl - - - ValidateView.cs - - - - - - - - + - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - WritingSystemsConfigDialog.cs - Designer - - - WritingSystemsConfigView.cs - Designer - - - + + - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - icudt54.dll - PreserveNewest - - - icuin54.dll - PreserveNewest - - - icuuc54.dll - PreserveNewest - - - - - - rem copy "c:\palaso\output\debug\*.dll" "$(ProjectPath)\..\..\..\lib\" - + \ No newline at end of file