mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
Minor refact + null guard
This commit is contained in:
parent
7f7b43d9a0
commit
92da1ea7db
@ -22,8 +22,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
Text = _language.Title + " - " + (IntPtr.Size * 8) + "-bit";
|
||||
okButton.Text = _languageGeneral.Ok;
|
||||
string[] versionInfo = Utilities.AssemblyVersion.Split('.');
|
||||
string revisionNumber = "0";
|
||||
var versionInfo = Utilities.AssemblyVersion.Split('.');
|
||||
var revisionNumber = "0";
|
||||
if (versionInfo.Length >= 4)
|
||||
{
|
||||
revisionNumber = versionInfo[3];
|
||||
@ -43,9 +43,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
linkLabelGitBuildHash.Font = labelProduct.Font;
|
||||
}
|
||||
|
||||
string aboutText = _language.AboutText1.TrimEnd() + Environment.NewLine +
|
||||
Environment.NewLine +
|
||||
_languageGeneral.TranslatedBy.Trim();
|
||||
var aboutText = _language.AboutText1.TrimEnd() + Environment.NewLine +
|
||||
Environment.NewLine +
|
||||
_languageGeneral.TranslatedBy.Trim();
|
||||
while (aboutText.Contains("\n ") || aboutText.Contains("\n\t"))
|
||||
{
|
||||
aboutText = aboutText.Replace("\n ", "\n");
|
||||
|
@ -685,6 +685,11 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
|
||||
public static void FixLargeFonts(Control mainCtrl, Control ctrl)
|
||||
{
|
||||
if (mainCtrl == null || ctrl == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using (var graphics = mainCtrl.CreateGraphics())
|
||||
{
|
||||
var textSize = graphics.MeasureString(ctrl.Text, ctrl.Font);
|
||||
|
Loading…
Reference in New Issue
Block a user