public Font GetFont()
 {
     if (control.IsDisposed) return null;
     if (control.InvokeRequired)
     {
         GetFontDelegate del = new GetFontDelegate(GetFont);
         return (Font)control.Invoke(del);
     }
     else return control.Font;
 }
예제 #2
0
        /// ////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Standard ctor for everyone else.
        /// </summary>
        /// <param name="back">Delegate to provide a background color</param>
        /// <param name="fore">Delegate to provide a foreground color</param>
        /// <param name="font">Delegate to provide a font</param>
        public CustomCheckedListBox(GetColorDelegate back = null, GetColorDelegate fore = null, GetFontDelegate font = null)
        {
            GetForeColor = fore;
            GetBackColor = back;
            GetFont      = font;

            //******************************************************************
            // If you want to set the item height to a specific value that can
            // be independent of the font size, this is the place to do it.
            //******************************************************************
            ItemHeight = 14;
        }
 public Font GetFont()
 {
     if (control.IsDisposed)
     {
         return(null);
     }
     if (control.InvokeRequired)
     {
         GetFontDelegate del = new GetFontDelegate(GetFont);
         return((Font)control.Invoke(del));
     }
     else
     {
         return(control.Font);
     }
 }
예제 #4
0
 public MyHackingResultMessage(MyTextsWrapperEnum?text, GetFontDelegate getFontDelegate, MySoundCuesEnum?soundCue)
 {
     Text            = text;
     GetFontDelegate = getFontDelegate;
     SoundCue        = soundCue;
 }
예제 #5
0
 public MyHackingResultMessage(MyTextsWrapperEnum? text, GetFontDelegate getFontDelegate, MySoundCuesEnum? soundCue)
 {
     Text = text;
     GetFontDelegate = getFontDelegate;
     SoundCue = soundCue;
 }