private void btnNew_Click(object sender, EventArgs e) { EditConfName = ""; ConfEditor ce = new ConfEditor(this, ConfEditor.EditType.New); ce.ShowDialog(this); }
private void btnCopy_Click(object sender, EventArgs e) { ConfEditor ce = new ConfEditor(this, ConfEditor.EditType.Copy); if (-1 == confList.SelectedIndex) { showRedTip("在下面的列表选择一个配置"); return; } EditConfName = confList.SelectedItem.ToString(); ce.ShowDialog(this); }
private void btnEdit_Click(object sender, EventArgs e) { ConfEditor ce = new ConfEditor(this, ConfEditor.EditType.Rename); if (-1 == confList.SelectedIndex) { showRedTip("在下面的列表选择一个配置"); return; } if (confList.SelectedItem.ToString() == ".cfg") { showRedTip("缺省配置不能重命名"); return; } EditConfName = confList.SelectedItem.ToString(); ce.ShowDialog(this); }