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


C# IDrawingView.AddToSelection方法代码示例

本文整理汇总了C#中IDrawingView.AddToSelection方法的典型用法代码示例。如果您正苦于以下问题:C# IDrawingView.AddToSelection方法的具体用法?C# IDrawingView.AddToSelection怎么用?C# IDrawingView.AddToSelection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDrawingView的用法示例。


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

示例1: 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

示例2: 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

示例3: SelectFiguresOnRect

        private void SelectFiguresOnRect(IDrawingView view, bool shift_pressed)
        {
            foreach (Figure figure in view.Drawing.Children) {
                RectangleD rect = figure.DisplayBox;

                if (selectionRectangle.Contains (rect.X, rect.Y) &&
                    selectionRectangle.Contains (rect.X2, rect.Y2)) {
                        if (shift_pressed)
                            view.ToggleSelection (figure);
                        else
                            view.AddToSelection (figure);
                }
            }
        }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:14,代码来源:SelectAreaTool.cs

示例4: InvokeEnd

        public override void InvokeEnd(double x, double y, IDrawingView view)
        {
            if (_handle != null) {
                _handle.InvokeEnd(x, y, view);
            }

            if (_connection.EndConnector == null) {
                IFigure new_figure = CreateEndFigure();
                new_figure.MoveTo(x, y);
                view.Drawing.Add(new_figure);
                _connection.ConnectEnd(new_figure.ConnectorAt(0.0, 0.0));
                _connection.UpdateConnection();
                view.ClearSelection();
                view.AddToSelection(new_figure);
            }
        }
开发者ID:mono,项目名称:monohotdraw,代码行数:16,代码来源:NewConnectionHandle.cs


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