Skip to content

Commit a3059ca

Browse files
committed
Added icon when backup is done (on startup)
Also added dispose to BackupManager
1 parent 87df92a commit a3059ca

File tree

6 files changed

+45
-3
lines changed

6 files changed

+45
-3
lines changed

ComicRack.Engine/Backup/BackupManager.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class BackupManager : DisposableObject
2222
private readonly BackupArchiveCreator archiveCreator = new BackupArchiveCreator();
2323
private readonly BackupRetentionManager retentionManager = new BackupRetentionManager();
2424

25+
public bool IsInBackupProcess => backupQueue.IsActive;
26+
2527
private readonly BackupManagerOptions options;
2628

2729
public BackupManager(
@@ -88,6 +90,15 @@ private IEnumerable<BackupLocation> GetBackupLocations(bool includeAllConfigs)
8890

8991
return locations;
9092
}
93+
94+
protected override void Dispose(bool disposing)
95+
{
96+
if (disposing)
97+
{
98+
backupQueue.Dispose();
99+
}
100+
base.Dispose(disposing);
101+
}
91102
}
92103

93104
internal record BackupLocation(IBackupLocationProvider Provider, BackupOptions BackupType) { }

ComicRack/MainForm.Designer.cs

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ComicRack/MainForm.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3873,19 +3873,21 @@ private void OnUpdateGui()
38733873

38743874
private void UpdateActivityTimerTick(object sender, EventArgs e)
38753875
{
3876-
ToolStripStatusLabel[] array = new ToolStripStatusLabel[5]
3876+
ToolStripStatusLabel[] array = new ToolStripStatusLabel[6]
38773877
{
38783878
tsReadInfoActivity,
38793879
tsWriteInfoActivity,
38803880
tsScanActivity,
38813881
tsExportActivity,
3882-
tsDeviceSyncActivity
3882+
tsDeviceSyncActivity,
3883+
tsBackupActivity
38833884
};
38843885
int num = Numeric.BinaryHash(array.Select((ToolStripStatusLabel l) => l.Visible).ToArray());
38853886
tsScanActivity.Visible = Program.Scanner.IsScanning;
38863887
tsWriteInfoActivity.Visible = Program.QueueManager.IsInComicFileUpdate;
38873888
tsReadInfoActivity.Visible = Program.QueueManager.IsInComicFileRefresh;
38883889
tsPageActivity.Visible = Program.ImagePool.IsWorking;
3890+
tsBackupActivity.Visible = Program.BackupManager.IsInBackupProcess;
38893891
bool isInComicConversion = Program.QueueManager.IsInComicConversion;
38903892
int pendingComicConversions = Program.QueueManager.PendingComicConversions;
38913893
int count = Program.QueueManager.ExportErrors.Count;

ComicRack/Properties/Resources.Designer.cs

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ComicRack/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,4 +805,7 @@
805805
<data name="DarkZoomClear" type="System.Resources.ResXFileRef, System.Windows.Forms">
806806
<value>..\Resources\Dark\ZoomClear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
807807
</data>
808+
<data name="Backup" type="System.Resources.ResXFileRef, System.Windows.Forms">
809+
<value>..\Resources\Backup.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
810+
</data>
808811
</root>

ComicRack/Resources/Backup.png

398 Bytes
Loading

0 commit comments

Comments
 (0)