本文整理汇总了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);
}
示例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);
}
}
}
}
示例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);
}
}
}
示例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);
}
}