mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Minor refact
This commit is contained in:
parent
7b75b154ef
commit
998ee5ca95
@ -394,8 +394,8 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
_setLastColumnWidthTimer.Stop();
|
||||
if (Columns.Count > 0)
|
||||
{
|
||||
int width = 0;
|
||||
for (int i = 0; i < Columns.Count - 1; i++)
|
||||
var width = 0;
|
||||
for (var i = 0; i < Columns.Count - 1; i++)
|
||||
{
|
||||
width += Columns[i].Width;
|
||||
}
|
||||
@ -521,7 +521,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
var stringFormat = new StringFormat
|
||||
{
|
||||
FormatFlags = (StringFormatFlags)0,
|
||||
FormatFlags = 0,
|
||||
Alignment = StringAlignment.Near,
|
||||
LineAlignment = StringAlignment.Near,
|
||||
HotkeyPrefix = HotkeyPrefix.None,
|
||||
@ -2391,15 +2391,9 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
// unhook handler
|
||||
_setLastColumnWidthTimer.Tick -= SetLastColumnWidthTimer_Tick;
|
||||
_syntaxColorLineTimer.Tick -= SyntaxColorLineTimerTick;
|
||||
_setStartAndDurationTimer.Tick -= SetStartAndDurationTimerTick;
|
||||
|
||||
// dispose timers
|
||||
_setLastColumnWidthTimer.Dispose();
|
||||
_syntaxColorLineTimer.Dispose();
|
||||
_setStartAndDurationTimer.Dispose();
|
||||
_setLastColumnWidthTimer?.Dispose();
|
||||
_syntaxColorLineTimer?.Dispose();
|
||||
_setStartAndDurationTimer?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user