Merge pull request #8584 from ivandrofly/layout-picker

Layout picker
This commit is contained in:
Nikolaj Olsson 2024-06-27 18:20:36 +02:00 committed by GitHub
commit 0b4aa9b65e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 25 deletions

View File

@ -7,19 +7,6 @@
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>

View File

@ -46,18 +46,7 @@ namespace Nikse.SubtitleEdit.Forms
private void UpdateButtons(int initialLayout)
{
_gray1?.Dispose();
_gray2?.Dispose();
_gray3?.Dispose();
_gray4?.Dispose();
_gray5?.Dispose();
_gray6?.Dispose();
_gray7?.Dispose();
_gray8?.Dispose();
_gray9?.Dispose();
_gray10?.Dispose();
_gray11?.Dispose();
_gray12?.Dispose();
DisposeGraphics();
_gray1 = GrayScale(Properties.Resources.L1, initialLayout == 0);
_gray2 = GrayScale(Properties.Resources.L2, initialLayout == 1);
@ -535,5 +524,36 @@ namespace Nikse.SubtitleEdit.Forms
{
ShowVideoControls = checkBoxHideVideoControls.Checked;
}
private void DisposeGraphics()
{
_gray1?.Dispose();
_gray2?.Dispose();
_gray3?.Dispose();
_gray4?.Dispose();
_gray5?.Dispose();
_gray6?.Dispose();
_gray7?.Dispose();
_gray8?.Dispose();
_gray9?.Dispose();
_gray10?.Dispose();
_gray11?.Dispose();
_gray12?.Dispose();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing)
{
DisposeGraphics();
components?.Dispose();
}
base.Dispose(disposing);
}
}
}