Пример #1
0
        public bool IsGroupVisible(RicherTextBoxToolStripGroups group)
        {
            switch (group)
            {
            case RicherTextBoxToolStripGroups.SaveAndLoad:
                return(tsbtnSave.Visible && tsbtnOpen.Visible && toolStripSeparator6.Visible);

            case RicherTextBoxToolStripGroups.FontNameAndSize:
                return(tscmbFont.Visible && tscmbFontSize.Visible && tsbtnChooseFont.Visible && toolStripSeparator1.Visible);

            case RicherTextBoxToolStripGroups.BoldUnderlineItalic:
                return(tsbtnBold.Visible && tsbtnItalic.Visible && tsbtnUnderline.Visible && toolStripSeparator2.Visible);

            case RicherTextBoxToolStripGroups.Alignment:
                return(tsbtnAlignLeft.Visible && tsbtnAlignRight.Visible && tsbtnAlignCenter.Visible && toolStripSeparator3.Visible);

            case RicherTextBoxToolStripGroups.FontColor:
                return(tsbtnFontColor.Visible && tsbtnWordWrap.Visible && toolStripSeparator4.Visible);

            case RicherTextBoxToolStripGroups.IndentationAndBullets:
                return(tsbtnIndent.Visible && tsbtnOutdent.Visible && tsbtnBullets.Visible && toolStripSeparator5.Visible);

            case RicherTextBoxToolStripGroups.Insert:
                return(tsbtnInsertPicture.Visible && toolStripSeparator7.Visible);

            case RicherTextBoxToolStripGroups.Zoom:
                return(tsbtnZoomOut.Visible && tsbtnZoomIn.Visible && tstxtZoomFactor.Visible);

            default:
                return(false);
            }
        }
Пример #2
0
 public void HideToolstripItemsByGroup(RicherTextBoxToolStripGroups group, bool visible)
 {
     if ((group & RicherTextBoxToolStripGroups.SaveAndLoad) != 0)
     {
         tsbtnSave.Visible           = visible;
         tsbtnOpen.Visible           = visible;
         toolStripSeparator6.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.FontNameAndSize) != 0)
     {
         tscmbFont.Visible           = visible;
         tscmbFontSize.Visible       = visible;
         tsbtnChooseFont.Visible     = visible;
         toolStripSeparator1.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.BoldUnderlineItalic) != 0)
     {
         tsbtnBold.Visible           = visible;
         tsbtnItalic.Visible         = visible;
         tsbtnUnderline.Visible      = visible;
         toolStripSeparator2.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.Alignment) != 0)
     {
         tsbtnAlignLeft.Visible      = visible;
         tsbtnAlignRight.Visible     = visible;
         tsbtnAlignCenter.Visible    = visible;
         toolStripSeparator3.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.FontColor) != 0)
     {
         tsbtnFontColor.Visible      = visible;
         tsbtnWordWrap.Visible       = visible;
         toolStripSeparator4.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.IndentationAndBullets) != 0)
     {
         tsbtnIndent.Visible         = visible;
         tsbtnOutdent.Visible        = visible;
         tsbtnBullets.Visible        = visible;
         toolStripSeparator5.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.Insert) != 0)
     {
         tsbtnInsertPicture.Visible  = visible;
         toolStripSeparator7.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.Zoom) != 0)
     {
         tsbtnZoomOut.Visible    = visible;
         tsbtnZoomIn.Visible     = visible;
         tstxtZoomFactor.Visible = visible;
     }
 }
Пример #3
0
        public bool IsGroupVisible(RicherTextBoxToolStripGroups group)
        {
            switch (group)
            {
                case RicherTextBoxToolStripGroups.SaveAndLoad:
                    return tsbtnSave.Visible && tsbtnOpen.Visible && toolStripSeparator6.Visible;

                case RicherTextBoxToolStripGroups.FontNameAndSize:
                    return tscmbFont.Visible && tscmbFontSize.Visible && tsbtnChooseFont.Visible && toolStripSeparator1.Visible;

                case RicherTextBoxToolStripGroups.BoldUnderlineItalic:
                    return tsbtnBold.Visible && tsbtnItalic.Visible && tsbtnUnderline.Visible && toolStripSeparator2.Visible;

                case RicherTextBoxToolStripGroups.Alignment:
                    return tsbtnAlignLeft.Visible && tsbtnAlignRight.Visible && tsbtnAlignCenter.Visible && toolStripSeparator3.Visible;

                case RicherTextBoxToolStripGroups.FontColor:
                    return tsbtnFontColor.Visible && tsbtnWordWrap.Visible && toolStripSeparator4.Visible;

                case RicherTextBoxToolStripGroups.IndentationAndBullets:
                    return tsbtnIndent.Visible && tsbtnOutdent.Visible && tsbtnBullets.Visible && toolStripSeparator5.Visible;

                case RicherTextBoxToolStripGroups.Insert:
                    return tsbtnInsertPicture.Visible && toolStripSeparator7.Visible;

                case RicherTextBoxToolStripGroups.Zoom:
                    return tsbtnZoomOut.Visible && tsbtnZoomIn.Visible && tstxtZoomFactor.Visible;

                default:
                    return false;
            }
        }
Пример #4
0
 public void HideToolstripItemsByGroup(RicherTextBoxToolStripGroups group, bool visible)
 {
     if ((group & RicherTextBoxToolStripGroups.SaveAndLoad) != 0)
     {
         tsbtnSave.Visible = visible;
         tsbtnOpen.Visible = visible;
         toolStripSeparator6.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.FontNameAndSize) != 0)
     {
         tscmbFont.Visible = visible;
         tscmbFontSize.Visible = visible;
         tsbtnChooseFont.Visible = visible;
         toolStripSeparator1.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.BoldUnderlineItalic) != 0)
     {
         tsbtnBold.Visible = visible;
         tsbtnItalic.Visible = visible;
         tsbtnUnderline.Visible = visible;
         toolStripSeparator2.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.Alignment) != 0)
     {
         tsbtnAlignLeft.Visible = visible;
         tsbtnAlignRight.Visible = visible;
         tsbtnAlignCenter.Visible = visible;
         toolStripSeparator3.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.FontColor) != 0)
     {
         tsbtnFontColor.Visible = visible;
         tsbtnWordWrap.Visible = visible;
         toolStripSeparator4.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.IndentationAndBullets) != 0)
     {
         tsbtnIndent.Visible = visible;
         tsbtnOutdent.Visible = visible;
         tsbtnBullets.Visible = visible;
         toolStripSeparator5.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.Insert) != 0)
     {
         tsbtnInsertPicture.Visible = visible;
         toolStripSeparator7.Visible = visible;
     }
     if ((group & RicherTextBoxToolStripGroups.Zoom) != 0)
     {
         tsbtnZoomOut.Visible = visible;
         tsbtnZoomIn.Visible = visible;
         tstxtZoomFactor.Visible = visible;
     }
 }