Exemplo n.º 1
0
        private void btAddSchema_Click(object sender, EventArgs e)
        {
            string schemaName;

            if (!I3GetStringForm.Excute("输入方案名称", "", out schemaName, false, false))
            {
                return;
            }
            if (settingItems.Keys.Contains(schemaName))
            {
                MessageBox.Show("方案名称已存在", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            //保存当前数据
            SaveItem();
            //新增
            SettingItem settingItem = new SettingItem(schemaName);

            settingItems.Add(settingItem.SchemaName, settingItem);
            LoadItems();
            CurItem = settingItem;
        }