Пример #1
0
        //绘制窗体背景
        public void DrawSkinFormBackground(
            SkinFormBackgroundRenderEventArgs e)
        {
            OnRenderSkinFormBackground(e);
            SkinFormBackgroundRenderEventHandler handle =
                Events[EventRenderSkinFormBackground]
                as SkinFormBackgroundRenderEventHandler;

            if (handle != null)
            {
                handle(this, e);
            }
        }
Пример #2
0
        //绘制背景颜色
        protected override void OnRenderSkinFormBackground(
            SkinFormBackgroundRenderEventArgs e)
        {
            Graphics  g    = e.Graphics;
            Rectangle rect = e.ClipRectangle;
            SkinForm  form = e.SkinForm;

            using (AntiAliasGraphics antiGraphics = new AntiAliasGraphics(g))
            {
                //g.FillRectangle(Brushes.LightBlue, rect);
                //e.SkinForm.BackgroundImageLayout = ImageLayout.Stretch;

                //string imagei = Temp.Image;
                //Bitmap bt;
                //if (Temp.Image == "")
                //{
                //    bt = new Bitmap(Resource1.background);// new Bitmap(Image.FromFile(Globals.AppPath + "\\resource\\image\\background.jpg"));
                //}
                //else
                //{
                //    bt = new Bitmap(INIClass.GetImage(imagei), rect.Width, rect.Height);
                //}

                //g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
                ////using (Brush brush = new  TextureBrush(Image.FromFile(imagei)))
                //using (Brush brush = new TextureBrush(bt))
                //{
                //    rect.X -= 1;
                //    rect.Y -= 1;
                //    rect.Width += 1;
                //    rect.Height += 1;
                //    using (GraphicsPath path = GraphicsPathHelper.CreatePath(
                //       rect, form.Radius, form.RoundStyle, false))
                //    {
                //        g.FillPath(brush, path);
                //    }
                //}
            }
            // InitSkinForm(e.SkinForm);
        }
Пример #3
0
 //绘制窗体背景
 protected abstract void OnRenderSkinFormBackground(
     SkinFormBackgroundRenderEventArgs e);