コード例 #1
0
 /// <summary>
 /// User clicked on the Add button to add a new tool.
 /// </summary>
 private void BtAddClick(object sender, EventArgs e)
 {
     FormEditTools formEditTools = new FormEditTools(new ClassTool());
     if (formEditTools.ShowDialog() == DialogResult.OK)
     {
         int sel = listTools.SelectedIndex >= 0 ? listTools.SelectedIndex : 0;
         CustomTools.Tools.Insert(sel, formEditTools.Tool);
         RefreshList();
     }
 }
コード例 #2
0
        /// <summary>
        /// User clicked on the Edit button to edit selected tool.
        /// </summary>
        private void BtEditClick(object sender, EventArgs e)
        {
            int           sel           = listTools.SelectedIndex;
            FormEditTools formEditTools = new FormEditTools(CustomTools.Tools[sel]);

            if (formEditTools.ShowDialog() == DialogResult.OK)
            {
                CustomTools.Tools[sel] = formEditTools.Tool;
                RefreshList(sel);
            }
        }
コード例 #3
0
        /// <summary>
        /// User clicked on the Add button to add a new tool.
        /// </summary>
        private void BtAddClick(object sender, EventArgs e)
        {
            FormEditTools formEditTools = new FormEditTools(new ClassTool());

            if (formEditTools.ShowDialog() == DialogResult.OK)
            {
                int sel = listTools.SelectedIndex >= 0 ? listTools.SelectedIndex : 0;
                CustomTools.Tools.Insert(sel, formEditTools.Tool);
                RefreshList(sel);
            }
        }
コード例 #4
0
ファイル: FormCustomizeTools.cs プロジェクト: runt18/GitForce
 /// <summary>
 /// User clicked on the Edit button to edit selected tool.
 /// </summary>
 private void BtEditClick(object sender, EventArgs e)
 {
     int sel = listTools.SelectedIndex;
     FormEditTools formEditTools = new FormEditTools(CustomTools.Tools[sel]);
     if (formEditTools.ShowDialog() == DialogResult.OK)
     {
         CustomTools.Tools[sel] = formEditTools.Tool;
         RefreshList(sel);
     }
 }