Server/MainForm.cs
changeset 37 405a2590eda4
parent 36 a3aa661da810
child 38 babab407f2bb
     1.1 --- a/Server/MainForm.cs	Tue Aug 19 17:29:52 2014 +0200
     1.2 +++ b/Server/MainForm.cs	Tue Aug 19 21:26:17 2014 +0200
     1.3 @@ -59,6 +59,11 @@
     1.4          {
     1.5              StartServer();
     1.6  
     1.7 +            //
     1.8 +            CheckFontHeight();
     1.9 +            //
    1.10 +
    1.11 +
    1.12              if (Properties.Settings.Default.DisplayConnectOnStartup)
    1.13              {
    1.14                  iDisplay.Open();
    1.15 @@ -98,17 +103,25 @@
    1.16                  Properties.Settings.Default.DisplayFont = fontDialog.Font;
    1.17                  Properties.Settings.Default.Save();
    1.18                  //
    1.19 -                if (fontDialog.Font.Height > marqueeLabelBottom.Height)
    1.20 -                {
    1.21 -                    labelWarning.Text = "WARNING: Selected font is too height by " + (fontDialog.Font.Height - marqueeLabelBottom.Height) + " pixels!";
    1.22 -                    labelWarning.Visible = true;
    1.23 -                }
    1.24 -                else
    1.25 -                {
    1.26 -                    labelWarning.Visible = false;
    1.27 -                }
    1.28 +                CheckFontHeight();
    1.29 +            }
    1.30 +        }
    1.31  
    1.32 +        /// <summary>
    1.33 +        /// 
    1.34 +        /// </summary>
    1.35 +        void CheckFontHeight()
    1.36 +        {
    1.37 +            if (marqueeLabelBottom.Font.Height > marqueeLabelBottom.Height)
    1.38 +            {
    1.39 +                labelWarning.Text = "WARNING: Selected font is too height by " + (marqueeLabelBottom.Font.Height - marqueeLabelBottom.Height) + " pixels!";
    1.40 +                labelWarning.Visible = true;
    1.41              }
    1.42 +            else
    1.43 +            {
    1.44 +                labelWarning.Visible = false;
    1.45 +            }
    1.46 +
    1.47          }
    1.48  
    1.49          private void buttonCapture_Click(object sender, EventArgs e)