public ScenarioFindReplaceResultsForm(FindReplaceScriptEditor find_replaceScriptEditor) { InitializeComponent(); this.find_replaceScriptEditor = find_replaceScriptEditor; this.SelectRecordCondition = find_replaceScriptEditor.SelectRecordCondition; this.SelectFieldCondition = find_replaceScriptEditor.SelectFieldCondition; this.SelectSubfieldCondition = find_replaceScriptEditor.SelectSubfieldCondition; this.FindTextStr = find_replaceScriptEditor.FindTextString; this.ReplaceTextStr = find_replaceScriptEditor.ReplaceTextString; workMode = (WorkMode)find_replaceScriptEditor.activeTabIndex; templateMode = (TemplateMode)find_replaceScriptEditor.cmbTemplateType.SelectedIndex; applyActions = new StringCollection(); applyActions.Add("ПОДТВЕРДИТЬ"); applyActions.Add("ОТМЕНИТЬ"); applyActionsToAll = new StringCollection(); applyActionsToAll.Add("ПОДТВЕРДИТЬ ВСЕ"); applyActionsToAll.Add("ОТМЕНИТЬ ВСЕ"); ScriptEngine = new EcmaScriptComponent(); RemObjectUtils.ExposeAssembly(ScriptEngine, typeof(ManagedClient.ManagedClient64).Assembly); ScriptEngine.Globals.SetVariable("client", find_replaceScriptEditor.client); ScriptEngine.Globals.SetVariable("curDatabase", find_replaceScriptEditor.curDatabase); }
private static void ShowScenarioFindReplaceDialog(ExtractedValue recordsData) { FindReplaceScriptEditor find_replaceScriptEditor = new FindReplaceScriptEditor(recordsData); if (find_replaceScriptEditor.ShowDialog() == DialogResult.OK) { ScenarioFindReplaceResultsForm scenarioFindReplaceResultsForm = new ScenarioFindReplaceResultsForm(find_replaceScriptEditor); scenarioFindReplaceResultsForm.ShowDialog(); } if (find_replaceScriptEditor.client != null) { find_replaceScriptEditor.client.Disconnect(); } }