Esempio n. 1
0
 public void EditSingleDrawCmd(int cmdLineNo)
 {
     if (!this.enable && this.Parent.Parent == null)
     {
         return;
     }
     OnEditCmdLineEvent?.Invoke(commandsModule, listView1.Items[cmdLineNo].Tag as CmdLine);
 }
Esempio n. 2
0
        /// <summary>
        /// 鼠标双击命令行弹出命令编辑界面;如果命令行不可编辑,则无动作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            if (!this.enable)
            {
                return;
            }
            var selectedItems = listView1.SelectedItems;

            if (selectedItems != null && selectedItems.Count > 0)
            {
                OnEditCmdLineEvent?.Invoke(commandsModule, selectedItems[0].Tag as CmdLine);
            }
        }