private void frmBurn_Load(object sender, System.EventArgs e) { DI = new HardCopy.DownloadInfo(); DI = (HardCopy.DownloadInfo)this.Tag; lvRecordings = DI.LV; pBar.Maximum = lvRecordings.Items.Count; pBar.Minimum = 0; pBar.Value = 0; int Test = MCD.FreeBlocksOnDisc; // MCD.SelectDevice(DI.dMCD.DeviceId); // MCD.WriteSpeed = DI.dMCD.Speed; MCD.ClearAll(); foreach(ListViewItem LV in DI.LV.Items) { bool bBool = false; OysterClassLibrary.Recording R = (OysterClassLibrary.Recording) LV.Tag; string filename = R.DownloadedName; if(R.IsDownloaded == true) { bBool = MCD.InsertFile("\\",filename); } 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.No) { btnOK_Click(btnOK,new System.EventArgs()); return; } } } MCD.Prepare(); int TestSize = (MCD.ImageSize * (2048 / 1024 / 1024)); TestSize = (short)MCD.WriteSpeed; Progress.Enabled = true; }
private void Progress_Tick_1(object sender, System.EventArgs e) { if (runonlyonce == false) { Progress.Enabled = false; runonlyonce = true; DI = new HardCopy.DownloadInfo(); DI = (HardCopy.DownloadInfo)this.Tag; lvRecordings = DI.LV; pBar.Maximum = lvRecordings.Items.Count; pBar.Minimum = 0; lblDR.Text = "Validating Recordings on Video Storage Server..."; this.Text = "Querying Video Storage Server for Recording Availability..."; pBar.Value = 0; System.Globalization.NumberFormatInfo nfi = new System.Globalization.CultureInfo("en-US",false).NumberFormat; nfi.NumberDecimalDigits = 0; VSSInfo[] VODServers = MyGlobals.GetUniqueListOfServers(lvRecordings.Items); MyGlobals.Logger.WriteLog("{0} VOD servers found.", VODServers.Length); foreach (VSSInfo vi in VODServers) { MyGlobals.Logger.WriteLog("Server {0}", vi); try { if (FtpSession.State != FtpState.Disconnected) { MyGlobals.Logger.WriteLog("Closing FTP session at {0}", FtpSession.RemoteEndPoint as IPEndPoint); //ftpSession.Close(); FtpSession.Disconnect(); } } catch(Exception Err) { MyGlobals.Logger.WriteLog(Err.ToString()); } try { MyGlobals.Logger.WriteLog("connecting to ftp session at {0}", vi); FtpSession.Connect(vi.Address, vi.Port); } catch (FtpException ftpex) { MyGlobals.Logger.WriteLog("Ftp Exception {0} connecting to {1}", ftpex.Message, FtpSession.RemoteEndPoint as IPEndPoint); } catch(Exception Err) { MyGlobals.Logger.WriteLog("Exception {0} connecting to {1}", Err.Message, FtpSession.RemoteEndPoint as IPEndPoint); MessageBox.Show(Err.Message,"Error occurred attempting to connect to " + vi); MessageBox.Show("All Recordings currently residing on " + vi + " will are unavailable for download.","Unable to retrieve recordings from " + vi); continue; } DateTime sdt = DateTime.Now; while (FtpSession.State != FtpState.Ready) { if (DateTime.Now > sdt.AddSeconds(30.0)) { break; } System.Threading.Thread.Sleep(100); } if (FtpSession.State == FtpState.Ready) { FtpSession.Login("anonymous", "*****@*****.**"); MyGlobals.Logger.WriteLog("Connected to ftp session at {0}. Validating files.", FtpSession.RemoteEndPoint as IPEndPoint); foreach (ListViewItem LVI in lvRecordings.Items) { bool FoundFile = true; OysterClassLibrary.Recording R = (OysterClassLibrary.Recording)LVI.Tag; if (!R.IsReady) continue; if (R.SizeOnDisk > 0) { //MyGlobals.Logger.WriteLog("Skipping {0}:{1} because it has a size of {2} already recorded.", R.DisplayName, R.Description, R.SizeOnDisk); goto SkipVerification; } if (R.VideoStorageServerControlAddress.ToUpper() == vi.Address.ToUpper()) { pBar.Value++; try { if (!FtpSession.FileExists(R.Description)) { FoundFile = false; } else { R.SizeOnDisk = FtpSession.GetFileLength(R.Description); FoundFile = true; } } catch(Exception Err) { MyGlobals.Logger.WriteLog("Exception {0} reading {1}", Err.Message, R.Description); FoundFile = false; } } SkipVerification:{} if (FoundFile) { DI.SizeOfAllFilesInBytes += R.SizeOnDisk; LVI.ForeColor = Color.DarkBlue; LVI.Tag = R; int Current = pBar.Value + 1; lblDR.Text = "Validating Recordings (" + Current.ToString() + " of " + pBar.Maximum +" )\nRecording : " + R.DisplayName + " validated."; } else { MyGlobals.Logger.WriteLog("{0}:{1} was not found on the server.", R.DisplayName, R.Description); LVI.ForeColor = Color.LightGray; int Current = pBar.Value + 1; lblDR.Text = "Validating Recordings (" + Current.ToString() + " of " + pBar.Maximum + " )\nRecording : " +R.DisplayName + " not validated!\nVideo Storage Server: " + R.VideoStorageServerControlAddress + ": " + R.VideoStorageServerControlPort + " not located!"; } lblDR.Refresh(); } } else { // remove all the recordings for this server from the list -- it is annoying if they are still there foreach (ListViewItem LVI in lvRecordings.Items) { OysterClassLibrary.Recording R = (OysterClassLibrary.Recording)LVI.Tag; if (R.VideoStorageServerControlAddress.ToLower().Equals(vi)) { lvRecordings.Items.Remove(LVI); } } } } DI.LV = lvRecordings; this.Tag = DI; this.DialogResult = DialogResult.OK; Progress.Enabled = false; 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 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 cmdBurn_Click(object sender, System.EventArgs e) { PostActivity(); DI = new HardCopy.DownloadInfo(); DI.UseNetwork = UseNetwork; DI.CurrentDirectory = DefaultDirectory; DI.LV = lvDVD; DI.SizeOfAllFilesInBytes = Total_File_SizeDVD; DI.FileCount = lvDVD.Items.Count; DI.iLocalMBSAddress = 0; CheckBurner = false; // RefreshScreen.Enabled = false; if (UseNetwork == false) { if(!MCD.TestUnitReady()) { MessageBox.Show("You must first insert a writable disc before beginning the burn process.", "No writable disc detected"); return; } Application.DoEvents(); Application.DoEvents(); //Pass the selected Device for(int j = 0; j < MCDWriters[0].Count();j++) { if(MCDWriters[j].Description == cboBurners.Text) { DI.dMCD.DeviceId = MCDWriters[j].DeviceId; DI.dMCD.Description = MCDWriters[j].Description; } } } else { System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); folderBrowserDialog1.SelectedPath = DI.CurrentDirectory; if(folderBrowserDialog1.ShowDialog() == DialogResult.OK) { DI.CurrentDirectory = folderBrowserDialog1.SelectedPath; } else { if (MessageBox.Show(this,"Do you want to continue the operation using the default path?", "No folder path was selected. Use the default temp directory?", MessageBoxButtons.YesNo) == DialogResult.No) { CheckBurner = true; return; } } } frmDownloadRecordings DL = new frmDownloadRecordings(); DL.Tag = DI; DL.ShowDialog(this); if (DL.DialogResult == DialogResult.OK) { DI = (HardCopy.DownloadInfo)DL.Tag; CurrentUsersRecordings = DI.StatusLV; DL.Dispose(); foreach(ListViewItem lvi in DI.StatusLV.Items) { OysterClassLibrary.Recording R = (OysterClassLibrary.Recording)lvi.Tag; foreach(ListViewItem dv in lvDVD.Items) { OysterClassLibrary.Recording dvR = (OysterClassLibrary.Recording)dv.Tag; if(dvR.ID == R.ID) { dv.ForeColor = lvi.ForeColor; dv.Tag = lvi.Tag; } } } if (DL.DownloadedFileCount > 0) { MyGlobals.Logger.WriteLog("{0} files were downloaded.", DL.DownloadedFileCount); if (UseNetwork == false) { frmBurnRecordings Burn = new frmBurnRecordings(); Burn.Tag = DI; Burn.ShowDialog(this); if(Burn.DialogResult == DialogResult.OK) { Burn.Dispose(); } else { MessageBox.Show("Burn Failed! Please check your Medium for Errors!"); Burn.Dispose(); } } else { MessageBox.Show("Files were downloaded to \"" + DI.CurrentDirectory + "\""); } } else { MyGlobals.Logger.WriteLog("No files were downloaded."); MessageBox.Show("No files were downloaded."); } } CheckBurner = true; }
private void cbUsers_SelectedIndexChanged(object sender, System.EventArgs e) { PostActivity(); CurrentUsersRecordings.Items.Clear(); //Variables used to get Video Information SelectedUser = (OysterClassLibrary.User)UserCollection[cbUsers.Text]; if(SelectedUser == null) return; OysterClassLibrary.Sections SS = SelectedUser.AllMemberSections; Msg("Loading " + SelectedUser.Description + "'s recordings... please wait"); MyGlobals.Logger.WriteLog("Loading " + SelectedUser.Description + "'s recordings"); tvVSS.BeginUpdate(); tvVSS.Nodes.Clear(); TreeNode URecordings = new TreeNode(); OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); foreach(OysterClassLibrary.Section CurrentSection in SS) { if (SelectedUser.ID != LUser.ID) { foreach(OysterClassLibrary.Section LoginUserSection in LUser.AllOwnedSections) { if (F.IsInMyHierarchy(LoginUserSection.ID,CurrentSection.ID)) { bool Addit = F.IsInMyHierarchy(LoginUserSection.ID,CurrentSection.ID); Recordings AR = CurrentSection.CurrentRecordings; if(Addit == true) { if((CurrentSection.IsDefault == false)&&(AR.Count > 0)) { TreeNode NodeX = tvVSS.Nodes.Add(CurrentSection.Description); NodeX.Tag = LUser.HighestAuthorityLevel; NodeX.ForeColor = System.Drawing.Color.DarkBlue; NodeX.ImageIndex = 6; NodeX.SelectedImageIndex = 6; ListView lvSessions = new ListView(); //foreach(OysterClassLibrary.Recording R in B.Recordings) foreach(OysterClassLibrary.Recording R in AR) { if(SelectedUser.ID == R.OwnerID) { if(R.SessionID != "") { foreach(ListViewItem LVI in lvSessions.Items) { if(LVI.Text == R.SessionName) goto SkipItem; } ListViewItem LCI = lvSessions.Items.Add(R.SessionName); LCI.Tag = R.SessionID; } } SkipItem:{} } TreeNode[] NodeSessions = new TreeNode[lvSessions.Items.Count]; int SessionCount = 0; foreach(ListViewItem LVI in lvSessions.Items) { NodeSessions[SessionCount] = NodeX.Nodes.Add(LVI.Text); NodeSessions[SessionCount].Tag = LVI.Tag; NodeSessions[SessionCount].ImageIndex = 2; NodeSessions[SessionCount].SelectedImageIndex = 2; SessionCount++; } //foreach(OysterClassLibrary.Recording DrawRecording in B.Recordings) foreach(OysterClassLibrary.Recording DrawRecording in AR) { // if(DrawRecording.DisplayName == null) // DrawRecording.DisplayName = DrawRecording.Created.ToString(); if(SelectedUser.ID == DrawRecording.OwnerID) { TreeNode NodeRecording = new TreeNode(); if(DrawRecording.SessionID == "") { NodeRecording = NodeX.Nodes.Add(DrawRecording.DisplayName); } else { for(int a=0; a < SessionCount;a++) { if(DrawRecording.SessionName == NodeSessions[a].Text) NodeRecording = NodeSessions[a].Nodes.Add(DrawRecording.DisplayName); } } //DrawRecording.Se = B.ID; ListViewItem LVI = CurrentUsersRecordings.Items.Add(DrawRecording.Description); LVI.Tag = DrawRecording; NodeRecording.Tag = DrawRecording; NodeRecording.ImageIndex = 3; NodeRecording.SelectedImageIndex = 3; NodeRecording.NodeFont = new Font("Arial",10,FontStyle.Regular); } } } } } } } else { foreach(OysterClassLibrary.Section B in SS) { OysterClassLibrary.Recordings AR = F.ALLRecordings(B.ID); if((B.IsDefault == false)&&(AR.Count > 0)) { TreeNode NodeX = tvVSS.Nodes.Add(B.Description); NodeX.Tag = LUser.HighestAuthorityLevel; NodeX.ForeColor = System.Drawing.Color.DarkBlue; NodeX.ImageIndex = 6; NodeX.SelectedImageIndex = 6; ListView lvSessions = new ListView(); //foreach(OysterClassLibrary.Recording R in B.Recordings) foreach(OysterClassLibrary.Recording R in AR) { if(SelectedUser.ID == R.OwnerID) { if(R.SessionID != "") { foreach(ListViewItem LVI in lvSessions.Items) { if(LVI.Text == R.SessionName) goto SkipItem; } ListViewItem LCI = lvSessions.Items.Add(R.SessionName); LCI.Tag = R.SessionID; } } SkipItem:{} } TreeNode[] NodeSessions = new TreeNode[lvSessions.Items.Count]; int SessionCount = 0; foreach(ListViewItem LVI in lvSessions.Items) { NodeSessions[SessionCount] = NodeX.Nodes.Add(LVI.Text); NodeSessions[SessionCount].Tag = LVI.Tag; NodeSessions[SessionCount].ImageIndex = 2; NodeSessions[SessionCount].SelectedImageIndex = 2; SessionCount++; } //foreach(OysterClassLibrary.Recording DrawRecording in B.Recordings) foreach(OysterClassLibrary.Recording DrawRecording in AR) { // if(DrawRecording.DisplayName == null) // DrawRecording.DisplayName = DrawRecording.Created.ToString(); if(SelectedUser.ID == DrawRecording.OwnerID) { TreeNode NodeRecording = new TreeNode(); if(DrawRecording.SessionID == "") { NodeRecording = NodeX.Nodes.Add(DrawRecording.DisplayName); } else { for(int a=0; a < SessionCount;a++) { if(DrawRecording.SessionName == NodeSessions[a].Text) NodeRecording = NodeSessions[a].Nodes.Add(DrawRecording.DisplayName); } } //DrawRecording.Se = B.ID; ListViewItem LVI = CurrentUsersRecordings.Items.Add(DrawRecording.Description); LVI.Tag = DrawRecording; NodeRecording.Tag = DrawRecording; NodeRecording.ImageIndex = 3; NodeRecording.SelectedImageIndex = 3; NodeRecording.NodeFont = new Font("Arial",10,FontStyle.Regular); } } } #region MovingCode // else if((B.IsDefault == true)&&(AR.Count > 0)) // { // TreeNode NodeX = new TreeNode(); // if(OSystem.SectionTypeSysAdmin.ID == LUser.HighestAuthorityLevel.ID) // { // NodeX = tvVSS.Nodes.Add("Recordings"); // // NodeX.Tag = OSystem.SectionTypeSysAdmin; // NodeX.Tag = LUser.HighestAuthorityLevel; // NodeX.ForeColor = System.Drawing.Color.DarkBlue; // NodeX.ImageIndex = 6; // NodeX.SelectedImageIndex = 6; // // } // else // { // NodeX = tvVSS.Nodes.Add("Unassigned Recordings"); // // NodeX.Tag = HighestSectionType; // NodeX.Tag = LUser.HighestAuthorityLevel; // NodeX.ForeColor = System.Drawing.Color.Brown; // NodeX.ImageIndex = 6; // NodeX.SelectedImageIndex = 6; // } // ListView lvSessions = new ListView(); // //foreach(OysterClassLibrary.Recording R in B.Recordings) // foreach(OysterClassLibrary.Recording R in AR) // { // if(SelectedUser.ID == R.OwnerID) // { // if(R.SessionID != "") // { // foreach(ListViewItem LVI in lvSessions.Items) // { // if(LVI.Text == R.SessionName) // goto SkipItem; // } // ListViewItem LCI = lvSessions.Items.Add(R.SessionName); // LCI.Tag = R.SessionID; // } // } // SkipItem:{} // } // TreeNode[] NodeSessions = new TreeNode[lvSessions.Items.Count]; // int SessionCount = 0; // foreach(ListViewItem LVI in lvSessions.Items) // { // NodeSessions[SessionCount] = NodeX.Nodes.Add(LVI.Text); // // NodeSessions[SessionCount].Tag = LVI.Tag; // NodeSessions[SessionCount].ImageIndex = 2; // NodeSessions[SessionCount].SelectedImageIndex = 2; // SessionCount++; // } // // //foreach(OysterClassLibrary.Recording DrawRecording in B.Recordings) // foreach(OysterClassLibrary.Recording DrawRecording in AR) // { // // // if(DrawRecording.DisplayName == null) // // DrawRecording.DisplayName = DrawRecording.Created.ToString(); // if(SelectedUser.ID == DrawRecording.OwnerID) // { // TreeNode NodeRecording = new TreeNode(); // if(DrawRecording.SessionID == "") // { // NodeRecording = NodeX.Nodes.Add(DrawRecording.DisplayName); // } // else // { // for(int a=0; a < SessionCount;a++) // { // if(DrawRecording.SessionName == NodeSessions[a].Text) // NodeRecording = NodeSessions[a].Nodes.Add(DrawRecording.DisplayName); // } // } // //DrawRecording.Se = B.ID; // ListViewItem LVI = CurrentUsersRecordings.Items.Add(DrawRecording.Description); // LVI.Tag = DrawRecording; // NodeRecording.Tag = DrawRecording; // NodeRecording.ImageIndex = 3; // NodeRecording.SelectedImageIndex = 3; // NodeRecording.NodeFont = new Font("Arial",10,FontStyle.Regular); // } // } // } #endregion } } } F.Dispose(); //Unassigned Recordings Section DefaultSection = null; if((LUser.ID == SelectedUser.ID)||(LUser.HighestAuthorityLevel.CanViewUnassignedRecordings.Count > 0)) DefaultSection = SelectedUser.DefaultSection; if(DefaultSection != null) { Recordings AR = DefaultSection.CurrentRecordings; if(AR.Count > 0) { TreeNode NodeX = new TreeNode(); if(OSystem.SectionTypeSysAdmin.ID == LUser.HighestAuthorityLevel.ID) { NodeX = tvVSS.Nodes.Add("Recordings"); // NodeX.Tag = OSystem.SectionTypeSysAdmin; NodeX.Tag = LUser.HighestAuthorityLevel; NodeX.ForeColor = System.Drawing.Color.DarkBlue; NodeX.ImageIndex = 6; NodeX.SelectedImageIndex = 6; } else { NodeX = tvVSS.Nodes.Add("Unassigned Recordings"); // NodeX.Tag = HighestSectionType; NodeX.Tag = LUser.HighestAuthorityLevel; NodeX.ForeColor = System.Drawing.Color.Brown; NodeX.ImageIndex = 6; NodeX.SelectedImageIndex = 6; } ListView lvSessions = new ListView(); //foreach(OysterClassLibrary.Recording R in B.Recordings) foreach(OysterClassLibrary.Recording R in AR) { if(SelectedUser.ID == R.OwnerID) { if(R.SessionID != "") { foreach(ListViewItem LVI in lvSessions.Items) { if(LVI.Text == R.SessionName) goto SkipItem; } ListViewItem LCI = lvSessions.Items.Add(R.SessionName); LCI.Tag = R.SessionID; } } SkipItem:{} } TreeNode[] NodeSessions = new TreeNode[lvSessions.Items.Count]; int SessionCount = 0; foreach(ListViewItem LVI in lvSessions.Items) { NodeSessions[SessionCount] = NodeX.Nodes.Add(LVI.Text); NodeSessions[SessionCount].Tag = LVI.Tag; NodeSessions[SessionCount].ImageIndex = 2; NodeSessions[SessionCount].SelectedImageIndex = 2; SessionCount++; } //foreach(OysterClassLibrary.Recording DrawRecording in B.Recordings) foreach(OysterClassLibrary.Recording DrawRecording in AR) { // if(DrawRecording.DisplayName == null) // DrawRecording.DisplayName = DrawRecording.Created.ToString(); if(SelectedUser.ID == DrawRecording.OwnerID) { TreeNode NodeRecording = new TreeNode(); if(DrawRecording.SessionID == "") { NodeRecording = NodeX.Nodes.Add(DrawRecording.DisplayName); } else { for(int a=0; a < SessionCount;a++) { if(DrawRecording.SessionName == NodeSessions[a].Text) NodeRecording = NodeSessions[a].Nodes.Add(DrawRecording.DisplayName); } } //DrawRecording.Se = B.ID; ListViewItem LVI = CurrentUsersRecordings.Items.Add(DrawRecording.Description); LVI.Tag = DrawRecording; NodeRecording.Tag = DrawRecording; NodeRecording.ImageIndex = 3; NodeRecording.SelectedImageIndex = 3; NodeRecording.NodeFont = new Font("Arial",10,FontStyle.Regular); } } } } Msg("Verifying recording availability. Please wait..."); HardCopy.DownloadInfo DI = new HardCopy.DownloadInfo(); DI.LV = CurrentUsersRecordings; DI.iLocalMBSAddress = 0; FDownload = new frmValidateRecordings(); FDownload.Tag = DI; if(IsLoading) FDownload.Opacity = 0; FDownload.ShowDialog(this); if(FDownload.DialogResult == DialogResult.OK) { } else MessageBox.Show("Returned failed!"); Msg("Recordings verified. Calculated total file sizes..."); DI =(HardCopy.DownloadInfo) FDownload.Tag; CurrentUsersRecordings = DI.LV; Total_File_SizeMH = DI.SizeOfAllFilesInBytes; CheckNodes(tvVSS.Nodes); tvVSS.EndUpdate(); //Total_File_SizeMH =1549035830; if(Total_File_SizeMH > 0) { lblSizeOnMediaHawk.Text = "Total File Size : " + ConvertByteToString(Total_File_SizeMH); } else { lblSizeOnMediaHawk.Text = "Total File Size : 0" + " Bytes"; } Msg(""); }