Exemplo n.º 1
0
 private void picBoxSkin_MouseEnter(object sender, EventArgs e)
 {
     if (_skinForm == null)
     {
         s_bmp = ImageObject.GetResBitmap("GSSUI.ASkinImg.Shade.All_iconbutton_highlightBackground.png");
     }
     s_bmp            = (Bitmap)ImageObject.ProcImage(s_bmp, SharData.BackColor);
     picBoxSkin.Image = s_bmp;
 }
Exemplo n.º 2
0
 public FormSkin()
 {
     InitializeComponent();
     InitLanguageText();
     colorAreaAndSliderUserControl1.setColor(SharData.BackColor);
     this.BackgroundImage       = null;
     aPictrueBoxColor.NormalImg = ImageObject.GetResBitmap("GSSUI.ASkinImg.Shade.TbAdjustColorNormal.png");
     aPictrueBoxShade.NormalImg = ImageObject.GetResBitmap("GSSUI.ASkinImg.Shade.TbShadingNormal.png");
     aPictrueBoxColor.OverImg   = ImageObject.GetResBitmap("GSSUI.ASkinImg.Shade.TbAdjustColorPushed.png");
     aPictrueBoxShade.OverImg   = ImageObject.GetResBitmap("GSSUI.ASkinImg.Shade.TbShadingPushed.png");
     aPictrueBoxColor_Click(null, null);
 }
Exemplo n.º 3
0
        private void PicB5_Click(object sender, EventArgs e)
        {
            GSSUI.SharData.BackColor = Color.FromArgb(12, 130, 175);
            Bitmap bg = ImageObject.GetResBitmap("GSSUI.ASkinImg.Shade.wallpaper_black_01.jpg");

            GSSUI.SharData.BackImage = bg;

            foreach (Form f in Application.OpenForms)
            {
                if (f.Name != "FormSkin")
                {
                    f.BackColor       = GSSUI.SharData.BackColor;
                    f.BackgroundImage = GSSUI.SharData.BackImage;
                    f.Invalidate(true);
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 重绘控件
        /// </summary>
        /// <param name="e"></param>
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            base.OnPaint(e);


            try
            {
                if (state == State.MouseOver && _OverImg == null)
                {
                    base.InvokePaintBackground(this, new PaintEventArgs(e.Graphics, base.ClientRectangle));
                    ImageDrawRect.DrawRect(e.Graphics, NormalImg, e.ClipRectangle, 1, 1);
                    LineartBrush = new LinearGradientBrush(
                        new Rectangle(0, 0, ClientRectangle.Width, ClientRectangle.Height),
                        Color.FromArgb(230, Color.White), Color.FromArgb(250, Color.White), 90);
                    g.FillRectangle(LineartBrush, new Rectangle(0, 0, ClientRectangle.Width, ClientRectangle.Height));
                    ImageDrawRect.DrawRect(g, ImageObject.GetResBitmap("GSSUI.ASkinImg.ButtonImg.Botton2.png"), e.ClipRectangle, Rectangle.FromLTRB(10, 10, 10, 10), 1, 5);
                }
            }
            catch
            { }
        }
        public FormMsgBox(string message, string title, MessageBoxButtons mbb, MessageBoxIcon mbi)
        {
            this.message = message;
            InitializeComponent();
            switch (mbb)
            {
            case MessageBoxButtons.AbortRetryIgnore:
                break;

            case MessageBoxButtons.OK:
                aButtonOK.Left = this.Width - aButtonOK.Width - 20;
                break;

            case MessageBoxButtons.OKCancel:
                mode                  = 1;
                aButtonOK.Text        = LanguageResource.Language.BtnSure;
                aButtonCancel.Text    = LanguageResource.Language.BtnCancel;
                aButtonCancel.Visible = true;
                break;

            case MessageBoxButtons.RetryCancel:
                aButtonCancel.Visible = true;
                aButtonOK.Visible     = false;
                // Retry.Visible = true;
                break;

            case MessageBoxButtons.YesNo:
                mode = 2;
                //aButtonOK.Left = aButtonOK.Left - 30;
                //aButtonCancel.Left = aButtonCancel.Left - 30;
                aButtonOK.Text        = LanguageResource.Language.BtnYes;
                aButtonCancel.Text    = LanguageResource.Language.BtnNo;
                aButtonCancel.Visible = true;
                break;

            case MessageBoxButtons.YesNoCancel:
                mode                  = 3;
                aButtonOK.Text        = LanguageResource.Language.BtnYes;
                aButtonCancel.Text    = LanguageResource.Language.BtnCancel;
                aButtonCancel.Visible = true;
                break;
            }
            switch (mbi)
            {
            case MessageBoxIcon.Asterisk:
                iconPic.Image = ImageObject.GetResBitmap("GSSUI.ASkinImg.FormImg.sysmessagebox_inforFile.png");
                break;

            case MessageBoxIcon.Error:
                iconPic.Image = ImageObject.GetResBitmap("GSSUI.ASkinImg.FormImg.sysmessagebox_errorFile.png");
                break;

            case MessageBoxIcon.Exclamation:
                iconPic.Image = ImageObject.GetResBitmap("GSSUI.ASkinImg.FormImg.sysmessagebox_warningFile.png");
                break;

            case MessageBoxIcon.None:
                break;

            case MessageBoxIcon.Question:
                iconPic.Image = ImageObject.GetResBitmap("GSSUI.ASkinImg.FormImg.sysmessagebox_questionFile.png");
                // iconPic.BackgroundImage = ImageObject.GetResBitmap("GSSUI.ASkinImg.FormImg.sysmessagebox_questionFile.png");
                break;
            }
            //if (message.Split('\n').Length > 6)
            //{
            //    labelMore.Visible = true;
            //}
            this.Text     = title;
            labelMSG.Text = message;
        }