/// <summary> /// Execution of the Action. /// </summary> /// <returns>True: Execution of the Action was successful</returns> public bool Execute(ActionCallingContext ctx) { // TODO: // Add code Data.MvProject mvProject = null; if (Data.MvProject.Open(ref mvProject)) { UI.MainForm form = UI.MainForm.GetSingleton(); form.MvProject = mvProject; if (form.Visible) { form.BringToFront(); } else { form.Show(new Util.WindowWrapper(Process.GetCurrentProcess().MainWindowHandle)); } return(true); } else { return(true); } }
/// <summary> /// Execution of the Action. /// </summary> /// <returns>True: Execution of the Action was successful</returns> public bool Execute(ActionCallingContext ctx) { // TODO: // Add code UI.ModelSelection form = UI.ModelSelection.GetSingleton(); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { UI.MainForm mainForm = UI.MainForm.GetSingleton(); if (mainForm.Visible) { mainForm.BringToFront(); } else { mainForm.MvProject = new Data.MvProject(form.IsShip, form.ModelName, form.Number); mainForm.Show(new Util.WindowWrapper(Process.GetCurrentProcess().MainWindowHandle)); } } form.Dispose(); return(true); }