コード例 #1
0
 private void ActivateScenarioStatsCp()
 {
     FrmQreMain.ActiveScreen.EnableNavigation();
     ActionUtils.SetContentScreen(btnScenarioStats, new CpScenarioStats());
     if (_progressCp != null)
     {
         _progressCp.Dispose();
     }
 }
コード例 #2
0
ファイル: apSafety.cs プロジェクト: spfeiffer1/hyram
 private void btnScenario2_Click(object sender, EventArgs e)
 {
     try
     {
         ActionUtils.SetContentScreen((Button)sender, new CpSafetyScenario2());
     }
     catch (Exception ex)
     {
         MessageBox.Show("Action failed with this error: " + ex.Message);
     }
 }
コード例 #3
0
 private void btnQrad_Click(object sender, EventArgs e)
 {
     try
     {
         ActionUtils.SetContentScreen((Button)sender, new CpFlQradSingleAndMulti());
     }
     catch (Exception ex)
     {
         MessageBox.Show("Action failed with this error: " + ex.Message);
     }
 }
コード例 #4
0
ファイル: apSettings.cs プロジェクト: spfeiffer1/hyram
 private void btnDefaultDatabase_Click(object sender, EventArgs e)
 {
     btnDefaultDatabase.ForeColor = Color.Green;
     try
     {
         ActionUtils.SetContentScreen((Button)sender, new CpDefaultsDatabase());
     }
     catch (Exception ex)
     {
         MessageBox.Show("Action failed with this error: " + ex.Message);
     }
 }
コード例 #5
0
        /// <summary>
        ///     Set up progress screen and execute analysis task.
        ///     Callback will be called once analysis is complete.
        /// </summary>
        /// <param name="sender"></param>
        private void PrepForAnalysis(Button sender)
        {
            try
            {
                UiStateRoutines.UnselectButtons(FindForm());
                _progressCp = new ProgressDisplay();
                ActionUtils.SetContentScreen(sender, _progressCp);

                FrmQreMain.ActiveScreen.DisableNavigation(); // ugly way to ensure user can't navigate away
                _analysisToken = new CancellationTokenSource();
                //var StartTime = DateTime.Now;
                var task = Task.Factory.StartNew(ConductAnalysis, _analysisToken.Token);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.ToString());
                MessageBox.Show("Action failed with this error: " + ex.Message);
            }
        }