Minor refact

This commit is contained in:
Nikolaj Olsson 2021-05-09 20:24:04 +02:00
parent 4b833eaf87
commit 96a105a947
3 changed files with 5 additions and 9 deletions

View File

@ -445,7 +445,7 @@
this.textBoxMovieTitle.Name = "textBoxMovieTitle";
this.textBoxMovieTitle.Size = new System.Drawing.Size(224, 20);
this.textBoxMovieTitle.TabIndex = 2;
this.textBoxMovieTitle.Text = "Bedtime For Bonzo";
this.textBoxMovieTitle.Text = "";
//
// labelMovieTitle
//

View File

@ -47,13 +47,9 @@ namespace Nikse.SubtitleEdit.Forms.DCinema
{
textBoxSubtitleID.Text = ss.CurrentDCinemaSubtitleId;
textBoxMovieTitle.Text = ss.CurrentDCinemaMovieTitle;
int number;
if (int.TryParse(ss.CurrentDCinemaReelNumber, out number))
if (int.TryParse(ss.CurrentDCinemaReelNumber, out var number) && numericUpDownReelNumber.Minimum <= number && numericUpDownReelNumber.Maximum >= number)
{
if (numericUpDownReelNumber.Minimum <= number && numericUpDownReelNumber.Maximum >= number)
{
numericUpDownReelNumber.Value = number;
}
numericUpDownReelNumber.Value = number;
}
comboBoxLanguage.Text = ss.CurrentDCinemaLanguage;
textBoxFontID.Text = ss.CurrentDCinemaFontId;
@ -147,7 +143,7 @@ namespace Nikse.SubtitleEdit.Forms.DCinema
var ss = Configuration.Settings.SubtitleSettings;
ss.CurrentDCinemaSubtitleId = textBoxSubtitleID.Text;
ss.CurrentDCinemaMovieTitle = textBoxMovieTitle.Text;
ss.CurrentDCinemaReelNumber = numericUpDownReelNumber.Value.ToString();
ss.CurrentDCinemaReelNumber = Convert.ToInt32(numericUpDownReelNumber.Value).ToString(CultureInfo.InvariantCulture);
ss.CurrentDCinemaLanguage = comboBoxLanguage.Text;
ss.CurrentDCinemaFontId = textBoxFontID.Text;
ss.CurrentDCinemaFontUri = textBoxFontUri.Text;

View File

@ -546,7 +546,7 @@ namespace Nikse.SubtitleEdit.Forms.DCinema
this.textBoxMovieTitle.Name = "textBoxMovieTitle";
this.textBoxMovieTitle.Size = new System.Drawing.Size(274, 20);
this.textBoxMovieTitle.TabIndex = 2;
this.textBoxMovieTitle.Text = "Bedtime For Bonzo";
this.textBoxMovieTitle.Text = "";
//
// labelMovieTitle
//