public FindAndReplaceSettings(Settings settings) { _settings = settings; Reload(); }
internal static void CommandMenuInit() { _settings = new Settings(IniFilePath); _showTabBarIcons = _settings.GetBool(SettingsSection.Global, "ShowTabBarIcons", true); FindAndReplace.MatchCase = _settings.GetBool(SettingsSection.FindAndReplace, "MatchCase", false); FindAndReplace.MatchWholeWord = _settings.GetBool(SettingsSection.FindAndReplace, "MatchWholeWord", false); FindAndReplace.SearchBackwards = _settings.GetBool(SettingsSection.FindAndReplace, "SearchBackwards", false); FindAndReplace.SearchFromBegining = _settings.GetBool(SettingsSection.FindAndReplace, "SearchFromBegining", false); FindAndReplace.UseRegularExpression = _settings.GetBool(SettingsSection.FindAndReplace, "UseRegularExpression", false); var findHistory = _settings.Get(SettingsSection.FindAndReplace, "FindHistory", null); if (!string.IsNullOrEmpty(findHistory)) FindAndReplace.FindHistory = new List<string>(Deserialise(findHistory)); var replaceHistory = _settings.Get(SettingsSection.FindAndReplace, "ReplaceHistory", null); if (!string.IsNullOrEmpty(replaceHistory)) FindAndReplace.ReplaceHistory = new List<string>(Deserialise(replaceHistory)); SetCommand((int)CmdIndex.IndentationSettings, "Change indentation settings", IndentationSettings.Show); SetCommand((int)CmdIndex.FindAndReplace, "Multiline find and replace", FindAndReplace.Show, new ShortcutKey(false, true, true, Keys.F)); SetCommand((int)CmdIndex.Seperator1, "---", null); SetCommand((int)CmdIndex.GenerateGuid, "Generate GUID", Helpers.GenerateGuid); SetCommand((int)CmdIndex.GenerateLoremIpsum, "Generate Lorem Ipsum", Helpers.GenerateLoremIpsum); SetCommand((int)CmdIndex.ComputeMD5Hash, "Compute MD5 hash", Helpers.ComputeMD5Hash); SetCommand((int)CmdIndex.ComputeSHA1Hash, "Compute SHA1 hash", Helpers.ComputeSHA1Hash); SetCommand((int)CmdIndex.Base64Encode, "Base 64 encode", Helpers.Base64Encode); SetCommand((int)CmdIndex.Base64Decode, "Base 64 decode", Helpers.Base64Decode); SetCommand((int)CmdIndex.Seperator2, "---", null); SetCommand((int)CmdIndex.OpenConfigFile, "Open config file", OpenConfigFile); SetCommand((int)CmdIndex.About, "About", About); }
internal static void CommandMenuInit() { _settings = new Settings(IniFilePath); _showTabBarIcons = _settings.GetBool(SettingsSection.Global, "ShowTabBarIcons", true); FindAndReplace.Settings = new FindAndReplaceSettings(_settings); SetCommand((int)CmdIndex.IndentationSettings, "Change indentation settings", IndentationSettings.Show, new ShortcutKey(false, true, true, Keys.I)); SetCommand((int)CmdIndex.FindAndReplace, "Multiline find and replace", FindAndReplace.Show, new ShortcutKey(false, true, true, Keys.F)); SetCommand((int)CmdIndex.Seperator1, "---", null); SetCommand((int)CmdIndex.GenerateGuid, "Generate GUID", GuidGenerator.Show, new ShortcutKey(false, true, true, Keys.G)); SetCommand((int)CmdIndex.GenerateLoremIpsum, "Generate Lorem Ipsum", Helpers.GenerateLoremIpsum); SetCommand((int)CmdIndex.ComputeMD5Hash, "Compute MD5 hash", Helpers.ComputeMD5Hash); SetCommand((int)CmdIndex.ComputeSHA1Hash, "Compute SHA1 hash", Helpers.ComputeSHA1Hash); SetCommand((int)CmdIndex.Base64Encode, "Base 64 encode", Helpers.Base64Encode); SetCommand((int)CmdIndex.Base64Decode, "Base 64 decode", Helpers.Base64Decode); SetCommand((int)CmdIndex.Seperator2, "---", null); SetCommand((int)CmdIndex.OpenConfigFile, "Open config file", OpenConfigFile); SetCommand((int)CmdIndex.About, "About", About); }