当前位置: 首页>>代码示例>>C#>>正文


C# Forms.PaintEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.PaintEventArgs的典型用法代码示例。如果您正苦于以下问题:C# PaintEventArgs类的具体用法?C# PaintEventArgs怎么用?C# PaintEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PaintEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了PaintEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnPaint

 protected override void OnPaint(PaintEventArgs pevent)
 {
     GraphicsPath grPath = new GraphicsPath();
     grPath.AddEllipse(0, 0, ClientSize.Width, ClientSize.Height);
     this.Region = new System.Drawing.Region(grPath);
     base.OnPaint(pevent);
 }
开发者ID:Sensco,项目名称:TestRunner,代码行数:7,代码来源:RoundButton.cs

示例2: BrowserPaint

        private void BrowserPaint(object sender, PaintEventArgs e)
        {
            browser.Paint -= BrowserPaint;

            //Invalidate browser as short term fix for #522
            browser.Invalidate();
        }
开发者ID:nick121212,项目名称:xima_desktop3,代码行数:7,代码来源:SimpleBrowserForm.cs

示例3: OnPaint

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            if (grContext != null)
            {
                var desc = new GRBackendRenderTargetDesc
                {
                    Width = Width,
                    Height = Height,
                    Config = GRPixelConfig.Bgra8888,
                    Origin = GRSurfaceOrigin.TopLeft,
                    SampleCount = 1,
                    StencilBits = 0,
                    RenderTargetHandle = IntPtr.Zero,
                };

                using (var surface = SKSurface.Create(grContext, desc))
                {
                    var skcanvas = surface.Canvas;

                    sample.Method(skcanvas, Width, Height);

                    skcanvas.Flush();
                }

                SwapBuffers();
            }
        }
开发者ID:Core2D,项目名称:SkiaSharp,代码行数:29,代码来源:SkiaGLControl.cs

示例4: xpanel_Paint

		void xpanel_Paint(object sender, PaintEventArgs e)
		{
			if (this.mRefreshMode != RegionRefreshMode.Always)
			{
				this.Render();
			}
		}
开发者ID:mind0n,项目名称:hive,代码行数:7,代码来源:XnaPanel.cs

示例5: PictureBoxPaint

        private void PictureBoxPaint(object sender, PaintEventArgs e)
        {
            var bitmaps = _goldBoxFile.Bitmaps;

            const int padding = 6;
            var x = 0;
            var y = 0;
            var bitmapCount = bitmaps.Count;
            var rowImageHeight = 0;

            for (var i = 0; i < bitmapCount; i++)
            {
                var currentImage = bitmaps[i];

                if (x + (currentImage.Width * Zoom) > ContainerWidth)
                {
                    x = 0;
                    y += rowImageHeight + (int)(padding * Zoom);
                    rowImageHeight = (int)(currentImage.Height * Zoom);
                }
                else
                {
                    rowImageHeight = Math.Max(rowImageHeight, (int)(currentImage.Height * Zoom));
                }

                e.Graphics.DrawImage(currentImage, x, y, currentImage.Width * Zoom, currentImage.Height * Zoom);
                x += (int)((currentImage.Width + padding) * Zoom);
            }

            _pictureBox.Width = ContainerWidth;
            _pictureBox.Height = y + (int)((rowImageHeight * Zoom));
        }
开发者ID:bsimser,项目名称:goldbox,代码行数:32,代码来源:FruaTlbViewer.cs

示例6: OnPaintBackground

 protected override void OnPaintBackground(PaintEventArgs e)
 {
     var page = Program.MainWindow.navigationControl.CurrentNavigatable as Control;
     if (page?.BackgroundImage != null) this.RenderControlBgImage(page, e);
     else e.Graphics.Clear(Config.BgColor);
     FrameBorderRenderer.Instance.RenderToGraphics(e.Graphics, DisplayRectangle, FrameBorderRenderer.StyleType.Shraka);
 }
开发者ID:DeinFreund,项目名称:Zero-K-Infrastructure,代码行数:7,代码来源:HostDialog.cs

示例7: PictureBoxPaint

        private void PictureBoxPaint(object sender, PaintEventArgs e)
        {

            var bitmaps = _file.Bitmaps;

            const int padding = 6;
            var x = 0;
            var y = 25;
            var bitmapCount = bitmaps.Count;
            var rowImageHeight = 0;
            
            for (var i = 0; i < bitmapCount; i++)
            {
                var currentImage = bitmaps[i];
                // make sure walls are displayed a row at a time - ie start a new row at 10, 20, 29, 38 + 47 if we have a wallTLB
                if (x + (currentImage.Width * Zoom) > ContainerWidth || (_wallTlb && (i % 47 == 10 || i % 47 == 20 || i % 47 == 29 || i % 47 == 38 || i % 47 == 0)))
                {
                    x = 0;
                    y += rowImageHeight + (int)(padding * Zoom);
                    rowImageHeight = (int)(currentImage.Height * Zoom);
                }
                else
                {
                    rowImageHeight = Math.Max(rowImageHeight, (int)(currentImage.Height * Zoom));
                }

                e.Graphics.DrawImage(currentImage, x, y, currentImage.Width * Zoom, currentImage.Height * Zoom);
                x += (int)((currentImage.Width + padding) * Zoom);
            }

            _pictureBox.Width = ContainerWidth;
            _pictureBox.Height = y + (int)((rowImageHeight * Zoom));
        }
开发者ID:bsimser,项目名称:goldbox,代码行数:33,代码来源:FruaTlbViewer.cs

示例8: DrawAll

 public void DrawAll(PaintEventArgs e)
 {
     foreach (IDrawable drawit in drawable)
     {
         drawit.Draw(e);
     }
 }
开发者ID:nandorsoma,项目名称:LameSnakeGame,代码行数:7,代码来源:GameControl.cs

示例9: OnPaint

        protected override void OnPaint(PaintEventArgs e)
        {
            Debug.WriteLine("OnPaint");

            //draw something on the back surface

            var p1 = new PointD(10, 10);
            var p2 = new PointD(100, 10);
            var p3 = new PointD(100, 100);
            var p4 = new PointD(10, 100);

            BackContext.SetSourceColor(new Cairo.Color(1,0,0));
            BackContext.MoveTo(p1);
            BackContext.LineTo(p2);
            BackContext.LineTo(p3);
            BackContext.LineTo(p4);
            BackContext.LineTo(p1);
            BackContext.ClosePath();
            BackContext.Stroke();

            BackContext.SetSourceColor(new Cairo.Color(0, 1, 0));
            BackContext.MoveTo(new PointD(p3.X + 10, p3.Y + 10));
            Cairo.Path path = DWriteCairo.RenderLayoutToCairoPath(BackContext, textLayout);
            BackContext.AppendPath(path);
            path.Dispose();
            BackContext.Fill();

            //copy back surface to font surface
            SwapBuffer();
        }
开发者ID:zwcloud,项目名称:ZWCloud.DwriteCairo,代码行数:30,代码来源:Form1.cs

示例10: OnPaint

        /// <summary>
        /// 绘制界面
        /// </summary>
        /// <param name="e"></param>
        protected override void OnPaint(PaintEventArgs e)
        {
            if (Columns.Count != 0)
            {
                this.Columns["ID"].Visible = false;
                this.Columns["State"].Visible = false;
                this.Columns["Ver"].Visible = false;
                this.Columns["Group"].Visible = false;
                this.Columns["NoAnswer"].Visible = false;

                this.Columns["CmdVersion"].Visible = false;
                this.Columns["CmdPolling"].Visible = false;
                this.Columns["CmdPollingRight"].Visible = false;
                this.Columns["CmdReset"].Visible = false;
                this.Columns["IsPointSelect"].Visible = false;
                this.Columns["CmdTwo"].Visible = false;
                this.Columns["IsTwo"].Visible = false;
                this.Columns["IpAddress"].Visible = false;
                this.Columns["Port"].Visible = false;
                this.Columns["SCmd"].Visible = false;
                this.Columns["SaveCount"].Visible = false;
                this.Columns["TimeCheckOut"].Visible = false;
                this.Columns["StationModel"].Visible = false;

                this.Columns["Address"].HeaderText = "地址";
                this.Columns["Address"].Width = 60;
                this.Columns["Address"].DisplayIndex = 0;

                this.Columns["CState"].HeaderText = "状态描述";
                this.Columns["CState"].Width = 100;
                this.Columns["CState"].DisplayIndex = 1;
            }

            base.OnPaint(e);
        }
开发者ID:ZoeCheck,项目名称:128_5.6_2010,代码行数:39,代码来源:DGStation.cs

示例11: OnPaint

        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
            e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

            base.OnPaint(e);
        }
开发者ID:tgjones,项目名称:apesharp,代码行数:7,代码来源:NonFlickerPanel.cs

示例12: OnPaint

 // Draw the new button.
 protected override void OnPaint(PaintEventArgs e)
 {
     GraphicsPath grPath = new GraphicsPath();
         grPath.AddEllipse(10, 10, 60, 60);
         this.Region = new System.Drawing.Region(grPath);
         base.OnPaint(e);
 }
开发者ID:vavio,项目名称:Kids-vs-IceCream,代码行数:8,代码来源:RoundButton.cs

示例13: OnPaint

 protected override void OnPaint(PaintEventArgs pe)
 {
     pe.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
     pe.Graphics.CompositingMode = CompositingMode.SourceCopy;
     pe.Graphics.PixelOffsetMode = PixelOffsetMode.Half;
     base.OnPaint(pe);
 }
开发者ID:Lannyland,项目名称:IPPA,代码行数:7,代码来源:MyPictureBox.cs

示例14: OnPaint

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            int x = (SplitterRectangle.Width - Properties.Resources.longGripOff.Width) / 2;
            e.Graphics.DrawImageUnscaled(Properties.Resources.longGripOff, x, SplitterRectangle.Top);
        }
开发者ID:SteGriff,项目名称:WirelessFireless,代码行数:7,代码来源:GripSplitContainer.cs

示例15: OnPaint

 protected override void OnPaint(PaintEventArgs e)
 {
     //this.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     //            | System.Windows.Forms.AnchorStyles.Right)));
     //this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular);
     base.OnPaint(e);
 }
开发者ID:neozhu,项目名称:wmsrf-winceclient,代码行数:7,代码来源:rfButtonCommand.cs


注:本文中的System.Windows.Forms.PaintEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。