private void mAdd_Click(object sender, EventArgs e) { var newRule = new DomainRule(); if (newRule.ShowEditorDialog(this) == DialogResult.OK) { Rules.Instance.AddDomainRule(newRule); SaveAndUpdateList(); mRules.SelectedObject = newRule; } }
internal static void ShowAddDomainRule(string url) { var newRule = new DomainRule { DomainSuffix = Rules.GetDomain(url), Language = InputLanguage.CurrentInputLanguage }; if (newRule.ShowEditorDialog(sCurrentConfigDialog) == DialogResult.OK) { Rules.Instance.AddDomainRule(newRule); if (sCurrentConfigDialog != null) { sCurrentConfigDialog.SaveAndUpdateList(); } else { Rules.Instance.Save(); } } }