Ejemplo n.º 1
0
        private void MenuItemAddServer_Click(object sender, EventArgs e)
        {
            var group = tvServers.SelectedNode.Tag as ServerGroup;

            if (group != null)
            {
                FrmServerConfig form = new FrmServerConfig();
                form.Group  = group;
                form.Config = new ServerConfig();
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    this.LoadGroup();
                }
            }
        }
Ejemplo n.º 2
0
        private void MenuItemEditServer_Click(object sender, EventArgs e)
        {
            var selectedNode = tvServers.SelectedNode;
            var config       = selectedNode?.Tag as ServerConfig;

            if (selectedNode != null && config != null)
            {
                FrmServerConfig form = new FrmServerConfig();
                form.Config = config;
                form.IsEdit = true;
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    this.LoadGroup();
                }
            }
        }