private static void DoFlash(IVectorGraphic graphic, SynchronizationContext context)
 {
     context.Send(delegate
     {
         if (graphic.ImageViewer != null && graphic.ImageViewer.DesktopWindow != null)
         {
             graphic.Color = _invalidColor;
             graphic.Draw();
         }
     }, null);
     Thread.Sleep(_flashDelay);
     context.Send(delegate
     {
         if (graphic.ImageViewer != null && graphic.ImageViewer.DesktopWindow != null)
         {
             graphic.Color = _normalColor;
             graphic.Draw();
         }
     }, null);
 }
		private static void DoFlash(IVectorGraphic graphic, SynchronizationContext context)
		{
			context.Send(delegate
			             	{
			             		if (graphic.ImageViewer != null && graphic.ImageViewer.DesktopWindow != null)
			             		{
			             			graphic.Color = _invalidColor;
			             			graphic.Draw();
			             		}
			             	}, null);
			Thread.Sleep(_flashDelay);
			context.Send(delegate
			             	{
			             		if (graphic.ImageViewer != null && graphic.ImageViewer.DesktopWindow != null)
			             		{
			             			graphic.Color = _normalColor;
			             			graphic.Draw();
			             		}
			             	}, null);
		}
Exemple #3
0
        private void SetDashStyle(IVectorGraphic graphic)
        {
            if (graphic.LineStyle == LineStyle.Solid)
            {
                _pen.DashStyle = DashStyle.Solid;
            }
            else
            {
                _pen.DashStyle = DashStyle.Custom;

                if (graphic.LineStyle == LineStyle.Dash)
                {
                    _pen.DashPattern = new float[] { 4.0F, 4.0F }
                }
                ;
                else
                {
                    _pen.DashPattern = new float[] { 2.0F, 4.0F }
                };
            }
        }
Exemple #4
0
        private static void SetDashStyle(Pen pen, IVectorGraphic graphic)
        {
            if (graphic.LineStyle == LineStyle.Solid)
            {
                pen.DashStyle = DashStyle.Solid;
            }
            else
            {
                pen.DashStyle = DashStyle.Custom;

                if (graphic.LineStyle == LineStyle.Dash)
                {
                    pen.DashPattern = new[] { 4.0F, 4.0F }
                }
                ;
                else
                {
                    pen.DashPattern = new[] { 2.0F, 4.0F }
                };
            }
        }
Exemple #5
0
		private void SetDashStyle(IVectorGraphic graphic)
		{
			if (graphic.LineStyle == LineStyle.Solid)
			{
				_pen.DashStyle = DashStyle.Solid;
			}
			else
			{
				_pen.DashStyle = DashStyle.Custom;

				if (graphic.LineStyle == LineStyle.Dash)
					_pen.DashPattern = new float[] { 4.0F, 4.0F };
				else
					_pen.DashPattern = new float[] { 2.0F, 4.0F };
			}
		}
Exemple #6
0
		private static void SetDashStyle(Pen pen, IVectorGraphic graphic)
		{
			if (graphic.LineStyle == LineStyle.Solid)
			{
				pen.DashStyle = DashStyle.Solid;
			}
			else
			{
				pen.DashStyle = DashStyle.Custom;

				if (graphic.LineStyle == LineStyle.Dash)
					pen.DashPattern = new[] {4.0F, 4.0F};
				else
					pen.DashPattern = new[] {2.0F, 4.0F};
			}
		}