public void OnButtonClick(TypeButton _tb, int num_but = 0) { switch (_tb) { case TypeButton.Next: if (NumberRoom != 0 && NumberRoom != 5) { AppRootStatic.NextRoomNavigation(); } NumberRoom++; ViewerActivWindow(); break; case TypeButton.Back: if (NumberRoom != 6 && NumberRoom != 1) { AppRootStatic.PrevRoomNavigation(); } NumberRoom--; ViewerActivWindow(); break; case TypeButton.Metodics: AppRootStatic.SetActiveUI(TypeUI.AppMenu, false); AppRootStatic.SetActiveLabel(TypeLabel.Header, false); AppRootStatic.SetActiveLabel(TypeLabel.Info, false); AppRootStatic.SetActiveUI(TypeUI.Metodic, true); oWindows = false; break; case TypeButton.CloseMetodics: AppRootStatic.SetActiveUI(TypeUI.Metodic, false); ViewerActivWindow(); break; case TypeButton.CloseApplication: AppRootStatic.SetActiveUI(TypeUI.AppMenu, false); AppRootStatic.SetActiveLabel(TypeLabel.Header, false); AppRootStatic.SetActiveLabel(TypeLabel.Info, false); AppRootStatic.SetActiveUI(TypeUI.Exit, true); oWindows = false; break; case TypeButton.YesExit: Application.Quit(); break; case TypeButton.NoExit: AppRootStatic.SetActiveUI(TypeUI.Exit, false); ViewerActivWindow(); break; case TypeButton.NextInstr: if (Instrument % 3 != 0) { return; } Instrument = (Instrument + 1) % 3; ButtonInstrument(); AppRootStatic.NextTool(); break; case TypeButton.PrevInstr: if (Instrument % 3 != 1) { return; } Instrument = (Instrument - 1) % 3; AppRootStatic.PrevuTool(); ButtonInstrument(); break; case TypeButton.Viewer: AppRootStatic.SetActiveUI(TypeUI.Metodic, false); AppRootStatic.SetActiveLabel(TypeLabel.Viewer, true); AppRootStatic.SetObjectViewer(num_but, true); ///просотр объектов!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! break; case TypeButton.CloseViewr: AppRootStatic.SetActiveUI(TypeUI.Metodic, true); AppRootStatic.SetActiveLabel(TypeLabel.Viewer, false); break; case TypeButton.Task: AppRootStatic.SetActiveLabel(TypeLabel.Task, !AppRootStatic.isActive(TypeLabel.Task)); ///задачи break; } }