commit b5931661ac178958e0d7a1497828cd62d2571d93 Author: Eugen Höglinger Date: Wed Nov 25 13:52:49 2020 +0100 Initialize diff --git a/.vs/SearchFindReplace/v16/.suo b/.vs/SearchFindReplace/v16/.suo new file mode 100644 index 0000000..78b98a7 Binary files /dev/null and b/.vs/SearchFindReplace/v16/.suo differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..6b61141 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..8177dc3 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/FormLanguageSwitch/AssemblyInfo.cs b/FormLanguageSwitch/AssemblyInfo.cs new file mode 100644 index 0000000..080fbc1 --- /dev/null +++ b/FormLanguageSwitch/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("Form Language Switch")] +[assembly: AssemblyDescription("Utility to instantly change localized language in .NET Windows form")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Form Language Switch")] +[assembly: AssemblyCopyright("Copyright © 2020 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.2.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/FormLanguageSwitch/FormLanguageSwitch.cs b/FormLanguageSwitch/FormLanguageSwitch.cs new file mode 100644 index 0000000..6a187f6 --- /dev/null +++ b/FormLanguageSwitch/FormLanguageSwitch.cs @@ -0,0 +1,708 @@ +using System; +using System.Collections; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Reflection; +using System.Threading; +using System.Windows.Forms; + +namespace System.Globalization +{ + + public class FormLanguageSwitchSingleton + { + #region Version und Copyright + // Version und Copyright + string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region DLL-Info + /// + /// Contains the name of the program file + /// + public static string DllName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string DllVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetDllInfo() + { + //Name, Version und Copyright setzen + DllName = dllName; + DllVersion = dllVersion; + Copyright = copyright; + } + #endregion + + /// + /// Static read-only instance. + /// + protected static readonly FormLanguageSwitchSingleton m_instance = new FormLanguageSwitchSingleton(); + + /// + /// Hidden constructor called during static member m_instance initialization. + /// + protected FormLanguageSwitchSingleton() + { + SetDllInfo(); + } + + /// + /// Gets the only instance of the object. + /// + public static FormLanguageSwitchSingleton Instance + { + get { return m_instance; } + } + + /// + /// Changes the current culture used by the Resource Manager to look up culture-specific resources at run time. + /// + /// + /// A CultureInfo object that will be applied to the application thread. + /// + public void ChangeCurrentThreadUICulture(System.Globalization.CultureInfo cultureInfo) + { + Thread.CurrentThread.CurrentUICulture = cultureInfo; + } + + /// + /// Changes the language of the Form object provided to the currently selected language. + /// + /// + /// Form object to apply changes to. + /// + public void ChangeLanguage(System.Windows.Forms.Form form) + { + ChangeLanguage(form, Thread.CurrentThread.CurrentUICulture); + } + + /// + /// Changes the language of the Form object provided and all its MDI + /// children (in the case of MDI UI) to the currently selected language. + /// + /// + /// Form object to apply changes to. + /// + /// + /// CultureInfo to which language has to be changed. + /// + public void ChangeLanguage(System.Windows.Forms.Form form, System.Globalization.CultureInfo cultureInfo) + { + m_cultureInfo = cultureInfo; + ChangeFormLanguage(form); + foreach (System.Windows.Forms.Form childForm in form.MdiChildren) + { + ChangeFormLanguage(childForm); + } + } + + /// + /// Changes Text properties associated with following + /// controls: AxHost, ButtonBase, GroupBox, + /// Label, ScrollableControl, StatusBar, + /// TabControl, ToolBar. Method is made virtual so it + /// can be overriden in derived class to redefine types. + /// + /// + /// Control object. + /// + /// + /// ResourceManager object. + /// + protected virtual void ReloadTextForSelectedControls(System.Windows.Forms.Control control, System.Resources.ResourceManager resources) + { + if (control is System.Windows.Forms.AxHost || + control is System.Windows.Forms.ButtonBase || + control is System.Windows.Forms.GroupBox || + control is System.Windows.Forms.Label || + control is System.Windows.Forms.ScrollableControl || + control is System.Windows.Forms.StatusBar || + control is System.Windows.Forms.TabControl || + control is System.Windows.Forms.ToolBar) { + control.Text = (string)GetSafeValue(resources, control.Name + ".Text", control.Text); + } + } + + /// + /// Reloads properties common to all controls (except the Text property). + /// + /// + /// Control object for which resources should be reloaded. + /// + /// + /// ResourceManager object. + /// + protected virtual void ReloadControlCommonProperties(System.Windows.Forms.Control control, System.Resources.ResourceManager resources) + { + SetProperty(control, "AccessibleDescription", resources); + SetProperty(control, "AccessibleName", resources); + SetProperty(control, "BackgroundImage", resources); + SetProperty(control, "Font", resources); + SetProperty(control, "ImeMode", resources); + SetProperty(control, "RightToLeft", resources); + SetProperty(control, "Size", resources); + // following properties are not changed for the form + if (!(control is System.Windows.Forms.Form)) + { + SetProperty(control, "Anchor", resources); + SetProperty(control, "Dock", resources); + SetProperty(control, "Enabled", resources); + SetProperty(control, "Location", resources); + SetProperty(control, "TabIndex", resources); + SetProperty(control, "Visible", resources); + } + if (control is System.Windows.Forms.ScrollableControl) + { + ReloadScrollableControlProperties((System.Windows.Forms.ScrollableControl)control, resources); + if (control is System.Windows.Forms.Form) + { + ReloadFormProperties((System.Windows.Forms.Form)control, resources); + } + } + } + + /// + /// Reloads properties specific to some controls. + /// + /// + /// Control object for which resources should be reloaded. + /// + /// + /// ResourceManager object. + /// + protected virtual void ReloadControlSpecificProperties(System.Windows.Forms.Control control, System.Resources.ResourceManager resources) + { + // ImageIndex property for ButtonBase, Label, TabPage, ToolBarButton, TreeNode, TreeView + SetProperty(control, "ImageIndex", resources); + // ToolTipText property for StatusBar, TabPage, ToolBarButton + SetProperty(control, "ToolTipText", resources); + // IntegralHeight property for ComboBox, ListBox + SetProperty(control, "IntegralHeight", resources); + // ItemHeight property for ListBox, ComboBox, TreeView + SetProperty(control, "ItemHeight", resources); + // MaxDropDownItems property for ComboBox + SetProperty(control, "MaxDropDownItems", resources); + // MaxLength property for ComboBox, RichTextBox, TextBoxBase + SetProperty(control, "MaxLength", resources); + // Appearance property for CheckBox, RadioButton, TabControl, ToolBar + SetProperty(control, "Appearance", resources); + // CheckAlign property for CheckBox and RadioBox + SetProperty(control, "CheckAlign", resources); + // FlatStyle property for ButtonBase, GroupBox and Label + SetProperty(control, "FlatStyle", resources); + // ImageAlign property for ButtonBase, Image and Label + SetProperty(control, "ImageAlign", resources); + // Indent property for TreeView + SetProperty(control, "Indent", resources); + // Multiline property for RichTextBox, TabControl, TextBoxBase + SetProperty(control, "Multiline", resources); + // BulletIndent property for RichTextBox + SetProperty(control, "BulletIndent", resources); + // RightMargin property for RichTextBox + SetProperty(control, "RightMargin", resources); + // ScrollBars property for RichTextBox, TextBox + SetProperty(control, "ScrollBars", resources); + // WordWrap property for TextBoxBase + SetProperty(control, "WordWrap", resources); + // ZoomFactor property for RichTextBox + SetProperty(control, "ZoomFactor", resources); + // ButtonSize property for ToolBar + SetProperty(control, "ButtonSize", resources); + // ButtonSize property for ToolBar + SetProperty(control, "DropDownArrows", resources); + // ShowToolTips property for TabControl, ToolBar + SetProperty(control, "ShowToolTips", resources); + // Wrappable property for ToolBar + SetProperty(control, "Wrappable", resources); + // AutoSize property for Label, RichTextBox, ToolBar, TrackBar + SetProperty(control, "AutoSize", resources); + } + + /// + /// Scans controls that are not contained by Controls collection, + /// like MenuItems, StatusBarPanels and ColumnHeaders. + /// + /// + /// ContainerControl object to scan. + /// + /// + /// ResourceManager used to get localized resources. + /// + protected virtual void ScanNonControls(System.Windows.Forms.ContainerControl containerControl, System.Resources.ResourceManager resources) + { + FieldInfo[] fieldInfo = containerControl.GetType().GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); + for (int i = 0; i < fieldInfo.Length; i++) + { + object obj = fieldInfo[i].GetValue(containerControl); + string fieldName = fieldInfo[i].Name; + if (obj is System.Windows.Forms.MenuItem) + { + System.Windows.Forms.MenuItem menuItem = (System.Windows.Forms.MenuItem)obj; + menuItem.Enabled = (bool)(GetSafeValue(resources, fieldName + ".Enabled", menuItem.Enabled)); + menuItem.Shortcut = (System.Windows.Forms.Shortcut)(GetSafeValue(resources, fieldName + ".Shortcut", menuItem.Shortcut)); + menuItem.ShowShortcut = (bool)(GetSafeValue(resources, fieldName + ".ShowShortcut", menuItem.ShowShortcut)); + menuItem.Text = (string)GetSafeValue(resources, fieldName + ".Text", menuItem.Text); + menuItem.Visible = (bool)(GetSafeValue(resources, fieldName + ".Visible", menuItem.Visible)); + } + if (obj is System.Windows.Forms.ToolStripMenuItem) + { + System.Windows.Forms.ToolStripMenuItem menuItem = (System.Windows.Forms.ToolStripMenuItem)obj; + menuItem.Enabled = (bool)(GetSafeValue(resources, fieldName + ".Enabled", menuItem.Enabled)); + menuItem.Text = (string)GetSafeValue(resources, fieldName + ".Text", menuItem.Text); + } + if (obj is System.Windows.Forms.StatusBarPanel) + { + System.Windows.Forms.StatusBarPanel panel = (System.Windows.Forms.StatusBarPanel)obj; + panel.Alignment = (System.Windows.Forms.HorizontalAlignment)(GetSafeValue(resources, fieldName + ".Alignment", panel.Alignment)); + panel.Icon = (System.Drawing.Icon)(GetSafeValue(resources, fieldName + ".Icon", panel.Icon)); + panel.MinWidth = (int)(GetSafeValue(resources, fieldName + ".MinWidth", panel.MinWidth)); + panel.Text = (string)(GetSafeValue(resources, fieldName + ".Text", panel.Text)); + panel.ToolTipText = (string)(GetSafeValue(resources, fieldName + ".ToolTipText", panel.ToolTipText)); + panel.Width = (int)(GetSafeValue(resources, fieldName + ".Width", panel.Width)); + } + if (obj is System.Windows.Forms.ColumnHeader) + { + System.Windows.Forms.ColumnHeader header = (System.Windows.Forms.ColumnHeader)obj; + header.Text = (string)(GetSafeValue(resources, fieldName + ".Text", header.Text)); + header.TextAlign = (System.Windows.Forms.HorizontalAlignment)(GetSafeValue(resources, fieldName + ".TextAlign", header.TextAlign)); + header.Width = (int)(GetSafeValue(resources, fieldName + ".Width", header.Width)); + } + if (obj is System.Windows.Forms.ToolBarButton) + { + System.Windows.Forms.ToolBarButton button = (System.Windows.Forms.ToolBarButton)obj; + button.Enabled = (bool)(GetSafeValue(resources, fieldName + ".Enabled", button.Enabled)); + button.ImageIndex = (int)(GetSafeValue(resources, fieldName + ".ImageIndex", button.ImageIndex)); + button.Text = (string)(GetSafeValue(resources, fieldName + ".Text", button.Text)); + button.ToolTipText = (string)(GetSafeValue(resources, fieldName + ".ToolTipText", button.ToolTipText)); + button.Visible = (bool)(GetSafeValue(resources, fieldName + ".Visible", button.Visible)); + } + } + } + + /// + /// Gets resource value. If resource for new culture does not exists, leaves the current. + /// + /// + /// + /// + /// + private object GetSafeValue(System.Resources.ResourceManager resources, string name, object currentValue) + { + object newValue = resources.GetObject(name, m_cultureInfo); + if (newValue == null) + { + Trace.WriteLine(string.Format("Resource for {0} not found, using current value.", name)); + return currentValue; + } + return newValue; + } + + /// + /// Reloads items in following controls: ComboBox, + /// ListBox, DomainUpDown. Method is made virtual so + /// it can be overriden in derived class to redefine types. + /// + /// + /// Control object. + /// + /// + /// ResourceManager object. + /// + protected virtual void ReloadListItems(System.Windows.Forms.Control control, System.Resources.ResourceManager resources) + { + if (control is System.Windows.Forms.ComboBox) + { + ReloadComboBoxItems((System.Windows.Forms.ComboBox)control, resources); + } + else if (control is System.Windows.Forms.ListBox) + { + ReloadListBoxItems((System.Windows.Forms.ListBox)control, resources); + } + else if (control is System.Windows.Forms.DomainUpDown) + { + ReloadUpDownItems((System.Windows.Forms.DomainUpDown)control, resources); + } + } + + /// + /// Changes the language of the form. + /// + /// + /// Form object to apply changes to. + /// + private void ChangeFormLanguage(System.Windows.Forms.Form form) + { + form.SuspendLayout(); + Cursor.Current = Cursors.WaitCursor; + System.Resources.ResourceManager resources = new System.Resources.ResourceManager(form.GetType()); + // change main form resources + form.Text = (string)(GetSafeValue(resources, "$this.Text", form.Text)); + ReloadControlCommonProperties(form, resources); + ToolTip toolTip = GetToolTip(form); + // change text of all containing controls + RecurControls(form, resources, toolTip); + // change the text of menus + ScanNonControls(form, resources); + form.ResumeLayout(); + } + + /// + /// Gets the ToolTip member of the control (Form or UserControl). + /// + /// + /// Control for which tooltip is requested. + /// + /// + /// ToolTip of the control or null if not defined. + /// + private ToolTip GetToolTip(System.Windows.Forms.Control control) + { + Debug.Assert(control is System.Windows.Forms.Form || control is System.Windows.Forms.UserControl); + FieldInfo[] fieldInfo = control.GetType().GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); + for (int i = 0; i < fieldInfo.Length; i++) + { + object obj = fieldInfo[i].GetValue(control); + if (obj is System.Windows.Forms.ToolTip) + { + return (ToolTip)obj; + } + } + return null; + } + + /// + /// Recurs Controls members of the control to change corresponding texts. + /// + /// + /// Parent Control object. + /// + /// + /// ResourceManager object. + /// + private void RecurControls(System.Windows.Forms.Control parent, System.Resources.ResourceManager resources, System.Windows.Forms.ToolTip toolTip) + { + foreach (Control control in parent.Controls) + { + control.SuspendLayout(); + ReloadControlCommonProperties(control, resources); + ReloadControlSpecificProperties(control, resources); + if (toolTip != null) + { + toolTip.SetToolTip(control, (string)GetSafeValue(resources, control.Name + ".ToolTip", control.Text)); + } + if (control is System.Windows.Forms.UserControl) + { + RecurUserControl((System.Windows.Forms.UserControl)control); + } + else + { + ReloadTextForSelectedControls(control, resources); + ReloadListItems(control, resources); + if (control is System.Windows.Forms.TreeView) + { + ReloadTreeViewNodes((System.Windows.Forms.TreeView)control, resources); + } + if (control.Controls.Count > 0) + { + RecurControls(control, resources, toolTip); + } + } + control.ResumeLayout(); + } + } + + /// + /// Reloads resources specific to the Form type. + /// + /// + /// Form object to apply changes to. + /// + /// + /// ResourceManager object. + /// + private void ReloadFormProperties(System.Windows.Forms.Form form, System.Resources.ResourceManager resources) + { + SetProperty(form, "AutoScaleBaseSize", resources); + SetProperty(form, "Icon", resources); + SetProperty(form, "MaximumSize", resources); + SetProperty(form, "MinimumSize", resources); + } + + /// + /// Reloads resources specific to the ScrollableControl type. + /// + /// + /// Control object for which resources should be reloaded. + /// + /// + /// ResourceManager object. + /// + private void ReloadScrollableControlProperties(System.Windows.Forms.ScrollableControl control, System.Resources.ResourceManager resources) + { + SetProperty(control, "AutoScroll", resources); + SetProperty(control, "AutoScrollMargin", resources); + SetProperty(control, "AutoScrollMinSize", resources); + } + + /// + /// Reloads resources for a property. + /// + /// + /// Control object for which resources should be reloaded. + /// + /// + /// Name of the property to reload. + /// + /// + /// ResourceManager object. + /// + private void SetProperty(System.Windows.Forms.Control control, string propertyName, System.Resources.ResourceManager resources) + { + try + { + PropertyInfo propertyInfo = control.GetType().GetProperty(propertyName); + if (propertyInfo != null) + { + string controlName = control.Name; + if (control is System.Windows.Forms.Form) + { + controlName = "$this"; + } + object resObject = resources.GetObject(controlName + "." + propertyName, m_cultureInfo); + if (resObject != null) + { + propertyInfo.SetValue(control, Convert.ChangeType(resObject, propertyInfo.PropertyType), null); + } + } + } + catch (AmbiguousMatchException e) + { + Trace.WriteLine(e.ToString()); + } + } + + /// + /// Recurs UserControl to change. + /// + /// + /// UserControl object to scan. + /// + private void RecurUserControl(System.Windows.Forms.UserControl userControl) + { + System.Resources.ResourceManager resources = new System.Resources.ResourceManager(userControl.GetType()); + ToolTip toolTip = GetToolTip(userControl); + RecurControls(userControl, resources, toolTip); + // addition suggested by Piotr Sielski: + ScanNonControls(userControl, resources); + } + + /// + /// Reloads items in the ListBox. If items are not sorted, selections are kept. + /// + /// + /// ListBox to localize. + /// + /// + /// ResourceManager object. + /// + private void ReloadListBoxItems(System.Windows.Forms.ListBox listBox, System.Resources.ResourceManager resources) + { + if (listBox.Items.Count > 0) + { + int[] selectedItems = new int[listBox.SelectedIndices.Count]; + listBox.SelectedIndices.CopyTo(selectedItems, 0); + ReloadItems(listBox.Name, listBox.Items, listBox.Items.Count, resources); + if (!listBox.Sorted) + { + for (int i = 0; i < selectedItems.Length; i++) + { + listBox.SetSelected(selectedItems[i], true); + } + } + } + } + + /// + /// Reloads items in the ComboBox. If items are not sorted, selection is kept. + /// + /// + /// ComboBox to localize. + /// + /// + /// ResourceManager object. + /// + private void ReloadComboBoxItems(System.Windows.Forms.ComboBox comboBox, System.Resources.ResourceManager resources) + { + if (comboBox.Items.Count > 0) + { + int selectedIndex = comboBox.SelectedIndex; + ReloadItems(comboBox.Name, comboBox.Items, comboBox.Items.Count, resources); + if (!comboBox.Sorted) + { + comboBox.SelectedIndex = selectedIndex; + } + } + } + + /// + /// Reloads items in the DomainUpDown control. If items are not sorted, selection is kept. + /// + /// + /// DomainUpDown to localize. + /// + /// + /// ResourceManager object. + /// + private void ReloadUpDownItems(System.Windows.Forms.DomainUpDown domainUpDown, System.Resources.ResourceManager resources) + { + if (domainUpDown.Items.Count > 0) + { + int selectedIndex = domainUpDown.SelectedIndex; + ReloadItems(domainUpDown.Name, domainUpDown.Items, domainUpDown.Items.Count, resources); + if (!domainUpDown.Sorted) + { + domainUpDown.SelectedIndex = selectedIndex; + } + } + } + + /// + /// Reloads content of a TreeView. + /// + /// + /// TreeView control to reload. + /// + /// + /// ResourceManager object. + /// + private void ReloadTreeViewNodes(System.Windows.Forms.TreeView treeView, System.Resources.ResourceManager resources) + { + if (treeView.Nodes.Count > 0) + { + string resourceName = treeView.Name + ".Nodes"; + TreeNode[] newNodes = new TreeNode[treeView.Nodes.Count]; + newNodes[0] = (System.Windows.Forms.TreeNode)resources.GetObject(resourceName, m_cultureInfo); + // VS2002 generates node resource names with additional ".Nodes" string + if (newNodes[0] == null) + { + resourceName += ".Nodes"; + newNodes[0] = (System.Windows.Forms.TreeNode)resources.GetObject(resourceName, m_cultureInfo); + } + Debug.Assert(newNodes[0] != null); + for (int i = 1; i < treeView.Nodes.Count; i++) + { + newNodes[i] = (System.Windows.Forms.TreeNode)resources.GetObject(resourceName + i.ToString(), m_cultureInfo); + } + treeView.Nodes.Clear(); + treeView.Nodes.AddRange(newNodes); + } + } + + /// + /// Clears all items in the IList and reloads the list with items according to language settings. + /// + /// + /// Name of the control. + /// + /// + /// IList with items to change. + /// + /// + /// Number of items. + /// + /// + /// ResourceManager object. + /// + private void ReloadItems(string controlName, IList list, int itemsNumber, System.Resources.ResourceManager resources) + { + string resourceName = controlName + ".Items"; + object obj = resources.GetString(resourceName, m_cultureInfo); + // VS2002 generates item resource name with additional ".Items" string + if (obj == null) + { + resourceName += ".Items"; + obj = resources.GetString(resourceName, m_cultureInfo); + } + if (obj != null) + { + list.Clear(); + Debug.Assert(obj != null); + list.Add(obj); + for (int i = 1; i < itemsNumber; i++) + { + list.Add(resources.GetString(resourceName + i, m_cultureInfo)); + } + } + } + + /// + /// CultureInfo used by Resource Manager. + /// + private System.Globalization.CultureInfo m_cultureInfo; + } +} \ No newline at end of file diff --git a/FormLanguageSwitch/FormLanguageSwitch.csproj b/FormLanguageSwitch/FormLanguageSwitch.csproj new file mode 100644 index 0000000..cc2ab96 --- /dev/null +++ b/FormLanguageSwitch/FormLanguageSwitch.csproj @@ -0,0 +1,96 @@ + + + + Local + 7.0.9955 + 1.0 + {787B600C-9A56-41C7-A3C8-9553630FE3C1} + Debug + AnyCPU + + + FormLanguageSwitch + + JScript + Grid + IE50 + false + Library + System.Globalization + + + + + + 0.0 + + + bin\Debug\ + false + 285212672 + false + + DEBUG;TRACE + + true + 4096 + false + false + false + false + 4 + full + prompt + + + bin\Release\ + false + 285212672 + false + + TRACE + + false + 4096 + true + false + false + false + 4 + none + prompt + + + + System + + + System.Data + + + System.Drawing + + + System.Windows.Forms + + + System.XML + + + + + Code + + + Code + + + Code + + + + + + + + \ No newline at end of file diff --git a/FormLanguageSwitch/LanguageCollector.cs b/FormLanguageSwitch/LanguageCollector.cs new file mode 100644 index 0000000..98e47ec --- /dev/null +++ b/FormLanguageSwitch/LanguageCollector.cs @@ -0,0 +1,158 @@ +using System; +using System.Collections; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace System.Globalization +{ + public class CultureInfoDisplayItem + { + public CultureInfoDisplayItem(string displayName, CultureInfo cultureInfo) + { + DisplayName = displayName; + CultureInfo = cultureInfo; + } + + public override string ToString() + { + return DisplayName; + } + + public string DisplayName; + + public readonly CultureInfo CultureInfo; + } + + + /// + /// Class responsible to collect available localized resources. + /// + public class LanguageCollector + { + + public enum LanguageNameDisplay + { + DisplayName, + EnglishName, + NativeName + } + + /// + /// Initializes LanguageCollector object with a list of + /// available localized resources based on subfolders names. + /// + public LanguageCollector() + { + m_avalableCutureInfos = GetApplicationAvailableCultures(); + Debug.Assert(m_avalableCutureInfos != null); + } + + /// + /// Initializes LanguageCollector object with a list of available localized resources + /// based on subfolders names plus CultureInfo supplied as a default culture. + /// + /// + /// Default culure for which application did not create subfolder. + /// + public LanguageCollector(CultureInfo defaultCultureInfo) : this() + { + if (!m_avalableCutureInfos.Contains(defaultCultureInfo)) + { + m_avalableCutureInfos.Add(defaultCultureInfo); + m_avalableCutureInfos.Sort(new CultureInfoComparer()); + } + Debug.Assert(m_avalableCutureInfos != null); + } + + private class CultureInfoComparer : IComparer + { + + int IComparer.Compare(object x, object y) + { + return Compare((CultureInfo)x, (CultureInfo)y); + } + + public int Compare(CultureInfo cix, CultureInfo ciy) + { + return string.Compare(cix.Name, ciy.Name); + } + + } + + /// + /// Returns an array of CultureInfoDisplayItem objects for all available localized resources. + /// + /// + /// LanguageNameDisplay value defining how language will be displayed. + /// + /// + /// Index of currently active UI culture. + /// + /// + /// An array of CultureInfoDisplayItem objects, sorted by their names (not DisplayNames). + /// + public CultureInfoDisplayItem[] GetLanguages(LanguageNameDisplay languageNameToDisplay, out int currentLanguage) + { + CultureInfoDisplayItem[] cidi = new CultureInfoDisplayItem[m_avalableCutureInfos.Count]; + currentLanguage = -1; + string currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.Name; + string parentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.Parent.Name; + for (int i = 0; i < m_avalableCutureInfos.Count; i++) + { + CultureInfo ci = (CultureInfo)m_avalableCutureInfos[i]; + string displayName = GetDisplayName(ci, languageNameToDisplay); + cidi[i] = new CultureInfoDisplayItem(displayName, ci); + if (currentCulture == ci.Name || (currentLanguage == -1 && parentCulture == ci.Name)) + currentLanguage = i; + } + Debug.Assert(currentLanguage > -1 && currentLanguage < m_avalableCutureInfos.Count); + return cidi; + } + + private string GetDisplayName(CultureInfo cultureInfo, LanguageNameDisplay languageNameToDisplay) + { + switch (languageNameToDisplay) + { + case LanguageNameDisplay.DisplayName: + return cultureInfo.DisplayName; + case LanguageNameDisplay.EnglishName: + return cultureInfo.EnglishName; + case LanguageNameDisplay.NativeName: + return cultureInfo.NativeName; + } + Debug.Assert(false, string.Format("Not supported LanguageNameDisplay value {0}", languageNameToDisplay)); + return ""; + } + + private Hashtable GetAllCultures() + { + CultureInfo[] cis = CultureInfo.GetCultures(CultureTypes.AllCultures); + Hashtable allCultures = new Hashtable(cis.Length); + foreach (CultureInfo ci in cis) + { + allCultures.Add(ci.Name, ci); + } + return allCultures; + } + + private ArrayList GetApplicationAvailableCultures() + { + ArrayList availableCultures = new ArrayList(); + Hashtable allCultures = GetAllCultures(); + string executableRoot = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + foreach (string directory in Directory.GetDirectories(executableRoot)) + { + string subDirectory = Path.GetFileName(directory); + CultureInfo ci = (CultureInfo)allCultures[subDirectory]; + if (ci != null) + { + availableCultures.Add(ci); + } + } + return availableCultures; + } + + private ArrayList m_avalableCutureInfos; + } +} diff --git a/FormLanguageSwitch/bin/Debug/FormLanguageSwitch.dll b/FormLanguageSwitch/bin/Debug/FormLanguageSwitch.dll new file mode 100644 index 0000000..7934657 Binary files /dev/null and b/FormLanguageSwitch/bin/Debug/FormLanguageSwitch.dll differ diff --git a/FormLanguageSwitch/bin/Debug/FormLanguageSwitch.pdb b/FormLanguageSwitch/bin/Debug/FormLanguageSwitch.pdb new file mode 100644 index 0000000..0d7af29 Binary files /dev/null and b/FormLanguageSwitch/bin/Debug/FormLanguageSwitch.pdb differ diff --git a/FormLanguageSwitch/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs b/FormLanguageSwitch/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs new file mode 100644 index 0000000..5d01041 --- /dev/null +++ b/FormLanguageSwitch/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")] diff --git a/FormLanguageSwitch/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/FormLanguageSwitch/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..c6e7f42 Binary files /dev/null and b/FormLanguageSwitch/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csproj.CoreCompileInputs.cache b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..cfef33e --- /dev/null +++ b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +6ff992535ae4b815455fe7ad84bbac547d7b2a6d diff --git a/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csproj.FileListAbsolute.txt b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..dbcd53d --- /dev/null +++ b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csproj.FileListAbsolute.txt @@ -0,0 +1,18 @@ +H:\Programmieren\Git-Repository\VisualStudio\FormLanguageSwitch_src\FormLanguageSwitch\FormLanguageSwitch\bin\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\FormLanguageSwitch_src\FormLanguageSwitch\FormLanguageSwitch\bin\Debug\FormLanguageSwitch.pdb +H:\Programmieren\Git-Repository\VisualStudio\FormLanguageSwitch_src\FormLanguageSwitch\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\FormLanguageSwitch_src\FormLanguageSwitch\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\FormLanguageSwitch_src\FormLanguageSwitch\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\FormLanguageSwitch_src\FormLanguageSwitch\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\FormLanguageSwitch\bin\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\FormLanguageSwitch\bin\Debug\FormLanguageSwitch.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\FormLanguageSwitch\bin\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\FormLanguageSwitch\bin\Debug\FormLanguageSwitch.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\FormLanguageSwitch\obj\Debug\FormLanguageSwitch.pdb diff --git a/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csprojAssemblyReference.cache b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csprojAssemblyReference.cache new file mode 100644 index 0000000..e2c0f94 Binary files /dev/null and b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.csprojAssemblyReference.cache differ diff --git a/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.dll b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.dll new file mode 100644 index 0000000..7934657 Binary files /dev/null and b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.dll differ diff --git a/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.pdb b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.pdb new file mode 100644 index 0000000..0d7af29 Binary files /dev/null and b/FormLanguageSwitch/obj/Debug/FormLanguageSwitch.pdb differ diff --git a/ReplaceString/AppResources.Designer.cs b/ReplaceString/AppResources.Designer.cs new file mode 100644 index 0000000..7df2f15 --- /dev/null +++ b/ReplaceString/AppResources.Designer.cs @@ -0,0 +1,100 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace Eugen.ESystem.Windows.Forms { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AppResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AppResources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ReplaceString.AppResources", typeof(AppResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Warnung ähnelt. + /// + internal static string messagebox001caption { + get { + return ResourceManager.GetString("messagebox001caption", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Eingabe unvollständig! + ///Bitte füllen Sie die Eingabefelder vollständig aus. ähnelt. + /// + internal static string messagebox001text { + get { + return ResourceManager.GetString("messagebox001text", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Information ähnelt. + /// + internal static string messagebox002caption { + get { + return ResourceManager.GetString("messagebox002caption", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Es wurde keine (weitere) Übereinstimmung gefunden. ähnelt. + /// + internal static string messagebox002text { + get { + return ResourceManager.GetString("messagebox002text", resourceCulture); + } + } + } +} diff --git a/ReplaceString/AppResources.de.resx b/ReplaceString/AppResources.de.resx new file mode 100644 index 0000000..5e955e7 --- /dev/null +++ b/ReplaceString/AppResources.de.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Warnung + + + Eingabe unvollständig! +Bitte füllen Sie die Eingabefelder vollständig aus. + + + Information + + + Es wurde keine (weitere) Übereinstimmung gefunden. + + \ No newline at end of file diff --git a/ReplaceString/AppResources.en.resx b/ReplaceString/AppResources.en.resx new file mode 100644 index 0000000..5b8e10f --- /dev/null +++ b/ReplaceString/AppResources.en.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Warning + + + Input incomplete! +Please fill out the input fields completely. + + + Information + + + No (further) match was found. + + \ No newline at end of file diff --git a/ReplaceString/AppResources.resx b/ReplaceString/AppResources.resx new file mode 100644 index 0000000..5e955e7 --- /dev/null +++ b/ReplaceString/AppResources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Warnung + + + Eingabe unvollständig! +Bitte füllen Sie die Eingabefelder vollständig aus. + + + Information + + + Es wurde keine (weitere) Übereinstimmung gefunden. + + \ No newline at end of file diff --git a/ReplaceString/Properties/AssemblyInfo.cs b/ReplaceString/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d2baafe --- /dev/null +++ b/ReplaceString/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("ReplaceString")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ReplaceString")] +[assembly: AssemblyCopyright("Copyright © 2020 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("b402b197-7eba-4994-9fcd-a658b23648b0")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ReplaceString/Replace.Designer.cs b/ReplaceString/Replace.Designer.cs new file mode 100644 index 0000000..dd7c83e --- /dev/null +++ b/ReplaceString/Replace.Designer.cs @@ -0,0 +1,96 @@ +namespace Eugen.ESystem.Windows.Forms +{ + partial class Replace + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Replace)); + this.groupBoxReplace = new System.Windows.Forms.GroupBox(); + this.buttonReplaceAll = new System.Windows.Forms.Button(); + this.buttonReplace = new System.Windows.Forms.Button(); + this.textBoxSubstituteString = new System.Windows.Forms.TextBox(); + this.labelSubstituteString = new System.Windows.Forms.Label(); + this.groupBoxReplace.SuspendLayout(); + this.SuspendLayout(); + // + // groupBoxReplace + // + resources.ApplyResources(this.groupBoxReplace, "groupBoxReplace"); + this.groupBoxReplace.Controls.Add(this.buttonReplaceAll); + this.groupBoxReplace.Controls.Add(this.buttonReplace); + this.groupBoxReplace.Controls.Add(this.textBoxSubstituteString); + this.groupBoxReplace.Controls.Add(this.labelSubstituteString); + this.groupBoxReplace.Name = "groupBoxReplace"; + this.groupBoxReplace.TabStop = false; + // + // buttonReplaceAll + // + resources.ApplyResources(this.buttonReplaceAll, "buttonReplaceAll"); + this.buttonReplaceAll.Name = "buttonReplaceAll"; + this.buttonReplaceAll.UseVisualStyleBackColor = true; + this.buttonReplaceAll.Click += new System.EventHandler(this.buttonReplaceAll_Click); + // + // buttonReplace + // + resources.ApplyResources(this.buttonReplace, "buttonReplace"); + this.buttonReplace.Name = "buttonReplace"; + this.buttonReplace.UseVisualStyleBackColor = true; + this.buttonReplace.Click += new System.EventHandler(this.buttonReplace_Click); + // + // textBoxSubstituteString + // + resources.ApplyResources(this.textBoxSubstituteString, "textBoxSubstituteString"); + this.textBoxSubstituteString.Name = "textBoxSubstituteString"; + this.textBoxSubstituteString.Click += new System.EventHandler(this.textBoxSubstituteString_Click); + this.textBoxSubstituteString.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxSubstituteString_KeyDown); + // + // labelSubstituteString + // + resources.ApplyResources(this.labelSubstituteString, "labelSubstituteString"); + this.labelSubstituteString.Name = "labelSubstituteString"; + // + // Replace + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBoxReplace); + this.Name = "Replace"; + this.groupBoxReplace.ResumeLayout(false); + this.groupBoxReplace.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBoxReplace; + private System.Windows.Forms.TextBox textBoxSubstituteString; + private System.Windows.Forms.Label labelSubstituteString; + private System.Windows.Forms.Button buttonReplaceAll; + private System.Windows.Forms.Button buttonReplace; + } +} diff --git a/ReplaceString/Replace.cs b/ReplaceString/Replace.cs new file mode 100644 index 0000000..b4ceb9d --- /dev/null +++ b/ReplaceString/Replace.cs @@ -0,0 +1,506 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Eugen.ESystem.Windows.Forms +{ + public partial class Replace: UserControl + { + #region Version und Copyright + // Version und Copyright + string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region DLL-Info + /// + /// Contains the name of the program file + /// + public static string DllName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string DllVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetDllInfo() + { + //Name, Version und Copyright setzen + DllName = dllName; + DllVersion = dllVersion; + Copyright = copyright; + } + #endregion + + /// + /// Replaces a string with another + /// + public Replace() + { + InitializeComponent(); + SetDllInfo(); + search.SetSearchString(); + MoreMatch = true; + } + + #region GlobaleVariablen + protected string SearchText { set; get; } + protected string SearchString { set; get; } + protected int SearchStringLength { set; get; } + protected int Index { set; get; } + /// + /// Contains the current cursor position + /// + protected int CurrentCursorPosition { set; get; } + /// + /// Contains a list with all found positions + /// + protected List AllPositions { set; get; } + /// + /// String with which the search string should be replaced. + /// + protected string SubstituteString { set; get; } + /// + /// Tells you if there are still matches available + /// + protected static bool MoreMatch { set; get; } + ///// + ///// Is true if an error has occurred + ///// + //public bool Error { private set; get; } + #endregion + + #region Public Methodes + /// + /// Sets the text to be searched. + /// + /// A valid string. + public void SetSearchText(string searchText) + { + SearchText = searchText; + } + + /// + /// Get the text to be searched. + /// + /// Returns a string. + public string GetSearchText() + { + return SearchText; + } + + /// + /// Sets the search string. + /// + /// A valid string. + public void SetSearchString(string searchString) + { + SearchString = searchString; + } + + /// + /// Get the search string. + /// + /// Returns a string. + public string GetSearchString() + { + return SearchString; + } + + /// + /// Sets the Search string length. + /// + /// A valid int value. + public void SetSearchStringLength(int searchStringLength) + { + SearchStringLength = searchStringLength; + } + + /// + /// Get the Search string length. + /// + /// Returns a int value. + public int GetSearchStringLength() + { + return SearchStringLength; + } + + /// + /// Sets the position for a found value in the array + /// + /// A valid int value. Must be smaller / equal to the maximum number of elements. + public void SetIndex(int index) + { + Index = index; + } + + /// + /// Get the position for a found value in the array + /// + /// Returns a int value. + public int GetIndex() + { + return Index; + } + + /// + /// Sets the current cursor position in the search text. + /// + /// A valid int value. + public void SetCurrentCursorPosition(int currentCursorPosition) + { + CurrentCursorPosition = currentCursorPosition; + } + + /// + /// Get the current cursor position in the search text. + /// + /// Returns a int value. + public int GetCurrentCursorPosition() + { + return CurrentCursorPosition; + } + + /// + /// Returns all positions where the search string was found in the search text. + /// + /// Returns a int list. + public List GetAllPositions() + { + return AllPositions; + } + + /// + /// Sets the substitute string. + /// + /// A valid string. + public void SetSubstituteString(string substituteString) + { + SubstituteString = substituteString; + } + + /// + /// Get the substitute string. + /// + /// Returns a string. + public string GetSubstituteString() + { + return SubstituteString; + } + + /// + /// Sets whether there is no further hit. + /// + /// Is true or false. + public void SetMoreMatch(bool moreMatch) + { + MoreMatch = moreMatch; + } + #endregion + + #region Privat Methodes + private void SetValues() + { + SearchText = search.GetSearchText(); + SearchString = search.GetSearchString(); + if (!String.IsNullOrEmpty(SearchString) && search.GetAllPositionsCount() > 0) + { + search.SetSearchStringLength(SearchString.Length); + SearchStringLength = search.GetSearchStringLength(); + } + Index = search.GetIndex(); + } + + private void SetValuesNoMatch() + { + SearchText = ""; + SearchString = ""; + Index = 0; + } + + private bool IsInputOK() + { + if (!String.IsNullOrEmpty(search.GetSearchString()) && !String.IsNullOrEmpty(SubstituteString)) + { + if (SubstituteString != textBoxSubstituteString.Text) + { + SubstituteString = textBoxSubstituteString.Text; //Wenn ein Wert in der Textbox steht, aber noch nicht Return/Enter gedrückt wurde + } + + if (search.GetAllPositionsCount() > 0) + { + return true; //Sind beide Werte vorhanden und gleich, dann ist Alles OK + } + else + { + return false; //Wenn es keinen Suchstring mehr gibt + } + } + else + { + if (!String.IsNullOrEmpty(search.GetSearchString()) & !String.IsNullOrEmpty(textBoxSubstituteString.Text)) + { + SubstituteString = textBoxSubstituteString.Text; //Wenn ein Wert in der Textbox steht, aber noch nicht Return/Enter gedrückt wurde + return true; + } + else + { + return false; + } + } + } + + private void ReplaceStr() + { + if (MoreMatch) + { + SetValues(); + } + else + { + SetValuesNoMatch(); + } + + if (IsInputOK()) + { + try + { + if (MoreMatch) + { + //Den Text nach dem Tausch wieder zurückschreiben + search.SetSearchText(ReplaceString(search.GetSearchText(), search.GetSearchString(), SubstituteString, search.GetCurrentCursorPosition())); + search.SearchAndFindString(); + OnEvent(search.GetCurrentCursorPosition(), search.GetSearchStringLength()); //Anzeige aktualisieren + } + } + catch (IncompleteInputException) + { + MessageBox.Show(AppResources.messagebox001text, AppResources.messagebox001caption, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + catch (StringNotMatchException) + { + search.ClearSearchString(); + OnEvent(0, 0); //Anzeige aktualisieren + MoreMatch = false; + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + else + { + if (search.GetAllPositionsCount() == 0) + { + throw new StringNotMatchException(); + } + else + { + throw new IncompleteInputException(); + } + } + } + + private string ReplaceString(string searchText, string searchString, string textBoxReplacementString, int currentCursorPosition) + { + return searchText.Remove(currentCursorPosition, searchString.Length).Insert(currentCursorPosition, textBoxReplacementString); + } + + private void ReplaceAll() + { + List newList = new List(); + newList = search.GetAllPositions(); + newList.Reverse(); + + if (MoreMatch) + { + foreach (var item in newList) + { + //Das Ersetzen von hinten nach vorne durchführen. So sind die vorab ermittelten Positionen immer richtig + search.SetSearchText(ReplaceString(search.GetSearchText(), search.GetSearchString(), SubstituteString, item)); + } + MoreMatch = false; + } + else + { + if (search.GetAllPositionsCount() == 0) + { + throw new StringNotMatchException(); + } + else + { + throw new IncompleteInputException(); + } + } + + } + #endregion + + #region Event + // Der Delegat muß die gleiche Signatur aufweisen wie die Eventhandler-Methode. + public delegate void EventDelegate(int currentCursorPosition, int searchStringLenght); + + // Das Event-Objekt ist vom Typ dieses Delegaten. + public event EventDelegate StringFound; + + public void OnEvent(int currentCursorPosition, int searchStringLength) + { + // Prüft ob das Event überhaupt einen Abonnenten hat. + StringFound?.Invoke(currentCursorPosition, searchStringLength); + } + #endregion + + Search search = new Search(); + + private void buttonReplace_Click(object sender, EventArgs e) + { + try + { + ReplaceStr(); + } + catch (IncompleteInputException) + { + MessageBox.Show(AppResources.messagebox001text, AppResources.messagebox001caption, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + catch (StringNotMatchException) + { + search.ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void buttonReplaceAll_Click(object sender, EventArgs e) + { + try + { + if (MoreMatch) + { + if (IsInputOK()) + { + ReplaceAll(); + OnEvent(0, 0); //Anzeige aktualisieren + } + else + { + if (search.GetAllPositionsCount() == 0) + { + throw new StringNotMatchException(); + } + else + { + throw new IncompleteInputException(); + } + } + } + else + { + throw new StringNotMatchException(); + } + } + catch (IncompleteInputException) + { + MessageBox.Show(AppResources.messagebox001text, AppResources.messagebox001caption, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + catch (StringNotMatchException) + { + search.ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void textBoxSubstituteString_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + if (!String.IsNullOrEmpty(search.GetSearchString())) + { + MoreMatch = true; + SetValues(); + + try + { + SubstituteString = textBoxSubstituteString.Text; + search.SearchAndFindString(); + OnEvent(search.GetCurrentCursorPosition(), search.GetSearchStringLength()); //Anzeige aktualisieren + } + catch (StringNotMatchException) + { + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + } + } + + private void textBoxSubstituteString_Click(object sender, EventArgs e) + { + SetValues(); + OnEvent(CurrentCursorPosition, SearchStringLength); + textBoxSubstituteString.Focus(); + } + } +} diff --git a/ReplaceString/Replace.de.resx b/ReplaceString/Replace.de.resx new file mode 100644 index 0000000..b5c7e6d --- /dev/null +++ b/ReplaceString/Replace.de.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Alle ersetzen + + + Ersetzen + + + + 78, 13 + + + Ersetzen durch + + + Ersetzen + + \ No newline at end of file diff --git a/ReplaceString/Replace.en.resx b/ReplaceString/Replace.en.resx new file mode 100644 index 0000000..b014120 --- /dev/null +++ b/ReplaceString/Replace.en.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Replace all + + + Replace + + + + 69, 13 + + + Replace with + + + Replace + + \ No newline at end of file diff --git a/ReplaceString/Replace.resx b/ReplaceString/Replace.resx new file mode 100644 index 0000000..10c393c --- /dev/null +++ b/ReplaceString/Replace.resx @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Top, Bottom, Left, Right + + + Bottom, Right + + + + 284, 39 + + + 100, 23 + + + + 7 + + + Alle ersetzen + + + buttonReplaceAll + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxReplace + + + 0 + + + Bottom, Left + + + 6, 39 + + + 100, 23 + + + 6 + + + Ersetzen + + + buttonReplace + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxReplace + + + 1 + + + Top, Left, Right + + + 89, 13 + + + 295, 20 + + + 3 + + + textBoxSubstituteString + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxReplace + + + 2 + + + True + + + 3, 16 + + + 78, 13 + + + 2 + + + Ersetzen durch + + + labelSubstituteString + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxReplace + + + 3 + + + 0, 0 + + + 250, 68 + + + 390, 68 + + + 0 + + + Ersetzen + + + groupBoxReplace + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 250, 68 + + + 390, 68 + + + Replace + + + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ReplaceString/ReplaceString.csproj b/ReplaceString/ReplaceString.csproj new file mode 100644 index 0000000..ee6b6b5 --- /dev/null +++ b/ReplaceString/ReplaceString.csproj @@ -0,0 +1,88 @@ + + + + + Debug + AnyCPU + {B402B197-7EBA-4994-9FCD-A658B23648B0} + Library + ReplaceString + ReplaceString + v4.7.2 + 512 + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + True + True + AppResources.resx + + + UserControl + + + Replace.cs + + + + + + + Eugen.ESystem.Windows.Forms + + + Eugen.ESystem.Windows.Forms + + + ResXFileCodeGenerator + AppResources.Designer.cs + Eugen.ESystem.Windows.Forms + + + Replace.cs + + + Replace.cs + + + Replace.cs + + + + + {91ec8467-e4fc-44c7-8092-c3ae6ae75009} + SearchString + + + + \ No newline at end of file diff --git a/ReplaceString/bin/Debug/ReplaceString.dll b/ReplaceString/bin/Debug/ReplaceString.dll new file mode 100644 index 0000000..3ca6b54 Binary files /dev/null and b/ReplaceString/bin/Debug/ReplaceString.dll differ diff --git a/ReplaceString/bin/Debug/ReplaceString.pdb b/ReplaceString/bin/Debug/ReplaceString.pdb new file mode 100644 index 0000000..a787ef3 Binary files /dev/null and b/ReplaceString/bin/Debug/ReplaceString.pdb differ diff --git a/ReplaceString/bin/Debug/SearchString.dll b/ReplaceString/bin/Debug/SearchString.dll new file mode 100644 index 0000000..68ff63c Binary files /dev/null and b/ReplaceString/bin/Debug/SearchString.dll differ diff --git a/ReplaceString/bin/Debug/SearchString.pdb b/ReplaceString/bin/Debug/SearchString.pdb new file mode 100644 index 0000000..1e01baa Binary files /dev/null and b/ReplaceString/bin/Debug/SearchString.pdb differ diff --git a/ReplaceString/bin/Debug/de/ReplaceString.resources.dll b/ReplaceString/bin/Debug/de/ReplaceString.resources.dll new file mode 100644 index 0000000..7435f2d Binary files /dev/null and b/ReplaceString/bin/Debug/de/ReplaceString.resources.dll differ diff --git a/ReplaceString/bin/Debug/de/SearchString.resources.dll b/ReplaceString/bin/Debug/de/SearchString.resources.dll new file mode 100644 index 0000000..70ac1f8 Binary files /dev/null and b/ReplaceString/bin/Debug/de/SearchString.resources.dll differ diff --git a/ReplaceString/bin/Debug/en/ReplaceString.resources.dll b/ReplaceString/bin/Debug/en/ReplaceString.resources.dll new file mode 100644 index 0000000..7d12703 Binary files /dev/null and b/ReplaceString/bin/Debug/en/ReplaceString.resources.dll differ diff --git a/ReplaceString/bin/Debug/en/SearchString.resources.dll b/ReplaceString/bin/Debug/en/SearchString.resources.dll new file mode 100644 index 0000000..77011e5 Binary files /dev/null and b/ReplaceString/bin/Debug/en/SearchString.resources.dll differ diff --git a/ReplaceString/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/ReplaceString/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/ReplaceString/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/ReplaceString/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/ReplaceString/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..cafef12 Binary files /dev/null and b/ReplaceString/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/ReplaceString/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ReplaceString/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..630f2c1 Binary files /dev/null and b/ReplaceString/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.de.resources b/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.de.resources new file mode 100644 index 0000000..9a351b3 Binary files /dev/null and b/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.de.resources differ diff --git a/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.en.resources b/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.en.resources new file mode 100644 index 0000000..15927dd Binary files /dev/null and b/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.en.resources differ diff --git a/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.resources b/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.resources new file mode 100644 index 0000000..8ce6dbc Binary files /dev/null and b/ReplaceString/obj/Debug/Eugen.ESystem.Windows.Forms.Replace.resources differ diff --git a/ReplaceString/obj/Debug/ReplaceString.AppResources.de.resources b/ReplaceString/obj/Debug/ReplaceString.AppResources.de.resources new file mode 100644 index 0000000..9dd60ce Binary files /dev/null and b/ReplaceString/obj/Debug/ReplaceString.AppResources.de.resources differ diff --git a/ReplaceString/obj/Debug/ReplaceString.AppResources.en.resources b/ReplaceString/obj/Debug/ReplaceString.AppResources.en.resources new file mode 100644 index 0000000..5ba4a89 Binary files /dev/null and b/ReplaceString/obj/Debug/ReplaceString.AppResources.en.resources differ diff --git a/ReplaceString/obj/Debug/ReplaceString.AppResources.resources b/ReplaceString/obj/Debug/ReplaceString.AppResources.resources new file mode 100644 index 0000000..9dd60ce Binary files /dev/null and b/ReplaceString/obj/Debug/ReplaceString.AppResources.resources differ diff --git a/ReplaceString/obj/Debug/ReplaceString.csproj.CopyComplete b/ReplaceString/obj/Debug/ReplaceString.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ReplaceString/obj/Debug/ReplaceString.csproj.CoreCompileInputs.cache b/ReplaceString/obj/Debug/ReplaceString.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..7c70222 --- /dev/null +++ b/ReplaceString/obj/Debug/ReplaceString.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +eed273b743287bcf1e0ed75602d38eb39b8549b9 diff --git a/ReplaceString/obj/Debug/ReplaceString.csproj.FileListAbsolute.txt b/ReplaceString/obj/Debug/ReplaceString.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..12eba6d --- /dev/null +++ b/ReplaceString/obj/Debug/ReplaceString.csproj.FileListAbsolute.txt @@ -0,0 +1,55 @@ +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\bin\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\bin\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\obj\Debug\Eugen.ESystem.Windows.Forms.Replace.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csproj.CopyComplete +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\Eugen.ESystem.Windows.Forms.Replace.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.csproj.CopyComplete +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\de\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\en\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\bin\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\Eugen.ESystem.Windows.Forms.Replace.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\Eugen.ESystem.Windows.Forms.Replace.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\de\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\en\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\de\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\en\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\bin\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\Eugen.ESystem.Windows.Forms.Replace.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\Eugen.ESystem.Windows.Forms.Replace.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\Eugen.ESystem.Windows.Forms.Replace.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\de\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\en\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.csproj.CopyComplete +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.AppResources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.AppResources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\ReplaceString\obj\Debug\ReplaceString.AppResources.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.AppResources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.AppResources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\ReplaceString\obj\Debug\ReplaceString.AppResources.en.resources diff --git a/ReplaceString/obj/Debug/ReplaceString.csproj.GenerateResource.cache b/ReplaceString/obj/Debug/ReplaceString.csproj.GenerateResource.cache new file mode 100644 index 0000000..8822c28 Binary files /dev/null and b/ReplaceString/obj/Debug/ReplaceString.csproj.GenerateResource.cache differ diff --git a/ReplaceString/obj/Debug/ReplaceString.csprojAssemblyReference.cache b/ReplaceString/obj/Debug/ReplaceString.csprojAssemblyReference.cache new file mode 100644 index 0000000..e932c2f Binary files /dev/null and b/ReplaceString/obj/Debug/ReplaceString.csprojAssemblyReference.cache differ diff --git a/ReplaceString/obj/Debug/ReplaceString.dll b/ReplaceString/obj/Debug/ReplaceString.dll new file mode 100644 index 0000000..3ca6b54 Binary files /dev/null and b/ReplaceString/obj/Debug/ReplaceString.dll differ diff --git a/ReplaceString/obj/Debug/ReplaceString.pdb b/ReplaceString/obj/Debug/ReplaceString.pdb new file mode 100644 index 0000000..a787ef3 Binary files /dev/null and b/ReplaceString/obj/Debug/ReplaceString.pdb differ diff --git a/ReplaceString/obj/Debug/TempPE/AppResources.Designer.cs.dll b/ReplaceString/obj/Debug/TempPE/AppResources.Designer.cs.dll new file mode 100644 index 0000000..3f75bde Binary files /dev/null and b/ReplaceString/obj/Debug/TempPE/AppResources.Designer.cs.dll differ diff --git a/ReplaceString/obj/Debug/de/ReplaceString.resources.dll b/ReplaceString/obj/Debug/de/ReplaceString.resources.dll new file mode 100644 index 0000000..7435f2d Binary files /dev/null and b/ReplaceString/obj/Debug/de/ReplaceString.resources.dll differ diff --git a/ReplaceString/obj/Debug/en/ReplaceString.resources.dll b/ReplaceString/obj/Debug/en/ReplaceString.resources.dll new file mode 100644 index 0000000..7d12703 Binary files /dev/null and b/ReplaceString/obj/Debug/en/ReplaceString.resources.dll differ diff --git a/ReplaceString/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/ReplaceString/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/ReplaceString/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/SearchFindReplace.sln b/SearchFindReplace.sln new file mode 100644 index 0000000..fcb5466 --- /dev/null +++ b/SearchFindReplace.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30611.23 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchFindReplace", "SearchFindReplace\SearchFindReplace.csproj", "{50068E99-23B8-46A2-B2D0-02E60C17CF3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchString", "SearchString\SearchString.csproj", "{91EC8467-E4FC-44C7-8092-C3AE6AE75009}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReplaceString", "ReplaceString\ReplaceString.csproj", "{B402B197-7EBA-4994-9FCD-A658B23648B0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormLanguageSwitch", "FormLanguageSwitch\FormLanguageSwitch.csproj", "{787B600C-9A56-41C7-A3C8-9553630FE3C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {50068E99-23B8-46A2-B2D0-02E60C17CF3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50068E99-23B8-46A2-B2D0-02E60C17CF3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50068E99-23B8-46A2-B2D0-02E60C17CF3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50068E99-23B8-46A2-B2D0-02E60C17CF3C}.Release|Any CPU.Build.0 = Release|Any CPU + {91EC8467-E4FC-44C7-8092-C3AE6AE75009}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91EC8467-E4FC-44C7-8092-C3AE6AE75009}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91EC8467-E4FC-44C7-8092-C3AE6AE75009}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91EC8467-E4FC-44C7-8092-C3AE6AE75009}.Release|Any CPU.Build.0 = Release|Any CPU + {B402B197-7EBA-4994-9FCD-A658B23648B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B402B197-7EBA-4994-9FCD-A658B23648B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B402B197-7EBA-4994-9FCD-A658B23648B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B402B197-7EBA-4994-9FCD-A658B23648B0}.Release|Any CPU.Build.0 = Release|Any CPU + {787B600C-9A56-41C7-A3C8-9553630FE3C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {787B600C-9A56-41C7-A3C8-9553630FE3C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {787B600C-9A56-41C7-A3C8-9553630FE3C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {787B600C-9A56-41C7-A3C8-9553630FE3C1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EBB35311-07CA-437D-973F-33D6DFBBF950} + EndGlobalSection +EndGlobal diff --git a/SearchFindReplace/App.config b/SearchFindReplace/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/SearchFindReplace/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SearchFindReplace/AppResources.Designer.cs b/SearchFindReplace/AppResources.Designer.cs new file mode 100644 index 0000000..d6273f4 --- /dev/null +++ b/SearchFindReplace/AppResources.Designer.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace SearchFindReplace { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AppResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AppResources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SearchFindReplace.AppResources", typeof(AppResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Information ähnelt. + /// + internal static string mbt000caption { + get { + return ResourceManager.GetString("mbt000caption", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Das ist ein Sprach Test. ähnelt. + /// + internal static string mbt000text { + get { + return ResourceManager.GetString("mbt000text", resourceCulture); + } + } + } +} diff --git a/SearchFindReplace/AppResources.de.resx b/SearchFindReplace/AppResources.de.resx new file mode 100644 index 0000000..551e5ba --- /dev/null +++ b/SearchFindReplace/AppResources.de.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Information + + + Das ist ein Sprach Test. + + \ No newline at end of file diff --git a/SearchFindReplace/AppResources.en.Designer.cs b/SearchFindReplace/AppResources.en.Designer.cs new file mode 100644 index 0000000..e69de29 diff --git a/SearchFindReplace/AppResources.en.resx b/SearchFindReplace/AppResources.en.resx new file mode 100644 index 0000000..ad5448a --- /dev/null +++ b/SearchFindReplace/AppResources.en.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Information + + + This is a language test. + + \ No newline at end of file diff --git a/SearchFindReplace/AppResources.resx b/SearchFindReplace/AppResources.resx new file mode 100644 index 0000000..551e5ba --- /dev/null +++ b/SearchFindReplace/AppResources.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Information + + + Das ist ein Sprach Test. + + \ No newline at end of file diff --git a/SearchFindReplace/Form1.Designer.cs b/SearchFindReplace/Form1.Designer.cs new file mode 100644 index 0000000..125e400 --- /dev/null +++ b/SearchFindReplace/Form1.Designer.cs @@ -0,0 +1,179 @@ +namespace SearchFindReplace +{ + partial class Form1 + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.textBoxText = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.radioButtonEnglish = new System.Windows.Forms.RadioButton(); + this.radioButtonGerman = new System.Windows.Forms.RadioButton(); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.spracheToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deutschToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.englischToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.labelDllInfo = new System.Windows.Forms.Label(); + this.groupBoxDll = new System.Windows.Forms.GroupBox(); + this.buttonCheckLanguage = new System.Windows.Forms.Button(); + this.replace1 = new Eugen.ESystem.Windows.Forms.Replace(); + this.search1 = new Eugen.ESystem.Windows.Forms.Search(); + this.groupBox1.SuspendLayout(); + this.menuStrip.SuspendLayout(); + this.groupBoxDll.SuspendLayout(); + this.SuspendLayout(); + // + // textBoxText + // + resources.ApplyResources(this.textBoxText, "textBoxText"); + this.textBoxText.Name = "textBoxText"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.radioButtonEnglish); + this.groupBox1.Controls.Add(this.radioButtonGerman); + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // radioButtonEnglish + // + resources.ApplyResources(this.radioButtonEnglish, "radioButtonEnglish"); + this.radioButtonEnglish.Name = "radioButtonEnglish"; + this.radioButtonEnglish.UseVisualStyleBackColor = true; + this.radioButtonEnglish.CheckedChanged += new System.EventHandler(this.radioButtonEnglish_CheckedChanged); + // + // radioButtonGerman + // + resources.ApplyResources(this.radioButtonGerman, "radioButtonGerman"); + this.radioButtonGerman.Checked = true; + this.radioButtonGerman.Name = "radioButtonGerman"; + this.radioButtonGerman.TabStop = true; + this.radioButtonGerman.UseVisualStyleBackColor = true; + this.radioButtonGerman.CheckedChanged += new System.EventHandler(this.radioButtonGerman_CheckedChanged); + // + // menuStrip + // + this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.spracheToolStripMenuItem}); + resources.ApplyResources(this.menuStrip, "menuStrip"); + this.menuStrip.Name = "menuStrip"; + // + // spracheToolStripMenuItem + // + this.spracheToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deutschToolStripMenuItem, + this.englischToolStripMenuItem}); + this.spracheToolStripMenuItem.Name = "spracheToolStripMenuItem"; + resources.ApplyResources(this.spracheToolStripMenuItem, "spracheToolStripMenuItem"); + // + // deutschToolStripMenuItem + // + this.deutschToolStripMenuItem.Checked = true; + this.deutschToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.deutschToolStripMenuItem.Name = "deutschToolStripMenuItem"; + resources.ApplyResources(this.deutschToolStripMenuItem, "deutschToolStripMenuItem"); + this.deutschToolStripMenuItem.Click += new System.EventHandler(this.deutschToolStripMenuItem1_Click); + // + // englischToolStripMenuItem + // + this.englischToolStripMenuItem.Name = "englischToolStripMenuItem"; + resources.ApplyResources(this.englischToolStripMenuItem, "englischToolStripMenuItem"); + this.englischToolStripMenuItem.Click += new System.EventHandler(this.englischToolStripMenuItem_Click); + // + // labelDllInfo + // + resources.ApplyResources(this.labelDllInfo, "labelDllInfo"); + this.labelDllInfo.Name = "labelDllInfo"; + // + // groupBoxDll + // + this.groupBoxDll.Controls.Add(this.labelDllInfo); + resources.ApplyResources(this.groupBoxDll, "groupBoxDll"); + this.groupBoxDll.Name = "groupBoxDll"; + this.groupBoxDll.TabStop = false; + // + // buttonCheckLanguage + // + resources.ApplyResources(this.buttonCheckLanguage, "buttonCheckLanguage"); + this.buttonCheckLanguage.Name = "buttonCheckLanguage"; + this.buttonCheckLanguage.UseVisualStyleBackColor = true; + this.buttonCheckLanguage.Click += new System.EventHandler(this.buttonCheckLanguage_Click); + // + // replace1 + // + resources.ApplyResources(this.replace1, "replace1"); + this.replace1.Name = "replace1"; + // + // search1 + // + resources.ApplyResources(this.search1, "search1"); + this.search1.Name = "search1"; + // + // Form1 + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.buttonCheckLanguage); + this.Controls.Add(this.groupBoxDll); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.replace1); + this.Controls.Add(this.search1); + this.Controls.Add(this.textBoxText); + this.Controls.Add(this.menuStrip); + this.MainMenuStrip = this.menuStrip; + this.Name = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.menuStrip.ResumeLayout(false); + this.menuStrip.PerformLayout(); + this.groupBoxDll.ResumeLayout(false); + this.groupBoxDll.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBoxText; + private Eugen.ESystem.Windows.Forms.Search search1; + private Eugen.ESystem.Windows.Forms.Replace replace1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.RadioButton radioButtonEnglish; + private System.Windows.Forms.RadioButton radioButtonGerman; + private System.Windows.Forms.MenuStrip menuStrip; + private System.Windows.Forms.ToolStripMenuItem spracheToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem deutschToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem englischToolStripMenuItem; + private System.Windows.Forms.Label labelDllInfo; + private System.Windows.Forms.GroupBox groupBoxDll; + private System.Windows.Forms.Button buttonCheckLanguage; + } +} + diff --git a/SearchFindReplace/Form1.cs b/SearchFindReplace/Form1.cs new file mode 100644 index 0000000..f755340 --- /dev/null +++ b/SearchFindReplace/Form1.cs @@ -0,0 +1,286 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using Eugen.ESystem.Windows.Forms; + +namespace SearchFindReplace +{ + public partial class Form1 : Form + { + #region Version und Copyright + // Version und Copyright + string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + //string startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + //return startYear.Remove(0, startYear.LastIndexOf(" ") + 1); + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + //return String.Concat(((AssemblyCopyrightAttribute)attributes[0]).Copyright, "-", currentYear); + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region Programm-Info + /// + /// Contains the name of the program file + /// + public static string ProgramName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string ProgramVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetProgramInfo() + { + //Name, Version und Copyright setzen + ProgramName = programName; + ProgramVersion = programVersion; + Copyright = copyright; + } + #endregion + + public Form1() + { + SetProgramInfo(); //Name, Version und Copyright setzen + + InitializeComponent(); + + //Systemsprache auslesen und Programmsprache setzen oder ... + if (Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName == "de") + { + SetLanguage("Deutsch", CultureInfo.GetCultureInfo("de")); + } + else + { + SetLanguage("English", CultureInfo.GetCultureInfo("en")); + } + + //... oder Programmsprache definitiv auf "Deutsch" setzen + SetLanguage("Deutsch", CultureInfo.GetCultureInfo("de")); + + //Dll-Informationen laden + LoadDllInfo(); + } + + private void SetLanguage(string language, CultureInfo languageShortForm) + { + CultureInfoDisplayItem cidi = (CultureInfoDisplayItem)new CultureInfoDisplayItem(language, languageShortForm); + FormLanguageSwitchSingleton.Instance.ChangeLanguage(this, cidi.CultureInfo); + Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(languageShortForm.ToString()); + ChangeLanguage(languageShortForm.ToString()); + } + + private void ChangeLanguage(string lang) + { + Thread.CurrentThread.CurrentUICulture = new + System.Globalization.CultureInfo(lang); + ComponentResourceManager resources = new ComponentResourceManager(typeof(Form1)); + resources.ApplyResources(this, "$this"); + ApplyResources(resources, this.Controls); + } + + private void ApplyResources(ComponentResourceManager resources, Control.ControlCollection ctls) + { + //all controls + foreach (Control ctl in ctls) + { + resources.ApplyResources(ctl, ctl.Name); + ApplyResources(resources, ctl.Controls); + } + + //the menu bar and its items + foreach (ToolStripItem item in menuStrip.Items) + { + if (item is ToolStripDropDownItem) + { + resources.ApplyResources(item, item.Name); + foreach (ToolStripItem dropDownItem in ((ToolStripDropDownItem)item).DropDownItems) + { + resources.ApplyResources(dropDownItem, dropDownItem.Name); + } + } + } + } + + private void MarkCurrentLanguage() + { + deutschToolStripMenuItem.Checked = !deutschToolStripMenuItem.Checked; + englischToolStripMenuItem.Checked = !englischToolStripMenuItem.Checked; + if (radioButtonGerman.Checked) + { + radioButtonEnglish.Checked = true; + } + else + { + radioButtonGerman.Checked = true; + } + } + + private void LoadDllInfo() + { + string dllInfo = ""; + dllInfo = String.Concat(FormLanguageSwitchSingleton.DllName, ": ", FormLanguageSwitchSingleton.DllVersion, "\n\r", FormLanguageSwitchSingleton.Copyright, "\n\r"); + dllInfo = String.Concat(dllInfo, Search.DllName, ": ", Search.DllVersion, "\n\r", Search.Copyright, "\n\r"); + dllInfo = String.Concat(dllInfo, Replace.DllName, ": ", Replace.DllVersion, "\n\r", Replace.Copyright); + labelDllInfo.Text = dllInfo; + labelDllInfo.Refresh(); + } + + private void buttonCheckLanguage_Click(object sender, EventArgs e) + { + MessageBox.Show(String.Concat(Resources.mbt000text, Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName), Resources.mbt000caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void radioButtonGerman_CheckedChanged(object sender, EventArgs e) + { + SetLanguage("Deutsch", CultureInfo.GetCultureInfo("de")); + + LoadDllInfo(); + } + + private void radioButtonEnglish_CheckedChanged(object sender, EventArgs e) + { + SetLanguage("Englisch", CultureInfo.GetCultureInfo("en")); + + LoadDllInfo(); + } + + private void deutschToolStripMenuItem1_Click(object sender, EventArgs e) + { + SetLanguage("Deutsch", CultureInfo.GetCultureInfo("de")); + MarkCurrentLanguage(); + + LoadDllInfo(); + } + + private void englischToolStripMenuItem_Click(object sender, EventArgs e) + { + SetLanguage("Englisch", CultureInfo.GetCultureInfo("en")); + MarkCurrentLanguage(); + + LoadDllInfo(); + } + + + //-------------------------------------------------------------- + //--- Diesen Bereich ins eigene Programm einfügen --- Anfang --- + //-------------------------------------------------------------- + // Die Zeile "using Eugen.ESystem.Windows.Forms;" einfügen + // Die Verweise "SearchString" und "ReplaceString" einfügen + //-------------------------------------------------------------- + private void Form1_Load(object sender, EventArgs e) + { + try + { + search1.SetSearchText(textBoxText.Text); //Text aus der Textbox übergeben + search1.RefreshDisplay += new Search.RefreshDelegate(RefreshDisplay); //Hier wird das Event abonniert + search1.InputChanged += new Search.InputChangedDelegate(InputChanged); //Hier wird das Event abonniert + + replace1.SetSearchText(textBoxText.Text); //Text aus der Textbox übergeben + replace1.StringFound += new Replace.EventDelegate(RefreshDisplay); //Hier wird das Event abonniert + } + catch (IncompleteInputException) + { + MessageBox.Show("Eingabe unvollständig!"); + } + catch (StringNotMatchException) + { + MessageBox.Show("Keine (weitere) Übereinstimmung gefunden!"); + } + } + + //Zeichnet die TextBox neu + void RefreshDisplay(int currentCursorPosition, int searchStringLenght) + { + RefreshTextBox(currentCursorPosition, searchStringLenght); //Ansicht aktualisieren + } + + //Trifft zu wenn sich die Eingabe geändert hat + void InputChanged() + { + replace1.SetMoreMatch(true); //Gibt der Replace Funktion bekannt, dass es weitere Treffer gibt + } + + private void RefreshTextBox(int currentCursorPosition, int searchStringLenght) + { + //Ansicht aktualisieren + textBoxText.Text = search1.GetSearchText(); //Aktuellen Text zuweisen + textBoxText.Focus(); //Focus auf die Textbox + textBoxText.Select(currentCursorPosition, searchStringLenght); //Suchstring in der Textbox selektieren + textBoxText.Refresh(); + } + + //-------------------------------------------------------------- + //--- Diesen Bereich ins eigene Programm einfügen --- Ende --- + //-------------------------------------------------------------- + } +} diff --git a/SearchFindReplace/Form1.de.resx b/SearchFindReplace/Form1.de.resx new file mode 100644 index 0000000..1b44c3a --- /dev/null +++ b/SearchFindReplace/Form1.de.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Sprache + + + Verwendete DLLs + + + Sprache in MessageBox testen + + + Sprache + + \ No newline at end of file diff --git a/SearchFindReplace/Form1.en.resx b/SearchFindReplace/Form1.en.resx new file mode 100644 index 0000000..38c6988 --- /dev/null +++ b/SearchFindReplace/Form1.en.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Language + + + Used DLLs + + + Test language in MessageBox + + + Language + + \ No newline at end of file diff --git a/SearchFindReplace/Form1.resx b/SearchFindReplace/Form1.resx new file mode 100644 index 0000000..80fe6b6 --- /dev/null +++ b/SearchFindReplace/Form1.resx @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 13, 27 + + + + True + + + 375, 411 + + + 0 + + + Das ist ein Probetext. Er dient zum Testen einer Suchen und Finden Funktion. +Wird ein angegebener Suchstring im Text gefunden, dann wird die Textstelle selektiert. +Ist der Suchstring nicht im Text enthalten, dann wird eine Meldung ausgegeben. +Mit "Nächster Treffer" wird im Text nach dem nächsten Vorkommen des Suchstrings gesucht. Wird ein weiteres Vorkommen gefunden, dann wird die Textstelle markiert. +"Vorheriger Treffer" hat die gleiche Funktion wie "Nächster", nur ist die Suchrichtung rückwärts. +Die Anderen Optionen müssen noch definiert werden. + + @Invariant + + + textBoxText + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + True + + + + NoControl + + + 326, 19 + + + 59, 17 + + + 1 + + + English + @Invariant + + + radioButtonEnglish + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + True + + + NoControl + + + 6, 19 + + + 65, 17 + + + 0 + + + Deutsch + @Invariant + + + radioButtonGerman + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 1 + + + 397, 366 + + + 391, 43 + + + 3 + + + Sprache + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 17, 17 + + + 117, 22 + + + Deutsch + @Invariant + + + 117, 22 + + + English + @Invariant + + + 61, 20 + + + Sprache + + + 0, 0 + + + 800, 24 + + + 4 + + + menuStrip1 + @Invariant + + + menuStrip + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + True + + + NoControl + + + 15, 16 + + + 16, 13 + + + 6 + + + ... + @Invariant + + + labelDllInfo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxDll + + + 0 + + + 397, 260 + + + 390, 100 + + + 7 + + + Verwendete DLLs + + + groupBoxDll + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + NoControl + + + 397, 415 + + + 391, 23 + + + 8 + + + Sprache in MessageBox testen + + + buttonCheckLanguage + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + Top, Left, Right + + + 398, 154 + + + 250, 68 + + + 390, 68 + + + 2 + + + replace1 + + + Eugen.ESystem.Windows.Forms.Replace, ReplaceString, Version=1.0.7615.25398, Culture=neutral, PublicKeyToken=null + + + $this + + + 3 + + + Top, Left, Right + + + 398, 27 + + + 250, 120 + + + 390, 120 + + + 1 + + + search1 + + + Eugen.ESystem.Windows.Forms.Search, SearchString, Version=1.0.7615.25397, Culture=neutral, PublicKeyToken=null + + + $this + + + 4 + + + True + + + 6, 13 + + + 800, 450 + + + NoControl + + + Test_User Control with language switch + @Invariant + + + spracheToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + deutschToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + englischToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Form1 + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SearchFindReplace/Languages.cs b/SearchFindReplace/Languages.cs new file mode 100644 index 0000000..c941304 --- /dev/null +++ b/SearchFindReplace/Languages.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Eugen.ESystem.Windows.Forms +{ + class Languages + { + public static Languages.Language CurrentLanguage { set; get; } + + public enum Language + { + German, + English + } + } +} diff --git a/SearchFindReplace/Program.cs b/SearchFindReplace/Program.cs new file mode 100644 index 0000000..17f0b2a --- /dev/null +++ b/SearchFindReplace/Program.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SearchFindReplace +{ + static class Program + { + /// + /// Der Haupteinstiegspunkt für die Anwendung. + /// + [STAThread] + static void Main() + { + CultureInfo myCultureInfo = new CultureInfo("en"); + Thread.CurrentThread.CurrentCulture = myCultureInfo; + Thread.CurrentThread.CurrentUICulture = myCultureInfo; + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/SearchFindReplace/Properties/AssemblyInfo.cs b/SearchFindReplace/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d5ba1e6 --- /dev/null +++ b/SearchFindReplace/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("SearchFindReplace")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SearchFindReplace")] +[assembly: AssemblyCopyright("Copyright © 2020 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("50068e99-23b8-46a2-b2d0-02e60c17cf3c")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SearchFindReplace/Properties/Resources.Designer.cs b/SearchFindReplace/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ace0872 --- /dev/null +++ b/SearchFindReplace/Properties/Resources.Designer.cs @@ -0,0 +1,82 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace SearchFindReplace { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SearchFindReplace.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Information ähnelt. + /// + internal static string mbt000caption { + get { + return ResourceManager.GetString("mbt000caption", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Das ist ein Sprach Test. + ///Ausgewählt ist: ähnelt. + /// + internal static string mbt000text { + get { + return ResourceManager.GetString("mbt000text", resourceCulture); + } + } + } +} diff --git a/SearchFindReplace/Properties/Resources.de.resx b/SearchFindReplace/Properties/Resources.de.resx new file mode 100644 index 0000000..38760a9 --- /dev/null +++ b/SearchFindReplace/Properties/Resources.de.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Information + + + Das ist ein Sprach Test. +Ausgewählt ist: + + \ No newline at end of file diff --git a/SearchFindReplace/Properties/Resources.en.Designer.cs b/SearchFindReplace/Properties/Resources.en.Designer.cs new file mode 100644 index 0000000..e69de29 diff --git a/SearchFindReplace/Properties/Resources.en.resx b/SearchFindReplace/Properties/Resources.en.resx new file mode 100644 index 0000000..521af6a --- /dev/null +++ b/SearchFindReplace/Properties/Resources.en.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Information + + + This is a language test. +Selected is: + + \ No newline at end of file diff --git a/SearchFindReplace/Properties/Resources.resx b/SearchFindReplace/Properties/Resources.resx new file mode 100644 index 0000000..38760a9 --- /dev/null +++ b/SearchFindReplace/Properties/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Information + + + Das ist ein Sprach Test. +Ausgewählt ist: + + \ No newline at end of file diff --git a/SearchFindReplace/Properties/Settings.Designer.cs b/SearchFindReplace/Properties/Settings.Designer.cs new file mode 100644 index 0000000..5b2aa82 --- /dev/null +++ b/SearchFindReplace/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SearchFindReplace.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/SearchFindReplace/Properties/Settings.settings b/SearchFindReplace/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/SearchFindReplace/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/SearchFindReplace/SearchFindReplace.csproj b/SearchFindReplace/SearchFindReplace.csproj new file mode 100644 index 0000000..3c32c72 --- /dev/null +++ b/SearchFindReplace/SearchFindReplace.csproj @@ -0,0 +1,140 @@ + + + + + Debug + AnyCPU + {50068E99-23B8-46A2-B2D0-02E60C17CF3C} + WinExe + SearchFindReplace + SearchFindReplace + v4.7.2 + 512 + true + false + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + True + True + AppResources.resx + + + True + True + AppResources.en.resx + + + Form + + + Form1.cs + + + + Resources.resx + True + True + + + Resources.en.resx + True + True + + + + SearchFindReplace + + + SearchFindReplace + ResXFileCodeGenerator + AppResources.en.Designer.cs + + + ResXFileCodeGenerator + AppResources.Designer.cs + SearchFindReplace + + + Form1.cs + + + Form1.cs + + + Form1.cs + + + SearchFindReplace + + + ResXFileCodeGenerator + Resources.en.Designer.cs + SearchFindReplace + + + ResXFileCodeGenerator + Resources.Designer.cs + SearchFindReplace + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {787b600c-9a56-41c7-a3c8-9553630fe3c1} + FormLanguageSwitch + + + {b402b197-7eba-4994-9fcd-a658b23648b0} + ReplaceString + + + {91ec8467-e4fc-44c7-8092-c3ae6ae75009} + SearchString + + + + \ No newline at end of file diff --git a/SearchFindReplace/bin/Debug/FormLanguageSwitch.dll b/SearchFindReplace/bin/Debug/FormLanguageSwitch.dll new file mode 100644 index 0000000..7934657 Binary files /dev/null and b/SearchFindReplace/bin/Debug/FormLanguageSwitch.dll differ diff --git a/SearchFindReplace/bin/Debug/FormLanguageSwitch.pdb b/SearchFindReplace/bin/Debug/FormLanguageSwitch.pdb new file mode 100644 index 0000000..0d7af29 Binary files /dev/null and b/SearchFindReplace/bin/Debug/FormLanguageSwitch.pdb differ diff --git a/SearchFindReplace/bin/Debug/ReplaceString.dll b/SearchFindReplace/bin/Debug/ReplaceString.dll new file mode 100644 index 0000000..3ca6b54 Binary files /dev/null and b/SearchFindReplace/bin/Debug/ReplaceString.dll differ diff --git a/SearchFindReplace/bin/Debug/ReplaceString.pdb b/SearchFindReplace/bin/Debug/ReplaceString.pdb new file mode 100644 index 0000000..a787ef3 Binary files /dev/null and b/SearchFindReplace/bin/Debug/ReplaceString.pdb differ diff --git a/SearchFindReplace/bin/Debug/SearchFindReplace.exe b/SearchFindReplace/bin/Debug/SearchFindReplace.exe new file mode 100644 index 0000000..26fa98f Binary files /dev/null and b/SearchFindReplace/bin/Debug/SearchFindReplace.exe differ diff --git a/SearchFindReplace/bin/Debug/SearchFindReplace.exe.config b/SearchFindReplace/bin/Debug/SearchFindReplace.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/SearchFindReplace/bin/Debug/SearchFindReplace.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SearchFindReplace/bin/Debug/SearchFindReplace.pdb b/SearchFindReplace/bin/Debug/SearchFindReplace.pdb new file mode 100644 index 0000000..2af9051 Binary files /dev/null and b/SearchFindReplace/bin/Debug/SearchFindReplace.pdb differ diff --git a/SearchFindReplace/bin/Debug/SearchString.dll b/SearchFindReplace/bin/Debug/SearchString.dll new file mode 100644 index 0000000..68ff63c Binary files /dev/null and b/SearchFindReplace/bin/Debug/SearchString.dll differ diff --git a/SearchFindReplace/bin/Debug/SearchString.pdb b/SearchFindReplace/bin/Debug/SearchString.pdb new file mode 100644 index 0000000..1e01baa Binary files /dev/null and b/SearchFindReplace/bin/Debug/SearchString.pdb differ diff --git a/SearchFindReplace/bin/Debug/de/ReplaceString.resources.dll b/SearchFindReplace/bin/Debug/de/ReplaceString.resources.dll new file mode 100644 index 0000000..7435f2d Binary files /dev/null and b/SearchFindReplace/bin/Debug/de/ReplaceString.resources.dll differ diff --git a/SearchFindReplace/bin/Debug/de/SearchFindReplace.resources.dll b/SearchFindReplace/bin/Debug/de/SearchFindReplace.resources.dll new file mode 100644 index 0000000..1a357b1 Binary files /dev/null and b/SearchFindReplace/bin/Debug/de/SearchFindReplace.resources.dll differ diff --git a/SearchFindReplace/bin/Debug/de/SearchString.resources.dll b/SearchFindReplace/bin/Debug/de/SearchString.resources.dll new file mode 100644 index 0000000..70ac1f8 Binary files /dev/null and b/SearchFindReplace/bin/Debug/de/SearchString.resources.dll differ diff --git a/SearchFindReplace/bin/Debug/en/ReplaceString.resources.dll b/SearchFindReplace/bin/Debug/en/ReplaceString.resources.dll new file mode 100644 index 0000000..7d12703 Binary files /dev/null and b/SearchFindReplace/bin/Debug/en/ReplaceString.resources.dll differ diff --git a/SearchFindReplace/bin/Debug/en/SearchFindReplace.resources.dll b/SearchFindReplace/bin/Debug/en/SearchFindReplace.resources.dll new file mode 100644 index 0000000..68a69c7 Binary files /dev/null and b/SearchFindReplace/bin/Debug/en/SearchFindReplace.resources.dll differ diff --git a/SearchFindReplace/bin/Debug/en/SearchString.resources.dll b/SearchFindReplace/bin/Debug/en/SearchString.resources.dll new file mode 100644 index 0000000..77011e5 Binary files /dev/null and b/SearchFindReplace/bin/Debug/en/SearchString.resources.dll differ diff --git a/SearchFindReplace/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/SearchFindReplace/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/SearchFindReplace/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/SearchFindReplace/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/SearchFindReplace/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..45142f4 Binary files /dev/null and b/SearchFindReplace/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/SearchFindReplace/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/SearchFindReplace/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..7e0c882 Binary files /dev/null and b/SearchFindReplace/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.de.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.de.resources new file mode 100644 index 0000000..36e7174 Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.de.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.en.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.en.resources new file mode 100644 index 0000000..73d4f6f Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.en.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.resources new file mode 100644 index 0000000..36e7174 Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.AppResources.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.de.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.de.resources new file mode 100644 index 0000000..a7195e9 Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.de.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.en.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.en.resources new file mode 100644 index 0000000..546fcfe Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.en.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.resources new file mode 100644 index 0000000..714d702 Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.Form1.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.de.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.de.resources new file mode 100644 index 0000000..818b2db Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.de.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.en.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.en.resources new file mode 100644 index 0000000..87dd181 Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.en.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.resources b/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.resources new file mode 100644 index 0000000..818b2db Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.Properties.Resources.resources differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.CopyComplete b/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.CoreCompileInputs.cache b/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..cbe2128 --- /dev/null +++ b/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +d40dae988b1944c6d9f4f0252678e17e4120600a diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.FileListAbsolute.txt b/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f4fb3de --- /dev/null +++ b/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.FileListAbsolute.txt @@ -0,0 +1,79 @@ +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchFindReplace.exe.config +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchFindReplace.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchFindReplace.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Form1.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Properties.Resources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.CopyComplete +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\bin\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchFindReplace\bin\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchFindReplace.exe.config +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchFindReplace.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchFindReplace.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Form1.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Properties.Resources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.CopyComplete +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\de\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\en\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\de\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Form1.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\de\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\SearchFindReplace.exe.config +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\SearchFindReplace.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\SearchFindReplace.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\de\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\ReplaceString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\FormLanguageSwitch.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\ReplaceString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\de\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\en\ReplaceString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.Form1.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.Properties.Resources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.Form1.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\de\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.csproj.CopyComplete +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\FormLanguageSwitch.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\FormLanguageSwitch.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\bin\Debug\en\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Form1.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\en\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\bin\Debug\en\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.Form1.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\en\SearchFindReplace.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.AppResources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.AppResources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.AppResources.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.Properties.Resources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchFindReplace\obj\Debug\SearchFindReplace.Properties.Resources.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.AppResources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.AppResources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.AppResources.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Properties.Resources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchFindReplace\obj\Debug\SearchFindReplace.Properties.Resources.en.resources diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.GenerateResource.cache b/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.GenerateResource.cache new file mode 100644 index 0000000..59e0a93 Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.csproj.GenerateResource.cache differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.csprojAssemblyReference.cache b/SearchFindReplace/obj/Debug/SearchFindReplace.csprojAssemblyReference.cache new file mode 100644 index 0000000..34f86dc Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.csprojAssemblyReference.cache differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.exe b/SearchFindReplace/obj/Debug/SearchFindReplace.exe new file mode 100644 index 0000000..26fa98f Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.exe differ diff --git a/SearchFindReplace/obj/Debug/SearchFindReplace.pdb b/SearchFindReplace/obj/Debug/SearchFindReplace.pdb new file mode 100644 index 0000000..2af9051 Binary files /dev/null and b/SearchFindReplace/obj/Debug/SearchFindReplace.pdb differ diff --git a/SearchFindReplace/obj/Debug/TempPE/AppResources.Designer.cs.dll b/SearchFindReplace/obj/Debug/TempPE/AppResources.Designer.cs.dll new file mode 100644 index 0000000..3837be3 Binary files /dev/null and b/SearchFindReplace/obj/Debug/TempPE/AppResources.Designer.cs.dll differ diff --git a/SearchFindReplace/obj/Debug/TempPE/AppResources.de.Designer.cs.dll b/SearchFindReplace/obj/Debug/TempPE/AppResources.de.Designer.cs.dll new file mode 100644 index 0000000..46bbe1e Binary files /dev/null and b/SearchFindReplace/obj/Debug/TempPE/AppResources.de.Designer.cs.dll differ diff --git a/SearchFindReplace/obj/Debug/TempPE/AppResources.en.Designer.cs.dll b/SearchFindReplace/obj/Debug/TempPE/AppResources.en.Designer.cs.dll new file mode 100644 index 0000000..a385af8 Binary files /dev/null and b/SearchFindReplace/obj/Debug/TempPE/AppResources.en.Designer.cs.dll differ diff --git a/SearchFindReplace/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/SearchFindReplace/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll new file mode 100644 index 0000000..a816b9a Binary files /dev/null and b/SearchFindReplace/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/SearchFindReplace/obj/Debug/TempPE/Properties.Resources.en.Designer.cs.dll b/SearchFindReplace/obj/Debug/TempPE/Properties.Resources.en.Designer.cs.dll new file mode 100644 index 0000000..e6f2884 Binary files /dev/null and b/SearchFindReplace/obj/Debug/TempPE/Properties.Resources.en.Designer.cs.dll differ diff --git a/SearchFindReplace/obj/Debug/TempPE/Resources.Designer.cs.dll b/SearchFindReplace/obj/Debug/TempPE/Resources.Designer.cs.dll new file mode 100644 index 0000000..bb77832 Binary files /dev/null and b/SearchFindReplace/obj/Debug/TempPE/Resources.Designer.cs.dll differ diff --git a/SearchFindReplace/obj/Debug/de/SearchFindReplace.resources.dll b/SearchFindReplace/obj/Debug/de/SearchFindReplace.resources.dll new file mode 100644 index 0000000..1a357b1 Binary files /dev/null and b/SearchFindReplace/obj/Debug/de/SearchFindReplace.resources.dll differ diff --git a/SearchFindReplace/obj/Debug/en/SearchFindReplace.resources.dll b/SearchFindReplace/obj/Debug/en/SearchFindReplace.resources.dll new file mode 100644 index 0000000..68a69c7 Binary files /dev/null and b/SearchFindReplace/obj/Debug/en/SearchFindReplace.resources.dll differ diff --git a/SearchFindReplace/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/SearchFindReplace/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/SearchFindReplace/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/SearchFindReplace/obj/Release/SearchFindReplace.csprojAssemblyReference.cache b/SearchFindReplace/obj/Release/SearchFindReplace.csprojAssemblyReference.cache new file mode 100644 index 0000000..e84a176 Binary files /dev/null and b/SearchFindReplace/obj/Release/SearchFindReplace.csprojAssemblyReference.cache differ diff --git a/SearchString/AppResources.Designer.cs b/SearchString/AppResources.Designer.cs new file mode 100644 index 0000000..01e077b --- /dev/null +++ b/SearchString/AppResources.Designer.cs @@ -0,0 +1,118 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace Eugen.ESystem.Windows.Forms { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AppResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AppResources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SearchString.AppResources", typeof(AppResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Warnung ähnelt. + /// + internal static string messagebox001caption { + get { + return ResourceManager.GetString("messagebox001caption", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Eingabe unvollständig! + ///Bitte füllen Sie die Eingabefelder vollständig aus. ähnelt. + /// + internal static string messagebox001text { + get { + return ResourceManager.GetString("messagebox001text", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Information ähnelt. + /// + internal static string messagebox002caption { + get { + return ResourceManager.GetString("messagebox002caption", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Es wurde keine (weitere) Übereinstimmung gefunden. ähnelt. + /// + internal static string messagebox002text { + get { + return ResourceManager.GetString("messagebox002text", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Fehler ähnelt. + /// + internal static string messagebox003caption { + get { + return ResourceManager.GetString("messagebox003caption", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Es ist ein unbekannter Fehler passiert! ähnelt. + /// + internal static string messagebox003text { + get { + return ResourceManager.GetString("messagebox003text", resourceCulture); + } + } + } +} diff --git a/SearchString/AppResources.de.resx b/SearchString/AppResources.de.resx new file mode 100644 index 0000000..a7ac3a0 --- /dev/null +++ b/SearchString/AppResources.de.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Warnung + + + Eingabe unvollständig! +Bitte füllen Sie die Eingabefelder vollständig aus. + + + Information + + + Es wurde keine (weitere) Übereinstimmung gefunden. + + + Fehler + + + Es ist ein unbekannter Fehler passiert! + + \ No newline at end of file diff --git a/SearchString/AppResources.en.resx b/SearchString/AppResources.en.resx new file mode 100644 index 0000000..b75bb28 --- /dev/null +++ b/SearchString/AppResources.en.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Warning + + + Input incomplete! +Please fill out the input fields completely. + + + Information + + + No (further) match was found. + + + Error + + + An unknown error has occurred! + + \ No newline at end of file diff --git a/SearchString/AppResources.resx b/SearchString/AppResources.resx new file mode 100644 index 0000000..a7ac3a0 --- /dev/null +++ b/SearchString/AppResources.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Warnung + + + Eingabe unvollständig! +Bitte füllen Sie die Eingabefelder vollständig aus. + + + Information + + + Es wurde keine (weitere) Übereinstimmung gefunden. + + + Fehler + + + Es ist ein unbekannter Fehler passiert! + + \ No newline at end of file diff --git a/SearchString/Properties/AssemblyInfo.cs b/SearchString/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..972029c --- /dev/null +++ b/SearchString/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("SearchString")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SearchString")] +[assembly: AssemblyCopyright("Copyright © 2020 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("91ec8467-e4fc-44c7-8092-c3ae6ae75009")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SearchString/Search.Designer.cs b/SearchString/Search.Designer.cs new file mode 100644 index 0000000..560ce49 --- /dev/null +++ b/SearchString/Search.Designer.cs @@ -0,0 +1,116 @@ +namespace Eugen.ESystem.Windows.Forms +{ + partial class Search + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Search)); + this.groupBoxSearchAndFind = new System.Windows.Forms.GroupBox(); + this.buttonNextMatch = new System.Windows.Forms.Button(); + this.buttonPreviousMatch = new System.Windows.Forms.Button(); + this.checkBoxEntireWord = new System.Windows.Forms.CheckBox(); + this.checkBoxCase = new System.Windows.Forms.CheckBox(); + this.textBoxSearchString = new System.Windows.Forms.TextBox(); + this.labelSearchString = new System.Windows.Forms.Label(); + this.groupBoxSearchAndFind.SuspendLayout(); + this.SuspendLayout(); + // + // groupBoxSearchAndFind + // + resources.ApplyResources(this.groupBoxSearchAndFind, "groupBoxSearchAndFind"); + this.groupBoxSearchAndFind.Controls.Add(this.buttonNextMatch); + this.groupBoxSearchAndFind.Controls.Add(this.buttonPreviousMatch); + this.groupBoxSearchAndFind.Controls.Add(this.checkBoxEntireWord); + this.groupBoxSearchAndFind.Controls.Add(this.checkBoxCase); + this.groupBoxSearchAndFind.Controls.Add(this.textBoxSearchString); + this.groupBoxSearchAndFind.Controls.Add(this.labelSearchString); + this.groupBoxSearchAndFind.Name = "groupBoxSearchAndFind"; + this.groupBoxSearchAndFind.TabStop = false; + // + // buttonNextMatch + // + resources.ApplyResources(this.buttonNextMatch, "buttonNextMatch"); + this.buttonNextMatch.Name = "buttonNextMatch"; + this.buttonNextMatch.UseVisualStyleBackColor = true; + this.buttonNextMatch.Click += new System.EventHandler(this.buttonNextMatch_Click); + // + // buttonPreviousMatch + // + resources.ApplyResources(this.buttonPreviousMatch, "buttonPreviousMatch"); + this.buttonPreviousMatch.Name = "buttonPreviousMatch"; + this.buttonPreviousMatch.UseVisualStyleBackColor = true; + this.buttonPreviousMatch.Click += new System.EventHandler(this.buttonPreviousMatch_Click); + // + // checkBoxEntireWord + // + resources.ApplyResources(this.checkBoxEntireWord, "checkBoxEntireWord"); + this.checkBoxEntireWord.Name = "checkBoxEntireWord"; + this.checkBoxEntireWord.UseVisualStyleBackColor = true; + this.checkBoxEntireWord.CheckedChanged += new System.EventHandler(this.checkBoxEntireWord_CheckedChanged); + // + // checkBoxCase + // + resources.ApplyResources(this.checkBoxCase, "checkBoxCase"); + this.checkBoxCase.Name = "checkBoxCase"; + this.checkBoxCase.UseVisualStyleBackColor = true; + this.checkBoxCase.CheckedChanged += new System.EventHandler(this.checkBoxCase_CheckedChanged); + // + // textBoxSearchString + // + resources.ApplyResources(this.textBoxSearchString, "textBoxSearchString"); + this.textBoxSearchString.Name = "textBoxSearchString"; + this.textBoxSearchString.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxSearchString_KeyDown); + this.textBoxSearchString.Leave += new System.EventHandler(this.textBoxSearchString_Leave); + // + // labelSearchString + // + resources.ApplyResources(this.labelSearchString, "labelSearchString"); + this.labelSearchString.Name = "labelSearchString"; + // + // Search + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBoxSearchAndFind); + this.Name = "Search"; + this.groupBoxSearchAndFind.ResumeLayout(false); + this.groupBoxSearchAndFind.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBoxSearchAndFind; + private System.Windows.Forms.Button buttonNextMatch; + private System.Windows.Forms.Button buttonPreviousMatch; + private System.Windows.Forms.CheckBox checkBoxEntireWord; + private System.Windows.Forms.CheckBox checkBoxCase; + private System.Windows.Forms.TextBox textBoxSearchString; + private System.Windows.Forms.Label labelSearchString; + } +} diff --git a/SearchString/Search.cs b/SearchString/Search.cs new file mode 100644 index 0000000..a906281 --- /dev/null +++ b/SearchString/Search.cs @@ -0,0 +1,763 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Eugen.ESystem.Windows.Forms +{ + public partial class Search : UserControl + { + #region Version und Copyright + // Version und Copyright + string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region DLL-Info + /// + /// Contains the name of the program file + /// + public static string DllName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string DllVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetDllInfo() + { + //Name, Version und Copyright setzen + DllName = dllName; + DllVersion = dllVersion; + Copyright = copyright; + } + #endregion + + /// + /// Searches for a string in text + /// + public Search() + { + InitializeComponent(); + SetDllInfo(); + FirstCall = false; + } + + #region GlobaleVariablen + protected static string SearchText { set; get; } + protected static string SearchString { set; get; } + protected static int SearchStringLength { set; get; } + protected static bool NoCaseSensitve { set; get; } + protected static bool OnlyEntireWord { set; get; } + protected static int Index { set; get; } + /// + /// Contains the current cursor position + /// + protected static int CurrentCursorPosition { set; get; } + /// + /// Contains a list with all found positions + /// + protected static List AllPositions { set; get; } + /// + /// Says whether the call was made for the first time + /// + protected bool FirstCall { set; get; } + /// + /// Is true if an error has occurred + /// + public bool Error { private set; get; } + #endregion + + #region Public Methodes + /// + /// Searches the specified search string in the search text. + /// + public void SearchAndFindString() + { + Error = false; + + string searchText = SearchText; + string searchString = SearchString; + + if (NoCaseSensitve) + { + //Groß-/Kleinschreibung ignorieren + searchText = searchText.ToLower(); + searchString = searchString.ToLower(); + } + + if (!String.IsNullOrEmpty(searchString) && searchText.Contains(searchString)) + { + AllPositions = Positions(searchText, searchString); + + if (AllPositions.Count == 0) + { + Error = true; //Es wurde keine Übereinstimmung gefunden + } + } + else + { + Error = true; + } + + if (!Error) + { + if (Index > AllPositions.Count - 1) + { + CurrentCursorPosition = AllPositions[AllPositions.Count - 1]; + } + else + { + CurrentCursorPosition = AllPositions[Index]; + } + + //Bekanntgeben, dass ein Suchstring gefunden wurde + OnRefreshDisplay(CurrentCursorPosition, SearchStringLength); + } + else + { + //Cursor an die erste Position setzen + CurrentCursorPosition = 0; + //SearchString = ""; + //SearchStringLength = 0; + + //Suchstring wurde nicht gefunden + throw new StringNotMatchException(); + } + } + + /// + /// Searches and selects the specified search string in the search text. + /// + public void SearchAndSelect() + { + try + { + StartSearch(SearchText, SearchString, NoCaseSensitve, OnlyEntireWord); + if (!Error) + { + //Bekanntgeben, dass ein Suchstring gefunden wurde + OnRefreshDisplay(CurrentCursorPosition, SearchStringLength); + } + } + catch (StringNotMatchException) + { + //Cursor an die erste Position setzen + ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception) + { + //Cursor an die erste Position setzen + CurrentCursorPosition = 0; + SearchString = ""; + SearchStringLength = 0; + + MessageBox.Show(AppResources.messagebox003text, AppResources.messagebox003caption, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + /// + /// Sets the text to be searched. + /// + /// A valid string. + public void SetSearchText(string searchText) + { + SearchText = searchText; + } + + /// + /// Get the text to be searched. + /// + /// Returns a string. + public string GetSearchText() + { + return SearchText; + } + + /// + /// Sets the search string. + /// + public void SetSearchString() + { + SearchString = textBoxSearchString.Text; + } + + /// + /// Sets the search string. + /// + /// A valid string. + public void SetSearchString(string searchString) + { + SearchString = searchString; + } + + /// + /// Deletes the search string. + /// + public void ClearSearchString() + { + //textBoxSearchString.Clear(); + //SearchString = textBoxSearchString.Text; + //textBoxSearchString.Refresh(); + SearchStringLength = 0; + CurrentCursorPosition = 0; + if (AllPositions != null) + { + AllPositions.Clear(); + } + } + + /// + /// Get the search string. + /// + /// Returns a string. + public string GetSearchString() + { + return SearchString; + } + + /// + /// Sets the Search string length. + /// + /// A valid int value. + public void SetSearchStringLength(int searchStringLength) + { + SearchStringLength = searchStringLength; + } + + /// + /// Get the Search string length. + /// + /// Returns a int value. + public int GetSearchStringLength() + { + return SearchStringLength; + } + + /// + /// Sets the position for a found value in the array + /// + /// A valid int value. Must be smaller / equal to the maximum number of elements. + public void SetIndex(int index) + { + Index = index; + } + + /// + /// Get the position for a found value in the array + /// + /// Returns a int value. + public int GetIndex() + { + return Index; + } + + /// + /// Sets the current cursor position in the search text. + /// + /// A valid int value. + public void SetCurrentCursorPosition(int currentCursorPosition) + { + CurrentCursorPosition = currentCursorPosition; + } + + /// + /// Get the current cursor position in the search text. + /// + /// Returns a int value. + public int GetCurrentCursorPosition() + { + return CurrentCursorPosition; + } + + /// + /// Returns all positions where the search string was found in the search text. + /// + /// Returns a int list. + public List GetAllPositions() + { + return AllPositions; + } + + public int GetAllPositionsCount() + { + if (AllPositions == null) + { + return 0; + } + else + { + return AllPositions.Count(); + } + } + #endregion + + #region Private Methodes + private void SetValues(string searchText, string searchString, bool noCaseSensitve, bool onlyEntireWord) + { + SearchString = textBoxSearchString.Text; + SearchStringLength = SearchString.Length; + NoCaseSensitve = checkBoxCase.Checked; + OnlyEntireWord = checkBoxEntireWord.Checked; + } + + private bool IsInputOK() + { + if (!String.IsNullOrEmpty(SearchString) && !String.IsNullOrEmpty(textBoxSearchString.Text)) + { + return true; //Sind beide Werte vorhanden, dann ist Alles OK + } + else + { + if (!String.IsNullOrEmpty(textBoxSearchString.Text)) //Wenn ein Wert in der Textbox steht, aber noch nicht Return/Enter gedrückt wurde + { + SearchString = textBoxSearchString.Text; + FirstCall = true; //Wenn "Next match" ausgewählt wurde, dann soll immer das erste Vorkommen, bei "Previous match" immer das letzte Vorkommen ausgewählt werden + try + { + SearchAndFindString(); + } + catch (StringNotMatchException) + { + ClearSearchString(); + OnRefreshDisplay(CurrentCursorPosition, SearchStringLength); //Anzeige aktualisieren + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + return true; + } + else + { + return false; //Wenn die Eingabe unvollständig ist + } + } + } + + private void StartSearch(string searchText, string searchString, bool noCaseSensitve, bool onlyEntireWord) + { + SearchText = searchText; + SearchString = searchString; + SearchStringLength = searchString.Length; + NoCaseSensitve = noCaseSensitve; + OnlyEntireWord = onlyEntireWord; + + SearchEntities(); + if (!Error) + { + //Index = 0; + if (Index > AllPositions.Count - 1) + { + Index = AllPositions.Count - 1; + } + CurrentCursorPosition = AllPositions[Index]; + } + else + { + //Suchstring wurde nicht gefunden + throw new StringNotMatchException(); + } + } + + private void SearchEntities() + { + Error = false; + + string searchText = SearchText; + string searchString = SearchString; + + if (NoCaseSensitve) + { + //Groß-/Kleinschreibung ignorieren + searchText = searchText.ToLower(); + searchString = searchString.ToLower(); + } + + if (!String.IsNullOrEmpty(searchString) && searchText.Contains(searchString)) + { + AllPositions = Positions(searchText, searchString); + } + else + { + Error = true; + } + } + + private List Positions(string searchText, string searchString) + { + //Von allen Vorkommen des Suchstrings im Suchtext die Startposition ermitteln + List positions = new List(); + + if (String.IsNullOrEmpty(searchText) || String.IsNullOrEmpty(searchString)) + { + return positions; + } + + int position = 0; + int currentPos = 0; + + while (searchText.Contains(searchString)) + { + if (OnlyEntireWord) + { + //Nur ganzes Wort suchen + currentPos = IndexOfWord(searchText, searchString); + } + else + { + //Suchstring suchen + currentPos = searchText.IndexOf(searchString); + } + + if (currentPos == -1) + { + break; + } + else + { + position += currentPos; + positions.Add(position); + position += searchString.Length; + + searchText = searchText.Remove(0, currentPos + searchString.Length); + } + } + + return positions; + } + + private Regex myRegex; + + private int IndexOfWord(string myString, string myWord) + { + myRegex = new Regex("\\b" + Regex.Escape(myWord) + "\\b", RegexOptions.Compiled); + + Match mtch = myRegex.Match(myString); + + if (mtch.Success) + return mtch.Index; + else + return -1; + } + + private void NextMatch() + { + if (IsInputOK()) + { + if (!FirstCall) + { + Next(); //Nur ausführen, wenn es nicht der erste Aufruf über "Next match" ist + } + else + { + FirstCall = false; //Beim ersten Aufruf wird immer dar erste gefundene Suchstring ausgewählt + } + + Refresh(); + } + else + { + throw new IncompleteInputException(); + } + } + + private void Next() + { + if (AllPositions != null && AllPositions.Count > 0) + { + if (Index < AllPositions.Count - 1) + { + Index++; + } + else + { + Index = 0; + } + + CurrentCursorPosition = AllPositions[Index]; + + //Bekanntgeben, dass ein Suchstring gefunden wurde + OnRefreshDisplay(CurrentCursorPosition, SearchStringLength); + } + else + { + //Suchstring wurde nicht gefunden + throw new StringNotMatchException(); + } + } + + private void PreviousMatch() + { + if (IsInputOK()) + { + Previous(); + } + else + { + throw new IncompleteInputException(); + } + } + + private void Previous() + { + if (AllPositions != null && AllPositions.Count > 0) + { + if (Index > 0) + { + Index--; + } + else + { + Index = AllPositions.Count - 1; + } + + if (Index > AllPositions.Count - 1) + { + CurrentCursorPosition = AllPositions[AllPositions.Count - 1]; + } + else + { + CurrentCursorPosition = AllPositions[Index]; + } + + //Bekanntgeben, dass sich die Position geändert hat + OnRefreshDisplay(CurrentCursorPosition, SearchStringLength); + } + else + { + //Suchstring wurde nicht gefunden + throw new StringNotMatchException(); + } + } + #endregion + + #region Event + // Der Delegat muß die gleiche Signatur aufweisen wie die Eventhandler-Methode. + public delegate void RefreshDelegate(int currentCursorPosition, int searchStringLenght); + + // Das Event-Objekt ist vom Typ dieses Delegaten. + public event RefreshDelegate RefreshDisplay; + + public void OnRefreshDisplay(int currentCursorPosition, int searchStringLength) + { + // Prüft ob das Event überhaupt einen Abonnenten hat. + RefreshDisplay?.Invoke(currentCursorPosition, searchStringLength); + } + + // Der Delegat muß die gleiche Signatur aufweisen wie die Eventhandler-Methode. + public delegate void InputChangedDelegate(); + + // Das Event-Objekt ist vom Typ dieses Delegaten. + public event InputChangedDelegate InputChanged; + + public void OnInputChanged() + { + // Prüft ob das Event überhaupt einen Abonnenten hat. + InputChanged?.Invoke(); + } + #endregion + + private void checkBoxCase_CheckedChanged(object sender, EventArgs e) + { + NoCaseSensitve = checkBoxCase.Checked; + + if (IsInputOK()) + { + SearchAndSelect(); + OnInputChanged(); + } + } + + private void checkBoxEntireWord_CheckedChanged(object sender, EventArgs e) + { + OnlyEntireWord = checkBoxEntireWord.Checked; + + if (IsInputOK()) + { + try + { + SearchString = textBoxSearchString.Text; + SearchStringLength = SearchString.Length; + SearchAndFindString(); + OnInputChanged(); + } + catch (StringNotMatchException) + { + ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + } + + private void textBoxSearchString_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + try + { + SetValues(SearchText, textBoxSearchString.Text, checkBoxCase.Checked, checkBoxEntireWord.Checked); + SearchAndFindString(); + OnInputChanged(); + } + catch (StringNotMatchException) + { + ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + } + + private void buttonNextMatch_Click(object sender, EventArgs e) + { + try + { + SearchString = textBoxSearchString.Text; + SearchStringLength = SearchString.Length; + SearchAndFindString(); + OnInputChanged(); + NextMatch(); + } + catch (IncompleteInputException) + { + MessageBox.Show(AppResources.messagebox001text, AppResources.messagebox001caption, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + catch (StringNotMatchException) + { + ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void buttonPreviousMatch_Click(object sender, EventArgs e) + { + try + { + SearchString = textBoxSearchString.Text; + SearchStringLength = SearchString.Length; + SearchAndFindString(); + OnInputChanged(); + PreviousMatch(); + } + catch (IncompleteInputException) + { + MessageBox.Show(AppResources.messagebox001text, AppResources.messagebox001caption, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + catch (StringNotMatchException) + { + ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void textBoxSearchString_Leave(object sender, EventArgs e) + { + if (!String.IsNullOrEmpty(textBoxSearchString.Text)) + { + SearchString = textBoxSearchString.Text; + + try + { + SearchAndFindString(); + OnInputChanged(); + } + catch (Exception) + { + ClearSearchString(); + MessageBox.Show(AppResources.messagebox002text, AppResources.messagebox002caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + } + } + + #region Exceptions + public class StringNotMatchException : Exception + { + public StringNotMatchException() { } + + public StringNotMatchException(string message) + : base(message) { } + + public StringNotMatchException(string message, Exception inner) + : base(message, inner) { } + } + + public class IncompleteInputException : Exception + { + public IncompleteInputException() { } + + public IncompleteInputException(string message) + : base(message) { } + + public IncompleteInputException(string message, Exception inner) + : base(message, inner) { } + } + #endregion +} diff --git a/SearchString/Search.de.resx b/SearchString/Search.de.resx new file mode 100644 index 0000000..c6cfba6 --- /dev/null +++ b/SearchString/Search.de.resx @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Nächster Treffer + + + Vorheriger Treffer + + + + 88, 17 + + + Ganzes Wort + + + 181, 17 + + + Groß-/Kleinschreibung ignorieren + + + 65, 13 + + + Suche nach + + + Suchen + + \ No newline at end of file diff --git a/SearchString/Search.en.resx b/SearchString/Search.en.resx new file mode 100644 index 0000000..d2e4fe5 --- /dev/null +++ b/SearchString/Search.en.resx @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Next match + + + Previous match + + + + 79, 17 + + + Entire word + + + 142, 17 + + + Ignore upper/lower case + + + 56, 13 + + + Search for + + + Search + + \ No newline at end of file diff --git a/SearchString/Search.resx b/SearchString/Search.resx new file mode 100644 index 0000000..1f574d1 --- /dev/null +++ b/SearchString/Search.resx @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Top, Bottom, Left, Right + + + Bottom, Right + + + + 284, 91 + + + 100, 23 + + + + 5 + + + Nächster Treffer + + + buttonNextMatch + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSearchAndFind + + + 0 + + + Bottom, Left + + + 6, 91 + + + 100, 23 + + + 4 + + + Vorheriger Treffer + + + buttonPreviousMatch + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSearchAndFind + + + 1 + + + True + + + 6, 68 + + + 88, 17 + + + 3 + + + Ganzes Wort + + + checkBoxEntireWord + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSearchAndFind + + + 2 + + + True + + + 6, 45 + + + 181, 17 + + + 2 + + + Groß-/Kleinschreibung ignorieren + + + checkBoxCase + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSearchAndFind + + + 3 + + + Top, Left, Right + + + 89, 19 + + + 295, 20 + + + 1 + + + textBoxSearchString + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSearchAndFind + + + 4 + + + True + + + 3, 22 + + + 65, 13 + + + 0 + + + Suche nach + + + labelSearchString + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSearchAndFind + + + 5 + + + 0, 0 + + + 250, 120 + + + 390, 120 + + + 0 + + + Suchen + + + groupBoxSearchAndFind + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 250, 120 + + + 390, 120 + + + Search + + + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SearchString/SearchString.csproj b/SearchString/SearchString.csproj new file mode 100644 index 0000000..db21bcd --- /dev/null +++ b/SearchString/SearchString.csproj @@ -0,0 +1,82 @@ + + + + + Debug + AnyCPU + {91EC8467-E4FC-44C7-8092-C3AE6AE75009} + Library + Properties + SearchString + SearchString + v4.7.2 + 512 + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + True + True + AppResources.resx + + + + UserControl + + + Search.cs + + + + + Eugen.ESystem.Windows.Forms + + + Eugen.ESystem.Windows.Forms + + + ResXFileCodeGenerator + AppResources.Designer.cs + Eugen.ESystem.Windows.Forms + + + Search.cs + + + Search.cs + + + Search.cs + + + + \ No newline at end of file diff --git a/SearchString/bin/Debug/SearchString.dll b/SearchString/bin/Debug/SearchString.dll new file mode 100644 index 0000000..68ff63c Binary files /dev/null and b/SearchString/bin/Debug/SearchString.dll differ diff --git a/SearchString/bin/Debug/SearchString.pdb b/SearchString/bin/Debug/SearchString.pdb new file mode 100644 index 0000000..1e01baa Binary files /dev/null and b/SearchString/bin/Debug/SearchString.pdb differ diff --git a/SearchString/bin/Debug/de/SearchString.resources.dll b/SearchString/bin/Debug/de/SearchString.resources.dll new file mode 100644 index 0000000..70ac1f8 Binary files /dev/null and b/SearchString/bin/Debug/de/SearchString.resources.dll differ diff --git a/SearchString/bin/Debug/en/SearchString.resources.dll b/SearchString/bin/Debug/en/SearchString.resources.dll new file mode 100644 index 0000000..77011e5 Binary files /dev/null and b/SearchString/bin/Debug/en/SearchString.resources.dll differ diff --git a/SearchString/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/SearchString/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/SearchString/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/SearchString/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/SearchString/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..9bc3f46 Binary files /dev/null and b/SearchString/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/SearchString/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/SearchString/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..55cb7bf Binary files /dev/null and b/SearchString/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.de.resources b/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.de.resources new file mode 100644 index 0000000..4d42754 Binary files /dev/null and b/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.de.resources differ diff --git a/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.en.resources b/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.en.resources new file mode 100644 index 0000000..ff219c7 Binary files /dev/null and b/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.en.resources differ diff --git a/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.resources b/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.resources new file mode 100644 index 0000000..3d86a51 Binary files /dev/null and b/SearchString/obj/Debug/Eugen.ESystem.Windows.Forms.Search.resources differ diff --git a/SearchString/obj/Debug/SearchString.AppResources.de.resources b/SearchString/obj/Debug/SearchString.AppResources.de.resources new file mode 100644 index 0000000..2cb8214 Binary files /dev/null and b/SearchString/obj/Debug/SearchString.AppResources.de.resources differ diff --git a/SearchString/obj/Debug/SearchString.AppResources.en.resources b/SearchString/obj/Debug/SearchString.AppResources.en.resources new file mode 100644 index 0000000..52948bf Binary files /dev/null and b/SearchString/obj/Debug/SearchString.AppResources.en.resources differ diff --git a/SearchString/obj/Debug/SearchString.AppResources.resources b/SearchString/obj/Debug/SearchString.AppResources.resources new file mode 100644 index 0000000..2cb8214 Binary files /dev/null and b/SearchString/obj/Debug/SearchString.AppResources.resources differ diff --git a/SearchString/obj/Debug/SearchString.csproj.CoreCompileInputs.cache b/SearchString/obj/Debug/SearchString.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..4e003cf --- /dev/null +++ b/SearchString/obj/Debug/SearchString.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +27429f32d546ddbd268f7336dc58492b1d89240a diff --git a/SearchString/obj/Debug/SearchString.csproj.FileListAbsolute.txt b/SearchString/obj/Debug/SearchString.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5ce36fa --- /dev/null +++ b/SearchString/obj/Debug/SearchString.csproj.FileListAbsolute.txt @@ -0,0 +1,42 @@ +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\obj\Debug\SearchString.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\obj\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\obj\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\obj\Debug\SearchString.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\obj\Debug\Eugen.ESystem.Windows.Forms.Search.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_PROJEKTE\SearchFindReplace.git\SearchString\obj\Debug\SearchString.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\Eugen.ESystem.Windows.Forms.Search.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\bin\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\bin\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.AppResources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.AppResources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.AppResources.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\Eugen.ESystem.Windows.Forms.Search.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\Eugen.ESystem.Windows.Forms.Search.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplace.git\SearchString\obj\Debug\SearchString.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\bin\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\bin\Debug\SearchString.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\bin\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\bin\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.AppResources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\Eugen.ESystem.Windows.Forms.Search.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.AppResources.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.AppResources.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\Eugen.ESystem.Windows.Forms.Search.de.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\Eugen.ESystem.Windows.Forms.Search.en.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\de\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\en\SearchString.resources.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_USER CONTROL\SearchFindReplaceV2.git\SearchString\obj\Debug\SearchString.pdb diff --git a/SearchString/obj/Debug/SearchString.csproj.GenerateResource.cache b/SearchString/obj/Debug/SearchString.csproj.GenerateResource.cache new file mode 100644 index 0000000..8a38103 Binary files /dev/null and b/SearchString/obj/Debug/SearchString.csproj.GenerateResource.cache differ diff --git a/SearchString/obj/Debug/SearchString.csprojAssemblyReference.cache b/SearchString/obj/Debug/SearchString.csprojAssemblyReference.cache new file mode 100644 index 0000000..6deee44 Binary files /dev/null and b/SearchString/obj/Debug/SearchString.csprojAssemblyReference.cache differ diff --git a/SearchString/obj/Debug/SearchString.dll b/SearchString/obj/Debug/SearchString.dll new file mode 100644 index 0000000..68ff63c Binary files /dev/null and b/SearchString/obj/Debug/SearchString.dll differ diff --git a/SearchString/obj/Debug/SearchString.pdb b/SearchString/obj/Debug/SearchString.pdb new file mode 100644 index 0000000..1e01baa Binary files /dev/null and b/SearchString/obj/Debug/SearchString.pdb differ diff --git a/SearchString/obj/Debug/TempPE/AppResources.Designer.cs.dll b/SearchString/obj/Debug/TempPE/AppResources.Designer.cs.dll new file mode 100644 index 0000000..cb276f4 Binary files /dev/null and b/SearchString/obj/Debug/TempPE/AppResources.Designer.cs.dll differ diff --git a/SearchString/obj/Debug/de/SearchString.resources.dll b/SearchString/obj/Debug/de/SearchString.resources.dll new file mode 100644 index 0000000..70ac1f8 Binary files /dev/null and b/SearchString/obj/Debug/de/SearchString.resources.dll differ diff --git a/SearchString/obj/Debug/en/SearchString.resources.dll b/SearchString/obj/Debug/en/SearchString.resources.dll new file mode 100644 index 0000000..77011e5 Binary files /dev/null and b/SearchString/obj/Debug/en/SearchString.resources.dll differ diff --git a/SearchString/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/SearchString/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/SearchString/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]