• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ILevelGeometry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: EndPointerSequenceCore

 protected override void EndPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
 {
     switch (info.Type) {
         case PointerEventType.Primary:
             EndSelectTilesSequence(info, viewport);
             break;
     }
 }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:8,代码来源:TileSelectTool.cs


示例2: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            switch (info.Type) {
                case PointerEventType.Primary:
                    StartFillSequence(info);
                    break;
            }

            UpdatePointerSequence(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:10,代码来源:TileFillTool.cs


示例3: EndPointerSequenceCore

        protected override void EndPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            _state = _state.EndPointerSequence(info, viewport);

            /*switch (info.Type) {
                case PointerEventType.Primary:
                    EndSelectObjectSequence(info, viewport);
                    break;
            }*/
        }
开发者ID:Elof3,项目名称:Treefrog,代码行数:10,代码来源:ObjectSelectTool.cs


示例4: PointerPositionCore

        protected override void PointerPositionCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            TileCoord location = TileLocation(info);
            if (!TileInRange(location) || _inAreaSequence) {
                HidePreviewMarker();
                return;
            }

            ShowPreviewMarker(location);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:10,代码来源:TileEraseTool.cs


示例5: EndPointerSequenceCore

 protected override void EndPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
 {
     switch (info.Type) {
         case PointerEventType.Primary:
             EndErasePathSequence(info);
             break;
         case PointerEventType.Secondary:
             EndEraseAreaSequence(info, viewport);
             break;
     }
 }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:11,代码来源:TileEraseTool.cs


示例6: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            switch (info.Type) {
                case PointerEventType.Primary:
                    StartSelectTilesSequence(info, viewport);
                    break;
                case PointerEventType.Secondary:
                    DefloatSelection();
                    break;
            }

            UpdatePointerSequence(info, viewport);
        }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:13,代码来源:TileSelectTool.cs


示例7: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            switch (info.Type) {
                case PointerEventType.Primary:
                    StartDrawObjectSequence(info);
                    break;
                case PointerEventType.Secondary:
                    Cancel();
                    break;
            }

            UpdatePointerSequence(info, viewport);
        }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:13,代码来源:ObjectDrawTool.cs


示例8: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            _state = _state.StartPointerSequence(info, viewport);

            /*switch (info.Type) {
                case PointerEventType.Primary:
                    StartSelectObjectSequence(info, viewport);
                    break;
                case PointerEventType.Secondary:
                    _selectionManager.ClearSelection();
                    if (_rotationAnnot != null) {
                        _annots.Remove(_rotationAnnot);
                        _rotationAnnot = null;
                    }
                    UpdatePropertyProvider();
                    break;
            }*/

            UpdatePointerSequence(info, viewport);
        }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:20,代码来源:ObjectSelectTool.cs


示例9: StartEraseAreaSequence

        private void StartEraseAreaSequence(PointerEventInfo info, ILevelGeometry viewport)
        {
            HidePreviewMarker();

            TileCoord location = TileLocation(info);

            int x = (int)(location.X * Layer.TileWidth);
            int y = (int)(location.Y * Layer.TileHeight);

            _band = new RubberBand(new Point(location.X, location.Y));
            _selection = new SelectionAnnot(new Point(x, y))
            {
                Fill = new SolidColorBrush(new Color(192, 0, 0, 128)),
                //Outline = new Pen(new SolidColorBrush(new Color(192, 0, 0, 200))),
            };

            _annots.Add(_selection);
            _inAreaSequence = true;

            StartAutoScroll(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:21,代码来源:TileEraseTool.cs


示例10: EndEraseAreaSequence

        private void EndEraseAreaSequence(PointerEventInfo info, ILevelGeometry viewport)
        {
            Rectangle selection = _band.Selection;
            int xmin = Math.Max(Layer.TileOriginX, selection.Left);
            int ymin = Math.Max(Layer.TileOriginY, selection.Top);
            int xmax = Math.Min(Layer.TileOriginX + Layer.TilesWide, selection.Right);
            int ymax = Math.Min(Layer.TileOriginY + Layer.TilesHigh, selection.Bottom);

            TileReplace2DCommand command = new TileReplace2DCommand(Layer);
            for (int x = xmin; x < xmax; x++) {
                for (int y = ymin; y < ymax; y++) {
                    command.QueueReplacement(new TileCoord(x, y), (TileStack)null);
                    Layer[new TileCoord(x, y)] = null;
                }
            }

            History.Execute(command);

            _annots.Remove(_selection);
            _inAreaSequence = false;

            EndAutoScroll(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:23,代码来源:TileEraseTool.cs


示例11: StartDrag

 private ToolState StartDrag(PointerEventInfo info, ILevelGeometry viewport)
 {
     Tool._selectionManager.ClearSelection();
     return StartDragAdd(info, viewport);
 }
开发者ID:Elof3,项目名称:Treefrog,代码行数:5,代码来源:ObjectSelectTool.cs


示例12: UpdateDrag

        private void UpdateDrag(PointerEventInfo info, ILevelGeometry viewport)
        {
            TileCoord location = TileLocation(info);

            _band.End = new Point(location.X, location.Y);
            Rectangle selection = _band.Selection;

            _selectionAnnot.Start = new Point(selection.Left * Layer.TileWidth, selection.Top * Layer.TileHeight);
            _selectionAnnot.End = new Point(selection.Right * Layer.TileWidth, selection.Bottom * Layer.TileHeight);

            //UpdateAutoScroll(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:12,代码来源:TileDrawTool.cs


示例13: StartDrag

        private void StartDrag(PointerEventInfo info, ILevelGeometry viewport)
        {
            ClearPreviewMarker();
            _activeBrush = null;

            TileCoord location = TileLocation(info);

            int x = (int)(location.X * Layer.TileWidth);
            int y = (int)(location.Y * Layer.TileHeight);

            _band = new RubberBand(new Point(location.X, location.Y));
            _selectionAnnot = new SelectionAnnot(new Point((int)info.X, (int)info.Y)) {
                Fill = new SolidColorBrush(new Color(76, 178, 255, 128)),
            };

            _annots.Add(_selectionAnnot);

            //StartAutoScroll(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:19,代码来源:TileDrawTool.cs


示例14: StartSecondaryPointerSequence

            private ToolState StartSecondaryPointerSequence(PointerEventInfo info, ILevelGeometry viewport)
            {
                ObjectInstance hitObject = Tool.TopObject(Tool.CoarseHitTest((int)info.X, (int)info.Y));
                if (hitObject == null)
                    return new ReleaseToolState(Tool).StartPointerSequence(info, viewport);

                Tool.ActivateObjectMenu(info);

                if (Tool._selectionManager.IsObjectSelected(hitObject))
                    return this;
                else
                    return StartClickNew(info, viewport, hitObject);
            }
开发者ID:Elof3,项目名称:Treefrog,代码行数:13,代码来源:ObjectSelectTool.cs


示例15: StartClickRemove

            private ToolState StartClickRemove(PointerEventInfo info, ILevelGeometry viewport, ObjectInstance obj)
            {
                Tool._selectionManager.RemoveObjectFromSelection(obj);

                Tool.StartAutoScroll(info, viewport);
                Tool.UpdatePropertyProvider();

                return new SelectionStandbyToolState(Tool).StartPointerSequence(info, viewport);
            }
开发者ID:Elof3,项目名称:Treefrog,代码行数:9,代码来源:ObjectSelectTool.cs


示例16: UpdatePointerSequence

 public virtual ToolState UpdatePointerSequence(PointerEventInfo info, ILevelGeometry viewport)
 {
     return this;
 }
开发者ID:Elof3,项目名称:Treefrog,代码行数:4,代码来源:ObjectSelectTool.cs


示例17: StartPointerSequence

            public override ToolState StartPointerSequence(PointerEventInfo info, ILevelGeometry viewport)
            {
                InitialLocation = new Point((int)info.X, (int)info.Y);
                Timeout = DateTime.Now;

                return this;
            }
开发者ID:Elof3,项目名称:Treefrog,代码行数:7,代码来源:ObjectSelectTool.cs


示例18: PointerPositionCore

 protected override void PointerPositionCore(PointerEventInfo info, ILevelGeometry viewport)
 {
     if (_snapManager == null)
         _snapManager = new SnappingManager(GetSnappingSourceOrigin(), GetSnappingSourceBounds(), GridSize);
 }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:5,代码来源:ObjectPointerTool.cs


示例19: EndPointerSequence

 public override ToolState EndPointerSequence(PointerEventInfo info, ILevelGeometry viewport)
 {
     if ((DateTime.Now - Timeout).TotalMilliseconds < _timeoutThreshold)
         return new RotationStandbyToolState(Tool) {
             HitObject = HitObject
         }.EndPointerSequence(info, viewport);
     else
         return new SelectionStandbyToolState(Tool).EndPointerSequence(info, viewport);
 }
开发者ID:Elof3,项目名称:Treefrog,代码行数:9,代码来源:ObjectSelectTool.cs


示例20: StartDragAdd

 private ToolState StartDragAdd(PointerEventInfo info, ILevelGeometry viewport)
 {
     return new SelectionAreaToolState(Tool).StartPointerSequence(info, viewport);
 }
开发者ID:Elof3,项目名称:Treefrog,代码行数:4,代码来源:ObjectSelectTool.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ILexEntry类代码示例发布时间:2022-05-24
下一篇:
C# ILayoutElement类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap