private void DialogTimer_Tick(object sender, EventArgs e)
        {
            RunLogMsgQueueFlush();

            if (runLog != null)
            {
                if (runLog.LineCount() != lastRunLogLoneCount)
                {
                    String s = runLog.LastLine();
                    if (!String.IsNullOrEmpty(s))
                    {
                        AddMsgToDialogMsgQueue(s);
                    }
                    lastRunLogLoneCount = runLog.LineCount();
                }
            }

            if (tuningThreadDone)
            {
                DialogTimer.Enabled = false;
                if (tuningThreadFailed)
                {
                    MessageBox.Show(this, "Feature File Extraction Failed.");
                }
                else
                {
                    MessageBox.Show(this, "Feature File Extraction Completed.");
                }

                if (!formIsClosing)
                {
                    Close();
                }
            }
        } /* DialogTimer_Tick */
        private void runLogTimer_Tick(object sender, EventArgs e)
        {
            if (runLog.LineCount() != lastLineCount)
            {
                RunLogAddMsg(runLog.LastLine() + "\n");
                lastLineCount = runLog.LineCount();
            }

            RunLogMsgQueueFlush();

            if (processingThreadCompleted)
            {
                runLogTimer.Enabled = false;
                if (cancelRequested)
                {
                    MessageBox.Show(this, "Instrument Data Extraction Canceled.");
                }
                else
                {
                    MessageBox.Show(this, "Instrument Data Extraction Completed.");
                }

                Close();
            }
        }
Exemplo n.º 3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (closeForm)
            {
                timer1.Enabled = false;
                Close();
                runLog = null;
                return;
            }

            if (newModelName != null)
            {
                modelName.Text = newModelName;
                newModelName   = null;
            }


            lock  (runLog)
            {
                if (runLog.LineCount() != lastLineCount)
                {
                    lastLineCount = runLog.LineCount();
                    String lastLine = runLog.LastLine();
                    TrainingModelOutput.AppendText(lastLine + "\n");
                }
            }
        }