private void frmValidateRecording_Load(object sender, System.EventArgs e) { runonlyonce = false; Progress.Enabled = true; FrmParent = (frmHardCopy)this.Owner; MyGlobals.Logger.WriteLog("frmValidateRecording_Load"); }
private void timer1_Tick(object sender, System.EventArgs e) { timer1.Enabled = false; if(runonce == false) { bool isReady = MCD.TestUnitReady(); Application.DoEvents(); Application.DoEvents(); runonce = true; timer1.Enabled = false; DI = new HardCopy.DownloadInfo(); DI = (HardCopy.DownloadInfo)this.Tag; FrmParent = (frmHardCopy)this.Owner; pBar.Maximum = (int)DI.FileCount; pBar.Minimum = 0; pBar.Value = 0; MCD.SelectDevice(DI.dMCD.DeviceId); //MCD.WriteSpeed = DI.dMCD.Speed; Application.DoEvents(); Application.DoEvents(); int Test = MCD.TotalBlocksOnDisc; MCD.ClearAll(); Application.DoEvents(); foreach(ListViewItem LV in DI.StatusLV.Items) { bool bBool = false; OysterClassLibrary.Recording R = (OysterClassLibrary.Recording) LV.Tag; string filename = R.DownloadedName; string dir = @"\"; bBool = MCD.InsertFileW(ref dir,ref filename); //bBool = MCD.InsertFile(dir,filename); Application.DoEvents(); if(bBool == false) { DialogResult DR = new DialogResult(); DR = MessageBox.Show(R.DisplayName + " was not successfully added to Burn Image!\nDo you wish to abort?","Error during Creation of Burn Image. Ignore?",MessageBoxButtons.YesNo); Application.DoEvents(); if(DR == DialogResult.Yes) { btnOK_Click(btnOK,new System.EventArgs()); return; } } } MCD.Prepare(); Application.DoEvents(); timer1.Enabled = false; Progress.Enabled = true; MCD.PerformOPC = true; MCD.BurnProof = true; bool Good = MCD.Burn(); if(!Good) { MessageBox.Show(MCD.ErrorStringW); this.DialogResult = DialogResult.OK; Progress.Enabled = false; timer1.Enabled = false; return; } Application.DoEvents(); return; } }
private void frmDownloadRecording_Load(object sender, System.EventArgs e) { MyGlobals.Logger.WriteLog("frmDownloadRecording_Load"); runonlyonce = false; if(this.Owner is frmHardCopy) _parentForm = (frmHardCopy)this.Owner; else { MessageBox.Show(this,"Error: Download began in an invalid way...aborting"); this.DialogResult = DialogResult.Abort; return; } DI = new HardCopy.DownloadInfo(); lvComplete = new System.Windows.Forms.ListView(); DI = (HardCopy.DownloadInfo)this.Tag; SizeOfAllFilesInKilobytes = Convert.ToInt32(DI.SizeOfAllFilesInBytes / 1024 / 1024); pBar.Maximum = SizeOfAllFilesInKilobytes; TotalBytesTransferred = 0; TotalBytesFromCompletedTransfers = 0; _downloadedFileCount = 1; pBar.Minimum = 0; lblDR.Text = "Downloading Recordings from Video Storage Server"; this.Text = "Downloading Recordings from Video Storage Server"; pBar.Value = 0; Application.DoEvents(); Application.DoEvents(); Progress.Enabled = true; }
private void StartApplication() { frmMain = new frmHardCopy(); frmMain.Owner = this; frmLogin L = new frmLogin(); System.Windows.Forms.DialogResult LDR = L.ShowDialog(this); if(LDR != DialogResult.OK) { Application.Exit(); return; } else { Msg("Loading User data..."); frmMain.OSystem = L.OSystem; frmMain.LUser = L.LoginUser; frmMain.UserLicense = L.UserLicense; //frmMain.g_COMPORT = L.g_COMPORT; //frmMain.g_LoginDenied = L.OSystem.SystemAdminLoginDenied; } frmMain.Show(); this.Opacity = 0; this.Visible = false; L.Dispose(); }