Beispiel #1
0
 /// <summary>
 /// 命令行。
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripMenuItemCMD_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem lvi in listView1.SelectedItems)
     {
         try
         {
             CmdForm form = new CmdForm(lvi.Tag as ClientData);
             form.Show();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// 快捷命令行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripMenuItemCMDs_Click(object sender, EventArgs e)
        {
            CommandSetting setting = (sender as ToolStripMenuItem).Tag as CommandSetting;

            foreach (ListViewItem lvi in listView1.SelectedItems)
            {
                try
                {
                    CmdForm form = new CmdForm(lvi.Tag as ClientData);
                    form.Show(setting.Commands);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }