Exemplo n.º 1
0
 private void  除OToolStripButton_Click(object sender, EventArgs e)
 {
     if (curApp != null && MessageBox.Show("确定要删除当前应用信息?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         AppInfoMgr.Delete(curApp);
         tscmbAppInfo.Items.Remove(curApp);
     }
 }
Exemplo n.º 2
0
 private void tsbSaveInfo_Click(object sender, EventArgs e)
 {
     if (curApp != null)
     {
         curApp.应用名称 = tbAppName.Text;
     }
     AppInfoMgr.SaveAppInfo();
 }
Exemplo n.º 3
0
 private void FrmAppInfoMgr_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (curApp != null)
     {
         curApp.应用名称 = tbAppName.Text;
     }
     AppInfoMgr.SaveAppInfo();
 }
Exemplo n.º 4
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            AppInfo app = dataGridView1.CurrentRow.DataBoundItem as AppInfo;

            if (app != null && !string.IsNullOrEmpty(app.ExeFile) && e.ColumnIndex == 1)
            {
                this.WindowState = FormWindowState.Minimized;
                AppInfoMgr.StartApp(app);
            }
        }
Exemplo n.º 5
0
        private void TsmiChangeSetting_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            AppSetting appSetting = e.ClickedItem.Tag as AppSetting;
            AppInfo    app        = dataGridView1.CurrentRow.DataBoundItem as AppInfo;

            if (app != null && appSetting != null)
            {
                app.ChangeTo(appSetting);
                AppInfoMgr.SaveAppInfo();
            }
            dataGridView1.Refresh();
        }
Exemplo n.º 6
0
 private void 新建NToolStripButton_Click(object sender, EventArgs e)
 {
     openFileDialog1.InitialDirectory = "";
     openFileDialog1.Filter           = "可执行文件(*.exe)|*.exe|所有文件|*.*";
     openFileDialog1.Multiselect      = false;
     openFileDialog1.FileName         = "";
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         Clear();
         AppInfo app = AppInfoMgr.Add(openFileDialog1.FileName);
         tscmbAppInfo.Items.Add(app);
         tscmbAppInfo.SelectedIndex = tscmbAppInfo.Items.Count - 1;
         DisplayAppInfo();
     }
 }