示例#1
0
        private void But_AddApp_Click(object sender, EventArgs e)
        {
            frm_Edit frm_Edit = new frm_Edit();

            frm_Edit.ShowDialog();
            if (CommunicateValue.changed_app != null)
            {
                apps.Add(CommunicateValue.changed_app);
                DataEdit.WriteApps(apps, datapath);  //保存
                CommunicateValue.changed_app = null; //重置
                ReFresh();
            }
        }
示例#2
0
        private void But_EditApp_Click(object sender, EventArgs e)
        {
            int      index    = lst_Apps.SelectedIndex;
            frm_Edit frm_Edit = new frm_Edit(apps[index]);

            frm_Edit.ShowDialog();
            if (CommunicateValue.changed_app != null)
            {
                apps[index].Name = CommunicateValue.changed_app.Name;
                apps[index].Path = CommunicateValue.changed_app.Path;
                DataEdit.WriteApps(apps, datapath);
                CommunicateValue.changed_app = null;
                ReFresh();
            }
        }