/// <summary> /// Executes the previous Open command /// </summary> internal void NavigateToPrevious() { try { if (CheckBeforeNavigate()) { HistoryOfCommands.Instance().GoBack(); IOpenCommand command = HistoryOfCommands.Instance().GetCurrentCommand(); command.Execute(); } } catch (AccessDeniedException) { XtraMessageBox.Show("Impossibile accedere alla funzionalità richiesta. Accesso negato", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception ex) { ErrorHandler.Show(ex); } }
///// <summary> ///// Sets the current control docking style ///// </summary> ///// <param name="control"></param> //internal void SetRenderedControlSize(BaseGUIControl control) //{ // control.Dock = DockStyle.Fill; //} internal void NavigateToControl(WIN.SCHEDULING_APP.GUI.Commands.CommandType type) { try { if (CheckBeforeNavigate()) { IOpenCommand cmd = OpenCommandFactory.GetCommand(type, _main); cmd.Execute(); HistoryOfCommands.Instance().AddCommandToHistory(cmd); } MemoryHelper.ReduceMemory(); } catch (AccessDeniedException) { XtraMessageBox.Show("Impossibile accedere alla funzionalità richiesta. Accesso negato", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception ex) { ErrorHandler.Show(ex); } }
internal void NavigateToStartupControl(string command) { try { IOpenCommand cmd = OpenCommandFactory.GetCommand(command, _main); if (cmd == null) { cmd = OpenCommandFactory.GetCommand(WIN.SCHEDULING_APP.GUI.Commands.CommandType.Home, _main); } cmd.Execute(); HistoryOfCommands.Instance().AddCommandToHistory(cmd); } catch (AccessDeniedException) { XtraMessageBox.Show("Impossibile accedere alla funzionalità richiesta. Accesso negato", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); IOpenCommand cmd = OpenCommandFactory.GetCommand(WIN.SCHEDULING_APP.GUI.Commands.CommandType.Home, _main); cmd.Execute(); HistoryOfCommands.Instance().AddCommandToHistory(cmd); } catch (Exception ex) { ErrorHandler.Show(ex); } }