Ejemplo n.º 1
0
        public void addTopSearchTag(string text, int count)
        {
            CButtonLib.CButton a = new CButtonLib.CButton
            {
                Text           = text,
                TextAlign      = ContentAlignment.MiddleCenter,
                Font           = new Font(btnHomeFileType.Font.Name, 9.25F, FontStyle.Regular),
                Size           = new Size(70, 24),
                BackColor      = Color.Transparent,
                ForeColor      = Color.White,
                TextMargin     = new Padding(0, 2, 0, 2),
                BorderColor    = Color.FromArgb(51, 60, 67),
                ColorFillSolid = Color.FromArgb(51, 60, 67),
                FillType       = CButtonLib.CButton.eFillType.Solid,
                TextShadowShow = false,
                ShowFocus      = CButtonLib.CButton.eFocus.None,
                Margin         = new Padding(0, 3, 6, 3),
                BorderShow     = true,
                DimFactorClick = 0,
                DimFactorHover = 0,
                Cursor         = Cursors.Hand,
                Name           = "tagItem" + count
            };

            a.Corners.All = 2;

            Font  myFont = new Font(a.Font.FontFamily, a.Font.Size);
            SizeF mySize = a.CreateGraphics().MeasureString(a.Text, myFont);

            a.Width            = (((int)(Math.Round(mySize.Width, 0))) + 10);
            a.ClickButtonArea += btnTopSearchesTag_ClickButtonArea;
            panelTopSearches.Controls.Add(a);
        }
Ejemplo n.º 2
0
        public void selectTabTitle(CButtonLib.CButton cbtn)
        {
            Color selectedRGB    = Color.FromArgb(51, 60, 67);
            Color nonSelectedRGB = Color.FromArgb(43, 52, 59);

            titleHome.ColorFillSolid        = nonSelectedRGB;
            titleHome.BorderColor           = nonSelectedRGB;
            titleHome.BackColor             = nonSelectedRGB;
            titleFiles.ColorFillSolid       = nonSelectedRGB;
            titleFiles.BorderColor          = nonSelectedRGB;
            titleFiles.BackColor            = nonSelectedRGB;
            titleDiscover.ColorFillSolid    = nonSelectedRGB;
            titleDiscover.BorderColor       = nonSelectedRGB;
            titleDiscover.BackColor         = nonSelectedRGB;
            titleSubmit.ColorFillSolid      = nonSelectedRGB;
            titleSubmit.BorderColor         = nonSelectedRGB;
            titleSubmit.BackColor           = nonSelectedRGB;
            titleSettings.ColorFillSolid    = nonSelectedRGB;
            titleSettings.BorderColor       = nonSelectedRGB;
            titleSettings.BackColor         = nonSelectedRGB;
            titleInformation.ColorFillSolid = nonSelectedRGB;
            titleInformation.BorderColor    = nonSelectedRGB;
            titleInformation.BackColor      = nonSelectedRGB;

            cbtn.ColorFillSolid = selectedRGB;
            cbtn.BorderColor    = selectedRGB;
            cbtn.BackColor      = selectedRGB;
        }
Ejemplo n.º 3
0
        public void selectFilesTab(CButtonLib.CButton cbtn)
        {
            Color selectedRGB        = Color.FromArgb(51, 60, 67);
            Color nonSelectedRGB     = Color.Transparent;
            Color selectedForeRGB    = Color.White;
            Color nonSelectedForeRGB = Color.Silver;

            titleFilesAll.ColorFillSolid       = nonSelectedRGB;
            titleFilesAll.BorderColor          = nonSelectedRGB;
            titleFilesAll.ForeColor            = nonSelectedForeRGB;
            titleFilesVideo.ColorFillSolid     = nonSelectedRGB;
            titleFilesVideo.BorderColor        = nonSelectedRGB;
            titleFilesVideo.ForeColor          = nonSelectedForeRGB;
            titleFilesAudio.ColorFillSolid     = nonSelectedRGB;
            titleFilesAudio.BorderColor        = nonSelectedRGB;
            titleFilesAudio.ForeColor          = nonSelectedForeRGB;
            titleFilesEbooks.ColorFillSolid    = nonSelectedRGB;
            titleFilesEbooks.BorderColor       = nonSelectedRGB;
            titleFilesEbooks.ForeColor         = nonSelectedForeRGB;
            titleFilesSubtitles.ColorFillSolid = nonSelectedRGB;
            titleFilesSubtitles.BorderColor    = nonSelectedRGB;
            titleFilesSubtitles.ForeColor      = nonSelectedForeRGB;
            titleFilesTorrents.ColorFillSolid  = nonSelectedRGB;
            titleFilesTorrents.BorderColor     = nonSelectedRGB;
            titleFilesTorrents.ForeColor       = nonSelectedForeRGB;
            titleFilesMobile.ColorFillSolid    = nonSelectedRGB;
            titleFilesMobile.BorderColor       = nonSelectedRGB;
            titleFilesMobile.ForeColor         = nonSelectedForeRGB;
            titleFilesArchives.ColorFillSolid  = nonSelectedRGB;
            titleFilesArchives.BorderColor     = nonSelectedRGB;
            titleFilesArchives.ForeColor       = nonSelectedForeRGB;
            titleFilesCustom.ColorFillSolid    = nonSelectedRGB;
            titleFilesCustom.BorderColor       = nonSelectedRGB;
            titleFilesCustom.ForeColor         = nonSelectedForeRGB;
            titleFilesOther.ColorFillSolid     = nonSelectedRGB;
            titleFilesOther.BorderColor        = nonSelectedRGB;
            titleFilesOther.ForeColor          = nonSelectedForeRGB;
            titleFilesLocal.ColorFillSolid     = nonSelectedRGB;
            titleFilesLocal.BorderColor        = nonSelectedRGB;
            titleFilesLocal.ForeColor          = nonSelectedForeRGB;
            titleFilesSaved.ColorFillSolid     = nonSelectedRGB;
            titleFilesSaved.BorderColor        = nonSelectedRGB;
            titleFilesSaved.ForeColor          = nonSelectedForeRGB;

            cbtn.ColorFillSolid = selectedRGB;
            cbtn.BorderColor    = selectedRGB;
            cbtn.ForeColor      = selectedForeRGB;
        }
Ejemplo n.º 4
0
 private void btnTopSearchesTag_ClickButtonArea(object Sender, MouseEventArgs e)
 {
     CButtonLib.CButton tagItem = Sender as CButtonLib.CButton;
     txtSearchFilesHome.Text = tagItem.Text;
     btnSearchFilesHome.PerformClick();
 }