private void _cacheController_OnCacheLoadingStarted() { string message = string.Format("Reading {0} cache...", _cacheController.RomType.GetUserFriendlyName()); InformationTextBox.AppendTextWithNewLine(message); progressInformationLabel.Text = message; }
private void UpdateFilesToRearchve() { int filesToRearchiveCount = _cacheController.DatCacheEntities.Count(x => x.IsAltered || !x.IsArchived); int total = _cacheController.DatCacheEntities.Count(); string message = string.Format("{0}/{1} files need rearchiving.", filesToRearchiveCount, total); InformationTextBox.AppendTextWithNewLine(message); }
private void ArchiveController_OnExceptionOccured(string errorMessage) { if (InvokeRequired) { Invoke(new Action <string>(ArchiveController_OnExceptionOccured), new object[] { errorMessage }); return; } InformationTextBox.AppendTextWithNewLine(errorMessage); }
private void _cacheController_OnCacheLoadingAborted() { string message = string.Format("{0} Cache loading aborted.", _cacheController.RomType.GetUserFriendlyName()); InformationTextBox.AppendTextWithNewLine(message); progressInformationLabel.Text = message; progressProgressBar.Value = 0; UpdateLoadCacheButton(); UpdateFilesToRearchve(); }
private void ArchiveController_OnRearchiveStarted(DatCacheEntity datCacheEntity) { if (InvokeRequired) { Invoke(new Action <DatCacheEntity>(ArchiveController_OnRearchiveStarted), new object[] { datCacheEntity }); return; } string message = string.Format("Re-Archiving: '{0}'", datCacheEntity.FilenameInArchive); InformationTextBox.AppendTextWithNewLine(message); }
private void ArchiveController_OnRearchiveOverallAborted() { if (InvokeRequired) { Invoke(new Action(ArchiveController_OnRearchiveOverallAborted)); return; } string message = string.Format("Re-Archiving: aborted."); InformationTextBox.AppendTextWithNewLine(message); ClearRearchivingProgress(); UpdateRearchiveButton(); _cacheController.WriteCache(); }
private void ArchiveController_OnRearchiveOverallStarted(int filesToRearchive) { if (InvokeRequired) { Invoke(new Action <int>(ArchiveController_OnRearchiveOverallStarted), new object[] { filesToRearchive }); return; } string message = "Rearchive started."; InformationTextBox.AppendTextWithNewLine(message); InformationTextBox.AppendTextWithNewLine(string.Format("{0} files to re-archive.", filesToRearchive)); progressProgressBar.Value = 0; progressInformationLabel.Text = message; }
private void ArchiveController_OnRearchiveOverallCompleted() { if (InvokeRequired) { Invoke(new Action(ArchiveController_OnRearchiveOverallCompleted)); return; } string message = string.Format("Re-Archiving: done."); InformationTextBox.AppendTextWithNewLine(message); progressInformationLabel.Text = message; progressProgressBar.Value = 100; ClearRearchivingProgress(); UpdateRearchiveButton(); _cacheController.WriteCache(); }