private void button_unionCatalog_findDp2Server_Click(object sender, EventArgs e) { dp2SearchForm dp2_searchform = this.MainForm.GetDp2SearchForm(); GetDp2ResDlg dlg = new GetDp2ResDlg(); GuiUtil.SetControlFont(dlg, this.Font); dlg.Text = "请指定要绑定的 dp2library 服务器名"; #if OLD_CHANNEL dlg.dp2Channels = dp2_searchform.Channels; #endif dlg.ChannelManager = this.MainForm; dlg.Servers = this.MainForm.Servers; dlg.EnabledIndices = new int[] { dp2ResTree.RESTYPE_SERVER }; dlg.Path = this.textBox_unionCatalog_bindingDp2ServerName.Text; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) { return; } this.textBox_unionCatalog_bindingDp2ServerName.Text = dlg.Path; }
private void button_findServerName_Click(object sender, EventArgs e) { GetDp2ResDlg dlg = new GetDp2ResDlg(); GuiUtil.SetControlFont(dlg, this.Font); dlg.Text = "请指定一个作为查重目标的 dp2library 服务器"; #if OLD_CHANNEL dlg.dp2Channels = this.Channels; #endif dlg.ChannelManager = Program.MainForm; dlg.Servers = this.MainForm.Servers; dlg.EnabledIndices = new int[] { dp2ResTree.RESTYPE_SERVER }; dlg.Path = this.textBox_serverName.Text; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) { return; } this.textBox_serverName.Text = dlg.Path; }
// 获得缺省查重起点路径 private void button_dp2library_searchDup_findDefaultStartPath_Click(object sender, EventArgs e) { string strError = ""; dp2SearchForm dp2_searchform = this.MainForm.GetDp2SearchForm(); if (dp2_searchform == null) { strError = "无法获得打开的 dp2检索窗,无法获得 dp2library 数据库名"; goto ERROR1; } string strDefaultStartPath = Global.GetForwardStyleDp2Path(this.textBox_dp2library_searchDup_defaultStartPath.Text); // 临时指定一个dp2library服务器和数据库 GetDp2ResDlg dlg = new GetDp2ResDlg(); GuiUtil.SetControlFont(dlg, this.Font); dlg.Text = "请指定一个 dp2library 数据库,以作为模拟的查重起点"; #if OLD_CHANNEL dlg.dp2Channels = dp2_searchform.Channels; #endif dlg.ChannelManager = Program.MainForm; dlg.Servers = this.MainForm.Servers; dlg.EnabledIndices = new int[] { dp2ResTree.RESTYPE_DB }; dlg.Path = strDefaultStartPath; this.MainForm.AppInfo.LinkFormState(dlg, "searchdup_selectstartpath_dialog_state"); dlg.ShowDialog(this); this.MainForm.AppInfo.UnlinkFormState(dlg); if (dlg.DialogResult != DialogResult.OK) { return; } strDefaultStartPath = Global.GetBackStyleDp2Path(dlg.Path + "/?"); this.textBox_dp2library_searchDup_defaultStartPath.Text = strDefaultStartPath; return; ERROR1: MessageBox.Show(this, strError); }