Esempio n. 1
0
        private void itemtitle_MouseClick(object sender, MouseEventArgs e)
        {
            ItemTitle_Button btn = sender as ItemTitle_Button;

            switch (btn.ItemstrTitle)
            {
            case "公告通知":
                FrmMsg.Show("公告通知", "提示");
                break;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 标题二
        /// </summary>
        /// <param name="title">标题</param>
        /// <param name="btnContent">more btn内容</param>
        internal void CreateTitle(string title, string btnContent)
        {
            ItemTitle_Button itemtitle = new ItemTitle_Button();

            itemtitle.Margin        = new Padding(0);
            itemtitle.ItemstrTitle  = title;
            itemtitle.ItembackColor = FrmStyle.FormTitleBackColor;
            itemtitle.ItemFontColor = new System.Drawing.SolidBrush(FrmStyle.FormTitleFontColor);
            itemtitle.ItemFont      = FrmStyle.TextFont;
            itemtitle.MouseClick   += new MouseEventHandler(itemtitle_MouseClick);
            itemtitle.MouseMove    += new MouseEventHandler(itemtitle_MouseMove);
            itemtitle.Width         = this.Width - 2;
            itemtitle.Height        = 25;
            itemtitle.BtnContent    = btnContent;
            itemtitle.BtnRect       = new Rectangle(new Point(this.Width - 50, 0), new Size(50, 30));
            itemtitle.ItemFont2     = new System.Drawing.Font("微软雅黑", 9f);
            this.Controls.Add(itemtitle);
        }