private void tsmiAdd_Click(object sender, EventArgs e) { DlgEditConfig dlg = new DlgEditConfig(); dlg.Config = new SYS_SYSTEMCONFIG(); if (DialogResult.OK == dlg.ShowDialog()) { ConfigService.SaveConfig(dlg.Config); RefreshConfigTree(); } }
private void tsmiEdit_Click(object sender, EventArgs e) { TreeListNode currNode = treeConfig.FocusedNode; SYS_SYSTEMCONFIG config = currNode.Tag as SYS_SYSTEMCONFIG; DlgEditConfig dlg = new DlgEditConfig(); dlg.Config = config; if (DialogResult.OK == dlg.ShowDialog()) { ConfigService.SaveConfig(dlg.Config); RefreshConfigTree(); } }