コード例 #1
0
 private void btAddAction_Click(object sender, EventArgs e)
 {
     var sap = new ShortcutActionProperties(ActionTypes.None.ToInstance());
     if (sap.ShowDialog(this) == DialogResult.OK)
     {
         lvActions.Items.Add(new ListViewItem(new string[] { (lvActions.Items.Count + 1).ToString(), sap.ResultActionItem.ActionType.DisplayText() }) { Tag = sap.ResultActionItem });
         lvActions.Items[lvActions.Items.Count - 1].Selected = true;
     }
 }
コード例 #2
0
 private void btEditAction_Click(object sender, EventArgs e)
 {
     if (lvActions.SelectedItems.Count > 0)
     {
         var sap = new ShortcutActionProperties(lvActions.SelectedItems[0].Tag as IActionItem);
         if (sap.ShowDialog(this) == DialogResult.OK)
         {
             lvActions.SelectedItems[0].Tag = sap.ResultActionItem;
             GroomActionLabels();
         }
     }
 }
コード例 #3
0
 private void btEditAction_Click(object sender, EventArgs e)
 {
     if (lvActions.SelectedItems.Count > 0)
     {
         var sap = new ShortcutActionProperties(lvActions.SelectedItems[0].Tag as IActionItem);
         if (sap.ShowDialog(this) == DialogResult.OK)
         {
             lvActions.SelectedItems[0].Tag = sap.ResultActionItem;
             GroomActionLabels();
         }
     }
 }
コード例 #4
0
        private void btAddAction_Click(object sender, EventArgs e)
        {
            var sap = new ShortcutActionProperties(ActionTypes.None.ToInstance());

            if (sap.ShowDialog(this) == DialogResult.OK)
            {
                lvActions.Items.Add(new ListViewItem(new string[] { (lvActions.Items.Count + 1).ToString(), sap.ResultActionItem.ActionType.DisplayText() })
                {
                    Tag = sap.ResultActionItem
                });
                lvActions.Items[lvActions.Items.Count - 1].Selected = true;
            }
        }