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


C# Tools.PointerEventInfo类代码示例

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


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

示例1: ShowPreviewMarker

        private void ShowPreviewMarker(PointerEventInfo info)
        {
            if (ActiveObjectClass == null)
                return;

            if (ActiveObjectClass != _activeClass) {
                HidePreviewMarker();
                _previewMarker = null;
                _activeClass = ActiveObjectClass;
            }

            if (!_previewMarkerVisible) {
                if (_previewMarker == null) {
                    _previewMarker = new ImageAnnot() {
                        Image = ActiveObjectClass.Image,
                        BlendColor = new Color(255, 255, 255, 128),
                    };
                }

                _annots.Add(_previewMarker);
                _previewMarkerVisible = true;
            }

            Point xlat = new Point((int)info.X - _activeClass.ImageBounds.Width / 2, (int)info.Y - _activeClass.ImageBounds.Height / 2);
            if (SnapManager != null)
                xlat = SnapManager.Translate(xlat, SnappingTarget);

            _previewMarker.Position = xlat;
        }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:29,代码来源:ObjectDrawTool.cs

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

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

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

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

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

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

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

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

示例10: UpdateErasePathSequence

        private void UpdateErasePathSequence(PointerEventInfo info)
        {
            TileCoord location = TileLocation(info);
            if (!TileInRange(location))
                return;

            if (Layer[location] != null && Layer[location].Count > 0) {
                _drawCommand.QueueReplacement(location, (TileStack)null);
                Layer[location] = null;
            }
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:11,代码来源:TileEraseTool.cs

示例11: UpdateEraseAreaSequenceCommon

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

            int x = Math.Max(0, Math.Min(Layer.TilesWide - 1, location.X)) * Layer.TileWidth;
            int y = Math.Max(0, Math.Min(Layer.TilesHigh - 1, location.Y)) * Layer.TileHeight;

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

            _selection.Start = new Point(selection.Left * Layer.TileWidth, selection.Top * Layer.TileHeight);
            _selection.End = new Point(selection.Right * Layer.TileWidth, selection.Bottom * Layer.TileHeight);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:13,代码来源:TileEraseTool.cs

示例12: UpdateEraseAreaSequence

 private void UpdateEraseAreaSequence(PointerEventInfo info, ILevelGeometry viewport)
 {
     UpdateEraseAreaSequenceCommon(info, viewport);
     UpdateAutoScroll(info, viewport);
 }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:5,代码来源:TileEraseTool.cs

示例13: StartErasePathSequence

 private void StartErasePathSequence(PointerEventInfo info)
 {
     _drawCommand = new TileReplace2DCommand(Layer);
 }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:4,代码来源:TileEraseTool.cs

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

示例15: EndErasePathSequence

 private void EndErasePathSequence(PointerEventInfo info)
 {
     History.Execute(_drawCommand);
 }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:4,代码来源:TileEraseTool.cs


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