void menuItem_property_Click(object sender, EventArgs e) { TreeNode node = this.SelectedNode; if (node == null) { MessageBox.Show(this, "尚未选择节点"); return; } if (IsServer(node) == true) { OaiServerPropertyForm dlg = new OaiServerPropertyForm(); GuiUtil.SetControlFont(dlg, this.Font); dlg.XmlNode = TreeNodeInfo.GetXmlNode(node); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult == DialogResult.OK) { this.Changed = true; node.Text = dlg.ServerName; TreeNodeInfo info = (TreeNodeInfo)node.Tag; info.Name = dlg.ServerName; /* // 显示下面的数据库节点 RefreshDatabaseNames(node); node.Expand(); * */ if (this.OnServerChanged != null) { ServerChangedEventArgs e1 = new ServerChangedEventArgs(); e1.TreeNode = node; this.OnServerChanged(this, e1); } if (node.ImageIndex == TYPE_SERVER_ONLINE) MessageBox.Show(this, "注意:(当前OAI服务器处于已联机状态。) 对OAI服务器属性参数的修改,要在下一次连接中才能生效。\r\n\r\n为使参数立即生效,可断开连接,然后重新进行检索操作。"); } } if (node.ImageIndex == TYPE_DIR) { ZDirPopertyForm dlg = new ZDirPopertyForm(); GuiUtil.SetControlFont(dlg, this.Font); dlg.XmlNode = TreeNodeInfo.GetXmlNode(node); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult == DialogResult.OK) { this.Changed = true; node.Text = dlg.DirName; TreeNodeInfo info = (TreeNodeInfo)node.Tag; info.Name = dlg.DirName; } } }
void menuItem_property_Click(object sender, EventArgs e) { TreeNode node = this.SelectedNode; if (node == null) { MessageBox.Show(this, "尚未选择节点"); return; } if (IsServer(node) == true) { OaiServerPropertyForm dlg = new OaiServerPropertyForm(); GuiUtil.SetControlFont(dlg, this.Font); dlg.XmlNode = TreeNodeInfo.GetXmlNode(node); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult == DialogResult.OK) { this.Changed = true; node.Text = dlg.ServerName; TreeNodeInfo info = (TreeNodeInfo)node.Tag; info.Name = dlg.ServerName; /* * // 显示下面的数据库节点 * RefreshDatabaseNames(node); * node.Expand(); * */ if (this.OnServerChanged != null) { ServerChangedEventArgs e1 = new ServerChangedEventArgs(); e1.TreeNode = node; this.OnServerChanged(this, e1); } if (node.ImageIndex == TYPE_SERVER_ONLINE) { MessageBox.Show(this, "注意:(当前OAI服务器处于已联机状态。) 对OAI服务器属性参数的修改,要在下一次连接中才能生效。\r\n\r\n为使参数立即生效,可断开连接,然后重新进行检索操作。"); } } } if (node.ImageIndex == TYPE_DIR) { ZDirPopertyForm dlg = new ZDirPopertyForm(); GuiUtil.SetControlFont(dlg, this.Font); dlg.XmlNode = TreeNodeInfo.GetXmlNode(node); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult == DialogResult.OK) { this.Changed = true; node.Text = dlg.DirName; TreeNodeInfo info = (TreeNodeInfo)node.Tag; info.Name = dlg.DirName; } } }