Exemple #1
0
        private void RibbonBtn_MouseLeave(object sender, EventArgs e)
        {
            PictureBox     p = sender as PictureBox;
            RibbonBtnState s = p.Tag as RibbonBtnState;

            s.BtnHilited.Value = false;
        }
Exemple #2
0
        private void setRibbon(RibbonMode mode)
        {
            RibbonBtnState fileRibbonBtn     = new RibbonBtnState(this.RibbonBtnFile, this.fileRibbonPanel);
            RibbonBtnState viewRibbonBtn     = new RibbonBtnState(this.RibbonBtnView, this.viewRibbonPanel);
            RibbonBtnState settingsRibbonBtn = new RibbonBtnState(this.RibbonBtnSettings, this.settingsRibbonPanel);

            RibbonButtons = new List <RibbonBtnState>()
            {
                fileRibbonBtn, viewRibbonBtn, settingsRibbonBtn
            };

            fileRibbonBtn.BtnChecked.Value = true;

            //guiProps.Add<bool>("showRibbon")

            this.showRibbon.PropertyChanged += new PropertyChangedEventHandler(showOrHideRibbon_PropertyChanged);
            this.showRibbon.Value            = true;



            this.setDebugEventsColorToolStripMenuItem.Tag = guiProps.Get <Color>("debugEventColor");
            this.setInfoEventsColorToolStripMenuItem1.Tag = guiProps.Get <Color>("infoEventColor");
            this.setWarnEventsColorToolStripMenuItem.Tag  = guiProps.Get <Color>("warnEventColor");
            this.setErrorEventsColorToolStripMenuItem.Tag = guiProps.Get <Color>("errorEventColor");
            this.setFatalEventsColorToolStripMenuItem.Tag = guiProps.Get <Color>("fatalEventColor");


            this.setDebugEventsColorToolStripMenuItem.BackColor = guiProps.Get <Color>("debugEventColor").Value;
            this.setInfoEventsColorToolStripMenuItem1.BackColor = guiProps.Get <Color>("infoEventColor").Value;
            this.setWarnEventsColorToolStripMenuItem.BackColor  = guiProps.Get <Color>("warnEventColor").Value;
            this.setErrorEventsColorToolStripMenuItem.BackColor = guiProps.Get <Color>("errorEventColor").Value;
            this.setFatalEventsColorToolStripMenuItem.BackColor = guiProps.Get <Color>("fatalEventColor").Value;
        }
Exemple #3
0
        private void RibbonBtn_Click(object sender, EventArgs e)
        {
            PictureBox     p = sender as PictureBox;
            RibbonBtnState s = p.Tag as RibbonBtnState;

            foreach (RibbonBtnState r in this.RibbonButtons)
            {
                if (r.Equals(s))
                {
                    r.BtnChecked.Value = true;
                }
                else
                {
                    r.BtnChecked.Value = false;
                }
            }

            s.BtnHilited.Value    = false;
            this.showRibbon.Value = true;
        }