private void BackgroundTimer_Tick(object sender, EventArgs e) { RunLogMsgQueueFlush(); if (!backGroundRunning) { BackGroundTimer.Enabled = false; if ((backGroundCompleted) && (!cancelBackGround)) { if ((imageFileErrorList.Count > 0) && (backGroundLog != null)) { DialogResult dr = MessageBox.Show(this, "Error Inserting [" + imageFileErrorList.Count + "] images." + "\n\n" + "Do you want to see log file Yes/No ?", "Error Inserting into DataBase", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) { backGroundLog.DisplayWithNoteBook(); } } else { MessageBox.Show(this, "Importing of Assignments completed."); } } CloseMySQL(); this.Close(); } }
private void RunStatsTimer_Tick(object sender, EventArgs e) { RunStatsCurDirectory_.Text = runStatsCurDirectory; RunStatusTotalImages_.Text = runStatsTotalImages.ToString("###,###,##0"); RunStatsImagesInDataBase_.Text = runStatsImagesInDataBase.ToString("###,###,##0"); RunStatsImagesNotInDataBase_.Text = runStatsImagesNotInDataBase.ToString("###,###,##0"); RunStatsImagesFixed_.Text = runStatsImagesFixed.ToString("###,###,##0"); int totalImagesProcessed = runStatsImagesInDataBase + runStatsImagesNotInDataBase + runStatsImagesFixed; if (totalImagesProcessed > runStatsTotalImages) { runStatsTotalImages = totalImagesProcessed; } if (runStatsTotalImages > 10) { ReconciliationProgress.Maximum = runStatsTotalImages; ReconciliationProgress.Value = totalImagesProcessed; } if (!reconcilingRunning) { RunStatsTimer.Enabled = false; if (cancelReconciling) { MessageBox.Show(this, "Reconciliation *** CANCELED ***", "Image Filename Reconciliation"); } else { DialogResult dr = MessageBox.Show(this, "Reconciliation Completed! Want to see RunLog ? Yes/No ?", "Image Filename Reconciliation", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) { reconcilingRunLog.DisplayWithNoteBook(); } } if (!formIsClosing) { Close(); } } }