예제 #1
0
        public BandPanel(string caption, ContentPanel content, BandTagInfo bti)
        {
            BandButton bandButton = new BandButton(caption, bti);

            bandButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;//設定文字對其方式
            Controls.Add(bandButton);
            Controls.Add(content);
        }
예제 #2
0
 public BandButton(string caption, BandTagInfo bti)
 {
     Text        = caption;
     FlatStyle   = FlatStyle.Standard;
     Visible     = true;
     this.bti    = bti;
     Click      += new EventHandler(SelectBand);
     Click      += Main_Frm.pForm1.OutlookMenuMain_Click;//2017/01/10 讓Outlook 主按鈕的事件呼叫UI的事件函數
     MouseLeave += new EventHandler(OnMouseLeave);
     MouseMove  += new MouseEventHandler(OnMouseMove);
 }
예제 #3
0
        public BandTagInfo bti;        //2017/01/10 讓Outlook 主按鈕的事件呼叫UI的事件函數 private BandTagInfo bti;

        public BandButton(Image im, string caption, BandTagInfo bti)
        {
            Image       = im;
            Text        = caption;
            ImageAlign  = ContentAlignment.MiddleLeft;
            TextAlign   = ContentAlignment.MiddleCenter;
            FlatStyle   = FlatStyle.Standard;
            Visible     = true;
            this.bti    = bti;
            Click      += new EventHandler(SelectBand);
            Click      += Main_Frm.pForm1.OutlookMenuMain_Click;//2017/01/10 讓Outlook 主按鈕的事件呼叫UI的事件函數
            MouseLeave += new EventHandler(OnMouseLeave);
            MouseMove  += new MouseEventHandler(OnMouseMove);
        }
예제 #4
0
        public void AddBand(Image im, string caption, ContentPanel content, int setIndex = -1)
        {
            content.outlookBar = this;
            int index;

            if (setIndex < 0)//為了日後手動指定做修改 at 2017/09/11
            {
                index = Controls.Count;
            }
            else
            {
                index = setIndex;
            }
            BandTagInfo bti       = new BandTagInfo(this, index);
            BandPanel   bandPanel = new BandPanel(im, caption, content, bti);

            Controls.Add(bandPanel);
            UpdateBarInfo();
            RecalcLayout(bandPanel, index);
        }