private void OnCloseWindow(object target, ExecutedRoutedEventArgs e) { LMD_GUI.LMD_WindowClose wcc = new LMD_GUI.LMD_WindowClose(); wcc.Height = 130; Canvas.SetLeft(wcc, this.Width / 2 - wcc.Width / 2); Canvas.SetTop(wcc, this.Height / 2 - wcc.Height / 2); wcc.ShowDialog(); // SystemCommands.CloseWindow(this); }
/// <summary> /// Начало компиляции /// </summary> private void topPanel_run(String cmd) { switch (cmd) { #region СОЗДАТЬ case "СОЗДАТЬ": // LMD_GUI.LMD_WindowCreateProject wcp = new LMD_GUI.LMD_WindowCreateProject(); // wcp.ShowDialog(); break; #endregion #region ОТКРЫТЬ case "ОТКРЫТЬ": break; #endregion #region СОХРАНИТЬ case "СОХРАНИТЬ": //FileManager.ManagerProjects.SaveProject(mCompiling, workspace.blocks, info, fastInfo); break; #endregion #region НАСТРОЙКИ case "НАСТРОЙКИ": // LMD_GUI.LMD_WindowSetting ws = new LMD_GUI.LMD_WindowSetting(); // ws.Show(); break; #endregion #region ПРОЕКТ case "ПРОЕКТ": LMD_GUI.LMD_WindowPropertiesProject wpp = new LMD_GUI.LMD_WindowPropertiesProject(); wpp.Show(); break; #endregion #region ЗАПУСТИТЬ case "ЗАПУСТИТЬ": mCompiling.Run(workspace.blocks, info, fastInfo); break; #endregion #region ГЛАВНАЯ case "ГЛАВНАЯ": LMD_GUI.LMD_StartWindow sw = new LMD_GUI.LMD_StartWindow(this); sw.Show(); break; #endregion #region ПЕРЕМЕННЫЕ case "ПЕРЕМЕННЫЕ": LMD_GUI.LMD_WindowManagerVariables wmv = new LMD_GUI.LMD_WindowManagerVariables(); wmv.Show(); break; #endregion #region КОД case "КОД": LMD_GUI.LMD_WindowCode wc = new LMD_GUI.LMD_WindowCode(); wc.SetText(mCompiling.PrevTextCode); wc.Show(); break; #endregion #region СПРАВКА case "СПРАВКА": break; #endregion #region ВЫХОД case "ВЫХОД": LMD_GUI.LMD_WindowClose wcc = new LMD_GUI.LMD_WindowClose(); wcc.Height = 130; Canvas.SetLeft(wcc, this.Width / 2 - wcc.Width / 2); Canvas.SetTop(wcc, this.Height / 2 - wcc.Height / 2); wcc.ShowDialog(); //Environment.Exit(0); break; #endregion } }