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


C# IDrawingView.ClearSelection方法代码示例

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


在下文中一共展示了IDrawingView.ClearSelection方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: DeleteFigures

 private void DeleteFigures (IDrawingView view) {
     List <IFigure> figures = new List <IFigure> ();
     
     foreach (IFigure fig in view.SelectionEnumerator) {
         figures.Add (fig);
     }
     
     view.ClearSelection ();
     
     foreach (IFigure fig in figures) {
         view.Drawing.Remove (fig);
     }
 }
开发者ID:CoEST,项目名称:TraceLab,代码行数:13,代码来源:SelectionTool.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

示例5: InvokeStart

 public override void InvokeStart(double x, double y, IDrawingView view)
 {
     if (Owner is TableFigure) {
         _clicked = !_clicked;
         TableFigure f = (TableFigure)Owner;
         if (_locator is IndexLocator) {
             //Show/Hide Indexes
             if (f.showIndexes) {
                 foreach (Index indx in f.Model.indexes) {
                     f.Remove (indx);
                 }
                 f.showIndexes = false;
             } else {
                 foreach (Index indx in f.Model.indexes) {
                     f.Add (indx);
                 }
                 f.showIndexes = true;
             }
         }
         if (_locator is TriggerLocator) {
             //Show/Hide Triggers
             if (f.showTriggers) {
                 foreach (Trigger trg in f.Model.triggers) {
                     f.Remove (trg);
                 }
                 f.showTriggers = false;
             } else {
                 foreach (Trigger trg in f.Model.triggers) {
                     f.Add (trg);
                 }
                 f.showTriggers = true;
             }
         }
         if (_locator is ColumnAddLocator){
             //Add a new column to table
             f.addNewColumn();
         }
         if (_locator is ColumnRemoveLocator){
             //Activate a state where the figure wait for the user to click a column and then delete it
             f.activateRemoveColumn();
         }
         if (_locator is ForeignKeyLocator){
             //Start Creation of Foreign Key
             RelationshipFigure rel = new RelationshipFigure ();
             f.figureCanvas.Tool = new ConnectionCreationTool (f.figureCanvas, rel);
             f.figureCanvas.Tool.MouseDown(new MouseEvent(f.figureCanvas.View,null,new Cairo.PointD(x,y)));
         }
         if (_locator is RemoveTableLocator){
             //Remove Table Selected
             f.unPopulateTable();
             //view.ToggleSelection(f);
             view.ClearSelection ();
             view.Drawing.Remove(f);
             view.Remove(f);
             List<RelationshipFigure> deleteFigures = new List<RelationshipFigure>();
             foreach ( IFigure fig in view.Drawing.FiguresEnumerator){
                     if(fig is RelationshipFigure){
                         TableFigure startTable=((fig as RelationshipFigure).StartFigure as TableFigure);
                         TableFigure endTable=((fig as RelationshipFigure).EndFigure as TableFigure);
                         if(startTable.Model.Name==f.Model.Name || endTable.Model.Name==f.Model.Name)
                             deleteFigures.Add(fig as RelationshipFigure);
                     }
                 }
             if(deleteFigures.Count>0){
                 view.ClearSelection ();
                 foreach(RelationshipFigure delRelationship in deleteFigures){
                         view.Drawing.Remove(delRelationship);
                     }
                 }
         }
     }
 }
开发者ID:xiul,项目名称:Monodevelop-Database-Modeler-Addin,代码行数:72,代码来源:ButtonHandle.cs

示例6: DeleteFigures

        private void DeleteFigures(IDrawingView view)
        {
            IEnumerable<Figure> figures = view.SelectionEnumerator.ToFigures ();

            view.ClearSelection ();
            view.RemoveRange (figures);
        }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:7,代码来源:SelectionTool.cs


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