Пример #1
0
        private void btnConsequenceModels_Click(object sender, EventArgs e)
        {
            try
            {
                UiStateRoutines.UnselectButtons(this);
                var actionsNarrative = "Output";
                ResultsActionPanel = new ApOutputNavigator();
                ActivateActionPanel(this, (Button)sender, pnlActionButtons, ResultsActionPanel, actionsNarrative,
                                    ApButtonClickOption.NoClick);

                ActionUtils.SetContentScreen((Button)sender, new CpConsequenceModels());
            }
            catch (Exception ex)
            {
                Trace.TraceError(Environment.StackTrace);
                MessageBox.Show(genericNavErrorMsg + ex.Message);
            }
        }
Пример #2
0
        private void ChangePanel(string actionsNarrative, object sender, UserControl nextControl)
        {
            try
            {
                // Track displayed control and free up resources when it changes
                if (_currentControl != null)
                {
                    _currentControl.Dispose();
                }
                _currentControl = nextControl;

                UiStateRoutines.UnselectButtons(this);
                ResultsActionPanel = new ApOutputNavigator();
                ActivateActionPanel(this, (Button)sender, pnlActionButtons, ResultsActionPanel, actionsNarrative,
                                    ApButtonClickOption.NoClick);
                ActionUtils.SetContentScreen((Button)sender, nextControl);
            }
            catch (Exception ex)
            {
                Trace.TraceError(Environment.StackTrace);
                MessageBox.Show(genericNavErrorMsg + ex.Message);
            }
        }