//源文件替换选项卡 private void tabControl3_Selecting(object sender, TabControlCancelEventArgs e) { //源文件替换 选项卡 if (e.TabPageIndex == 5) { foreach (Utility.NavigationRuleItem item in livNavigationRule.SelectedItems) { FrmReplace r = new FrmReplace(item.rule.Replacements); r.Text = "源文件替换"; r.ShowDialog(); item.rule.Replacements = r.Replace; } this.tabControl3.SelectedIndex = this.tabControl3.SelectedIndex - 1; } }
//采集结果替换 private void tabControl4_Selecting(object sender, TabControlCancelEventArgs e) { //采集结果替换 if (e.TabPageIndex == 4) { //"采集结果替换" foreach (Utility.ExtractionRulesItem item in LivExtractionRule.SelectedItems) { FrmReplace r = new FrmReplace(item.rule.Replacements); r.Text = "采集结果替换"; r.ShowDialog(); item.rule.Replacements = r.Replace; } this.tabControl4.SelectedIndex = this.tabControl4.SelectedIndex - 1; } }