System.Windows.Forms.RibbonCaptionButton.GetCharFor C# (CSharp) Method

GetCharFor() public static method

Gets the character to render the specified button type
public static GetCharFor ( CaptionButton type ) : string
type CaptionButton type of button
return string
      public static string GetCharFor(CaptionButton type)
      {
         if (WinApi.IsWindows)
         {
            switch (type)
            {
               case CaptionButton.Minimize:
                  return "0";
               case CaptionButton.Maximize:
                  return "1";
               case CaptionButton.Restore:
                  return "2";
               case CaptionButton.Close:
                  return "r";
               default:
                  return "?";
            }
         }
         else
         {
            switch (type)
            {
               case CaptionButton.Minimize:
                  return "_";
               case CaptionButton.Maximize:
                  return "+";
               case CaptionButton.Restore:
                  return "^";
               case CaptionButton.Close:
                  return "X";
               default:
                  return "?";
            }
         }
      }
      #endregion