Ejemplo n.º 1
0
        private void F_ToolManager_ButtonContext_Edit_Click(object sender, EventArgs e)
        {
            if (sender.GetType() != typeof(ToolStripMenuItem))
            {
                return;
            }


            Button        B = GetButtonFromTsmi((ToolStripMenuItem)sender);
            Function      currentFunction = GetFunctionFromButton(B);
            F_NewFunction EditFunction    = new F_NewFunction(_pluginManager, currentFunction);

            this.Hide();
            EditFunction.ShowDialog();
            if (EditFunction.NewFunction != null)
            {
                _functionManager.DeleteFunction(currentFunction);
                _functionManager.AddNewFunction(EditFunction.NewFunction);
                _functionManager.Save();
            }
            this.Show();
            SetupButtons();
        }