Skip to content

Commit

Permalink
Small Frontend fixes
Browse files Browse the repository at this point in the history
++Version
  • Loading branch information
t0815 committed Oct 22, 2023
1 parent 9cd9d4f commit 9b983ec
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 180 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.12.52b</value>
<value>0.12.53b</value>
</setting>
<setting name="RenamerPlaceholders" serializeAs="Xml">
<value>
Expand Down
192 changes: 96 additions & 96 deletions MyCBZ/Forms/MainForm.Designer.cs

Large diffs are not rendered by default.

88 changes: 15 additions & 73 deletions MyCBZ/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ private void PageView_ItemSelectionChanged(object sender, ListViewItemSelectionC
ToolButtonMovePageUp.Enabled = buttonState;

ToolButtonSetPageType.Enabled = selectedPages.Count == 1;
ToolButtonImagePreview.Enabled = buttonState;
ToolButtonImagePreview.Enabled = selectedPages.Count == 1;

foreach (ListViewItem itempage in PagesList.Items)
{
Expand Down Expand Up @@ -2167,8 +2167,9 @@ private void PagesList_ItemSelectionChanged(object sender, ListViewItemSelection
ToolButtonMovePageDown.Enabled = buttonState && selectedPages.Count != PagesList.Items.Count;
ToolButtonMovePageUp.Enabled = buttonState && selectedPages.Count != PagesList.Items.Count;
ToolButtonEditImageProps.Enabled = propsButtonAvailable;
ToolButtonImagePreview.Enabled = selectedPages.Count == 1;

ToolButtonSetPageType.Enabled = buttonState;
ToolButtonSetPageType.Enabled = selectedPages.Count == 1;

if (buttonState)
{
Expand Down Expand Up @@ -2632,75 +2633,7 @@ private void PagesList_DoubleClick(object sender, EventArgs e)

private void PageView_DoubleClick(object sender, EventArgs e)
{
//ToolButtonEditImageProps_Click(this, e);

if (PageView.SelectedItem != null)
{
Page page = (Page)PageView.SelectedItem.Tag;
Page editPage = new Page(page);

ImagePreviewForm pagePreviewForm = new ImagePreviewForm(editPage);
DialogResult dlgResult = pagePreviewForm.ShowDialog();

/*
if (dlgResult == DialogResult.OK)
{
Page pageResult = pageSettingsForm.GetResult();
Page pageToUpdate = Program.ProjectModel.GetPageById(pageResult.Id);
if (pageToUpdate != null)
{
pageToUpdate.UpdatePage(pageResult);
if (!pageResult.Deleted)
{
if (editPage.Name != pageResult.Name)
{
HandleGlobalActionRequired(null, new GlobalActionRequiredEvent(Program.ProjectModel, 0, "Page name changed. Rebuild pageindex now?", "Rebuild", GlobalActionRequiredEvent.TASK_TYPE_INDEX_REBUILD, RebuildPageIndexMetaDataTask.UpdatePageIndexMetadata(Program.ProjectModel.Pages, Program.ProjectModel.MetaData, HandleGlobalTaskProgress, PageChanged)));
PageChanged(null, new PageChangedEvent(pageResult, PageChangedEvent.IMAGE_STATUS_RENAMED));
ArchiveStateChanged(null, new CBZArchiveStatusEvent(Program.ProjectModel, CBZArchiveStatusEvent.ARCHIVE_FILE_UPDATED));
}
try
{
MovePageTo(pageToUpdate, pageResult.Index);
}
catch (Exception ex)
{
RestoreIndex(pageToUpdate, editPage);
RestoreIndex(page, editPage);
ApplicationMessage.ShowException(ex);
}
}
if (pageResult.Deleted != editPage.Deleted)
{
HandleGlobalActionRequired(null, new GlobalActionRequiredEvent(Program.ProjectModel, 0, "Page order changed. Rebuild pageindex now?", "Rebuild", GlobalActionRequiredEvent.TASK_TYPE_INDEX_REBUILD, RebuildPageIndexMetaDataTask.UpdatePageIndexMetadata(Program.ProjectModel.Pages, Program.ProjectModel.MetaData, HandleGlobalTaskProgress, PageChanged)));
}
if (pageToUpdate.Deleted)
{
try
{
pageToUpdate.DeleteTemporaryFile();
}
catch (Exception ex)
{
MessageLogger.Instance.Log(LogMessageEvent.LOGMESSAGE_TYPE_ERROR, ex.Message);
}
HandleGlobalActionRequired(null, new GlobalActionRequiredEvent(Program.ProjectModel, 0, "Page order changed. Rebuild pageindex now?", "Rebuild", GlobalActionRequiredEvent.TASK_TYPE_INDEX_REBUILD, RebuildPageIndexMetaDataTask.UpdatePageIndexMetadata(Program.ProjectModel.Pages, Program.ProjectModel.MetaData, HandleGlobalTaskProgress, PageChanged)));
}
PageChanged(this, new PageChangedEvent(pageToUpdate, PageChangedEvent.IMAGE_STATUS_CHANGED));
}
}
pageSettingsForm.FreeResult();
pageSettingsForm.Dispose();
*/
}

ToolButtonImagePreview_Click(this, e);
}

private void ComboBoxCompressionLevel_SelectedIndexChanged(object sender, EventArgs e)
Expand All @@ -2722,9 +2655,18 @@ private void ComboBoxCompressionLevel_SelectedIndexChanged(object sender, EventA
}
}

private void toolStripButton2_Click(object sender, EventArgs e)
private void ToolButtonImagePreview_Click(object sender, EventArgs e)
{
PageView_DoubleClick(sender, e);
if (PagesList.SelectedItem != null)
{
Page page = (Page)PagesList.SelectedItem.Tag;
Page editPage = new Page(page);

ImagePreviewForm pagePreviewForm = new ImagePreviewForm(editPage);
DialogResult dlgResult = pagePreviewForm.ShowDialog();


}
}


Expand Down
8 changes: 4 additions & 4 deletions MyCBZ/Forms/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABu
CgAAAk1TRnQBSQFMAgEBAwEAAWABCwFgAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CgAAAk1TRnQBSQFMAgEBAwEAAYABCwGAAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMA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8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
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.12.52b</Value>
<Value Profile="(Default)">0.12.53b</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.12.52b released!
v0.12.53b 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:{97EE9702-CEE5-457D-8FC6-0D48D246F35A}"
"PackageCode" = "8:{42F5736E-8DE3-43D4-9B17-D0C834D9E742}"
"ProductCode" = "8:{E6A6B1B5-6D6C-4C79-9077-F1F7CA108DE2}"
"PackageCode" = "8:{AD5C7F5F-C1B3-4850-B226-7DA8B93798C5}"
"UpgradeCode" = "8:{66FAEF81-1CAE-4971-9E0F-796310EFEA5E}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.12.52"
"ProductVersion" = "8:0.12.53"
"Manufacturer" = "8:Trash_s0Ft"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down

0 comments on commit 9b983ec

Please sign in to comment.