Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
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);
     }
 }