Skip to content

Commit

Permalink
Hotfix for not being able to close applicaiton due to wrong app state
Browse files Browse the repository at this point in the history
  • Loading branch information
t0815 committed Aug 21, 2023
1 parent 30b9066 commit 0df211d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MyCBZ/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<applicationSettings>
<Win_CBZ.Win_CBZSettings>
<setting name="Version" serializeAs="String">
<value>0.11.38b</value>
<value>0.11.39b</value>
</setting>
<setting name="RenamerPlaceholders" serializeAs="Xml">
<value>
Expand Down
11 changes: 11 additions & 0 deletions MyCBZ/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ private void HandleGlobalTaskProgress(object sender, GeneralTaskProgressEvent e)
newToolStripMenuItem.Enabled = true;
applicationStatusLabel.Text = e.Message;
Program.ProjectModel.IsChanged = true;
Program.ProjectModel.ApplicationState = ApplicationStatusEvent.STATE_READY;
}));

try
Expand Down Expand Up @@ -853,6 +854,8 @@ private void ApplicationStateChanged(object sender, ApplicationStatusEvent e)
String info = applicationStatusLabel.Text;
String filename = e.ArchiveInfo.FileName;

Program.ProjectModel.ApplicationState = e.State;

switch (e.State)
{
case ApplicationStatusEvent.STATE_ANALYZING:
Expand Down Expand Up @@ -1273,6 +1276,14 @@ private void NewToolStripMenuItem_Click(object sender, EventArgs e)
ClearProject();
NewProject();
}
} else
{

if (ArchiveProcessing())
{
ApplicationMessage.ShowWarning("Please wait until current operation has finished.", "Still operations in progress", 2, ApplicationMessage.DialogButtons.MB_OK);

}
}
}

Expand Down
1 change: 1 addition & 0 deletions MyCBZ/Models/ProjectModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ protected void UpdatePageIndicesProc()
}

OnOperationFinished(new OperationFinishedEvent(0, Pages.Count));
OnApplicationStateChanged(new ApplicationStatusEvent(this, ApplicationStatusEvent.STATE_READY));

InitialPageIndexRebuild = false;
}
Expand Down
2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Value Profile="(Default)">%APPDATA%\CBZMage\Temp\</Value>
</Setting>
<Setting Name="Version" Type="System.String" Scope="Application">
<Value Profile="(Default)">0.11.38b</Value>
<Value Profile="(Default)">0.11.39b</Value>
</Setting>
<Setting Name="RenamerPlaceholders" Type="System.Collections.Specialized.StringCollection" Scope="Application">
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Microsoft Visual Studio [Community] 2022 (64-Bit)

## Latest Release

v0.11.38b released!
v0.11.39b released!

## Third party components

Expand Down
6 changes: 3 additions & 3 deletions Win_CBZ-Setup/Win_CBZ-Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -434,15 +434,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Win_CBZ"
"ProductCode" = "8:{91A0603F-CAEA-4797-B116-A80CB212D2A6}"
"PackageCode" = "8:{BC051103-77AB-49F2-96D7-4CC34BC8DB9D}"
"ProductCode" = "8:{1EEF3E0F-57DA-42C8-82AF-A7F68635525D}"
"PackageCode" = "8:{782DBDB6-7C01-4C0D-B941-4358CD081C70}"
"UpgradeCode" = "8:{813B9659-6DDC-4083-B56B-0400F17E8B45}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.11.38"
"ProductVersion" = "8:0.11.39"
"Manufacturer" = "8:Trash_s0Ft"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down

0 comments on commit 0df211d

Please sign in to comment.