diff --git a/CheckedListBoxLibrary/testComponent.Designer.cs b/CheckedListBoxLibrary/Components/testComponent.Designer.cs similarity index 100% rename from CheckedListBoxLibrary/testComponent.Designer.cs rename to CheckedListBoxLibrary/Components/testComponent.Designer.cs diff --git a/CheckedListBoxLibrary/Components/testComponent.cs b/CheckedListBoxLibrary/Components/testComponent.cs new file mode 100644 index 0000000..caa8b4e --- /dev/null +++ b/CheckedListBoxLibrary/Components/testComponent.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyUserControls.Components +{ + public partial class testComponent : Component + { + public testComponent() + { + InitializeComponent(); + } + + public testComponent(IContainer container) + { + container.Add(this); + + InitializeComponent(); + } + } +} diff --git a/CheckedListBoxLibrary/HierarchicalTreeView.Designer.cs b/CheckedListBoxLibrary/VisualComponents/HierarchicalTreeView.Designer.cs similarity index 100% rename from CheckedListBoxLibrary/HierarchicalTreeView.Designer.cs rename to CheckedListBoxLibrary/VisualComponents/HierarchicalTreeView.Designer.cs diff --git a/CheckedListBoxLibrary/HierarchicalTreeView.cs b/CheckedListBoxLibrary/VisualComponents/HierarchicalTreeView.cs similarity index 100% rename from CheckedListBoxLibrary/HierarchicalTreeView.cs rename to CheckedListBoxLibrary/VisualComponents/HierarchicalTreeView.cs diff --git a/CheckedListBoxLibrary/HierarchicalTreeView.resx b/CheckedListBoxLibrary/VisualComponents/HierarchicalTreeView.resx similarity index 100% rename from CheckedListBoxLibrary/HierarchicalTreeView.resx rename to CheckedListBoxLibrary/VisualComponents/HierarchicalTreeView.resx diff --git a/CheckedListBoxLibrary/SmartCheckedListBox.Designer.cs b/CheckedListBoxLibrary/VisualComponents/SmartCheckedListBox.Designer.cs similarity index 100% rename from CheckedListBoxLibrary/SmartCheckedListBox.Designer.cs rename to CheckedListBoxLibrary/VisualComponents/SmartCheckedListBox.Designer.cs diff --git a/CheckedListBoxLibrary/SmartCheckedListBox.cs b/CheckedListBoxLibrary/VisualComponents/SmartCheckedListBox.cs similarity index 100% rename from CheckedListBoxLibrary/SmartCheckedListBox.cs rename to CheckedListBoxLibrary/VisualComponents/SmartCheckedListBox.cs diff --git a/CheckedListBoxLibrary/SmartCheckedListBox.resx b/CheckedListBoxLibrary/VisualComponents/SmartCheckedListBox.resx similarity index 100% rename from CheckedListBoxLibrary/SmartCheckedListBox.resx rename to CheckedListBoxLibrary/VisualComponents/SmartCheckedListBox.resx diff --git a/CheckedListBoxLibrary/SmartTextBox.Designer.cs b/CheckedListBoxLibrary/VisualComponents/SmartTextBox.Designer.cs similarity index 100% rename from CheckedListBoxLibrary/SmartTextBox.Designer.cs rename to CheckedListBoxLibrary/VisualComponents/SmartTextBox.Designer.cs diff --git a/CheckedListBoxLibrary/SmartTextBox.cs b/CheckedListBoxLibrary/VisualComponents/SmartTextBox.cs similarity index 100% rename from CheckedListBoxLibrary/SmartTextBox.cs rename to CheckedListBoxLibrary/VisualComponents/SmartTextBox.cs diff --git a/CheckedListBoxLibrary/SmartTextBox.resx b/CheckedListBoxLibrary/VisualComponents/SmartTextBox.resx similarity index 100% rename from CheckedListBoxLibrary/SmartTextBox.resx rename to CheckedListBoxLibrary/VisualComponents/SmartTextBox.resx diff --git a/CheckedListBoxLibrary/ValueOutOfRangeException.cs b/CheckedListBoxLibrary/VisualComponents/ValueOutOfRangeException.cs similarity index 86% rename from CheckedListBoxLibrary/ValueOutOfRangeException.cs rename to CheckedListBoxLibrary/VisualComponents/ValueOutOfRangeException.cs index c40b9ab..ad41c4e 100644 --- a/CheckedListBoxLibrary/ValueOutOfRangeException.cs +++ b/CheckedListBoxLibrary/VisualComponents/ValueOutOfRangeException.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace MyUserControls +namespace MyUserControls.VisualComponents { public class ValueOutOfRangeException : Exception { diff --git a/CheckedListBoxLibrary/testComponent.cs b/CheckedListBoxLibrary/testComponent.cs deleted file mode 100644 index b3965bc..0000000 --- a/CheckedListBoxLibrary/testComponent.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MyUserControls.Components -{ - public partial class testComponent : Component - { - public testComponent() - { - InitializeComponent(); - _fileName = string.Empty; - } - - public testComponent(IContainer container) - { - container.Add(this); - InitializeComponent(); - _fileName = string.Empty; - } - - private string _fileName; - public string FileName - { - set - { - if (string.IsNullOrEmpty(value)) - { - return; - } - if (!value.EndsWith(".txt")) - { - throw new ArgumentException("No txt file"); - } - _fileName = value; - } - } - public bool SaveToFile(string[] texts) - { - CheckFileExsists(); - using var writer = new StreamWriter(_fileName, true); - foreach (var text in texts) - { - writer.WriteLine(text); - } - writer.Flush(); - return true; - } - private void CheckFileExsists() - { - if (string.IsNullOrEmpty(_fileName)) - { - throw new ArgumentNullException(_fileName); - } - if (!File.Exists(_fileName)) - { - throw new FileNotFoundException(_fileName); - } - } - } -}