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


C# IDrawingView类代码示例

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


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

示例1: ResizeHandleUndoActivity

			public ResizeHandleUndoActivity(IDrawingView view, IFigure owner): base (view) {
				Undoable = true;
				Redoable = true;
				Owner = owner;
				OldDisplayBox = Owner.DisplayBox;
				NewDisplayBox = Owner.DisplayBox;
			}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:7,代码来源:ResizeHandle.cs

示例2: DrawInRegionVisitor

 public DrawInRegionVisitor(Gdk.Region region, Cairo.Context context, IDrawingView view)
 {
     this.context = context;
     this.region = region;
     this.view = view;
     this.figures = new List<Figure> ();
 }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:7,代码来源:DrawInRegionVisitor.cs

示例3: InvokeStep

		public override void InvokeStep (double x, double y, IDrawingView view)	{
			RectangleD r = Owner.DisplayBox;

			PointD new_location = new PointD (r.X, Math.Min (r.Y + r.Height, y));
			PointD new_corner   = new PointD (Math.Max (r.X, x), r.Y + r.Height);

			Owner.DisplayBox = new RectangleD (new_location, new_corner);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:8,代码来源:NorthEastHandle.cs

示例4: ChangeAttributeUndoActivity

			public ChangeAttributeUndoActivity (IDrawingView drawingView, 
				FigureAttribute attribute, object value) : base (drawingView) {
				_originalValues = new Dictionary<IFigure, object> ();
				Undoable        = true;
				Redoable        = true;
				Attribute       = attribute;
				Value           = value;
			}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:8,代码来源:ChangeAttributeCommand.cs

示例5: InvokeStep

        public override void InvokeStep(double x, double y, IDrawingView view)
        {
            RectangleD r = Owner.DisplayBox;

            var new_location = new PointD (Math.Min (r.X + r.Width, x), r.Y);
            var new_corner   = new PointD (r.X + r.Width, Math.Max (r.Y, y));

            Owner.DisplayBox = new RectangleD (new_location, new_corner);
        }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:9,代码来源:SouthWestHandle.cs

示例6: InvokeStep

        public override void InvokeStep(double x, double y, IDrawingView view)
        {
            LabelFigure label = (LabelFigure) Owner;
            PointD delta = label.HandleDeltaPosition();
            Owner.MoveTo(x - delta.X, y - delta.Y);

            double offsetX = Owner.DisplayBox.Width/2 - delta.X;
            double offsetY = Owner.DisplayBox.Height/2 - delta.Y;
            label.SetPosition(new PointD(x + offsetX, y + offsetY));
        }
开发者ID:mono,项目名称:monohotdraw,代码行数:10,代码来源:LabelHandle.cs

示例7: InvokeEnd

		public void InvokeEnd (double x, double y, IDrawingView view) {
			WrappedHandle.InvokeEnd(x, y, view);
			
			IUndoActivity activity = WrappedHandle.UndoActivity;
			
			if (activity != null && activity.Undoable && view.Editor.UndoManager != null) {
				view.Editor.UndoManager.PushUndo(activity);
				view.Editor.UndoManager.ClearRedos();
			}
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:10,代码来源:UndoableHandle.cs

示例8: Draw

		public virtual void Draw (Context context, IDrawingView view) {
			RectangleD rect = ViewDisplayBox(view);
			context.Save();
			context.LineWidth = LineWidth;
			context.Rectangle (GdkCairoHelper.CairoRectangle (rect));
			context.Color = FillColor;
			context.FillPreserve ();
			context.Color = LineColor;
			context.Stroke ();
			context.Restore();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:11,代码来源:AbstractHandle.cs

示例9: InvokeEnd

		public override void InvokeEnd (double x, double y, IDrawingView view) {
			PolyLineFigure figure = ((PolyLineFigure) Owner);
			// eliminates handles in the middle of a straight line
			if (figure.PointCount > 2 && Index != 0 && Index != (figure.PointCount - 1)) {
				PointD p1 = figure.PointAt (Index - 1);
				PointD p2 = figure.PointAt (Index + 1);
				if (Geometry.LineContainsPoint (p1.X, p1.Y, p2.X, p2.Y, x, y)) {
					figure.RemovePointAt (Index);
				}
			}
			base.InvokeEnd(x, y, view);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:LineConnectionHandle.cs

示例10: InvokeStart

 public override void InvokeStart(double x, double y, IDrawingView view) 
 {
     m_connection = CreateConnection();
     m_connection.EndPoint = new PointD (x, y);
     m_connection.StartPoint = new PointD (x, y);
     m_connection.ConnectStart (Owner.ConnectorAt(x, y));
     m_connection.UpdateConnection();
     view.Drawing.Add(m_connection);
     view.ClearSelection();
     view.AddToSelection(m_connection);
     m_handle = view.FindHandle(x, y);
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:NewConnectionHandle.cs

示例11: InvokeEnd

 public override void InvokeEnd (double x, double y, IDrawingView view)
 {
     base.InvokeEnd (x, y, view);
     
     if (clicked) 
     {
         Experiment ownerExperiment = m_ownerConnection.Owner;
         ownerExperiment.RemoveConnection(m_ownerConnection.ExperimentNodeConnection);
     }
     
     clicked = false;
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:RemoveConnectionHandle.cs

示例12: InvokeEnd

 public override void InvokeEnd(double x, double y, IDrawingView view) 
 {
     if (m_handle != null) {
         m_handle.InvokeEnd(x, y, view);
     }
     
     if (m_connection.EndConnector == null) {
         m_connection.DisconnectStart ();
         m_connection.DisconnectEnd ();
         view.Drawing.Remove(m_connection);
         view.ClearSelection();
     }
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:13,代码来源:NewConnectionHandle.cs

示例13: SelectFiguresOnRect

		public void SelectFiguresOnRect (IDrawingView view, bool shift_pressed) 	{
			foreach (IFigure figure in view.Drawing.FiguresEnumeratorReverse) {
				RectangleD rect = figure.DisplayBox;
				if (_selectionRect.Contains (rect.X, rect.Y)
					&& _selectionRect.Contains (rect.X2, rect.Y2)) {
						if (shift_pressed) {
							view.ToggleSelection (figure);
						}
						else {
							view.AddToSelection (figure);
						}
				}
			}
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:14,代码来源:SelectAreaTool.cs

示例14: Draw

		public override void Draw (Cairo.Context context, IDrawingView view)
		{
			context.Save();
			base.Draw(context, view);
			
			context.LineWidth = 1.0;
			
			if (Active) {
				DrawOn(context, view);
			}
			else {
				DrawOff(context, view);
			}
			context.Restore();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:15,代码来源:ToggleButtonHandle.cs

示例15: InvokeEnd

 public override void InvokeEnd (double x, double y, IDrawingView view)
 {
     base.InvokeEnd (x, y, view);
     
     if (clicked) 
     {
         IEditableExperiment experiment = m_ownerComponent.ExperimentNode.Owner as IEditableExperiment;
         if(experiment != null) 
         {
             experiment.RemoveVertex(m_ownerComponent.ExperimentNode);
         }
     }
     
     clicked = false;
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:15,代码来源:RemoveNodeHandle.cs


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