You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
3.9 KiB
C#
119 lines
3.9 KiB
C#
// <copyright file="DrawerEvents.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
using SigmaDrawerElement;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace GeoSigma.UCDraw
|
|
{
|
|
public delegate void ShowNavigationEventHandler(object sender, NavigationEventArgs e);
|
|
public delegate void ForceMeshPackEventHandler(object sender, bool force);
|
|
public delegate void WaitProgressEventHandler(object sender, ProgressEventArgs e);
|
|
class DrawerEvents
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// 等待过程参数类
|
|
/// </summary>
|
|
public class ProgressEventArgs : EventArgs
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="ProgressEventArgs"/> class.
|
|
/// </summary>
|
|
/// <param name="eventInfo">信息名称</param>
|
|
/// <param name="progerss">进度</param>
|
|
/// <param name="progerssVisible">是否可见</param>
|
|
public ProgressEventArgs(string eventInfo, int progerss, bool progerssVisible)
|
|
{
|
|
EventInfo = eventInfo;
|
|
Progerss = progerss;
|
|
ProgerssVisible = progerssVisible;
|
|
}
|
|
|
|
public string EventInfo { get; set; } = string.Empty;
|
|
public int Progerss { get; set; } = 0;
|
|
public bool ProgerssVisible { get; set; } = false;
|
|
}
|
|
public class NavigationEventArgs:EventArgs
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets 图元名称.
|
|
/// </summary>
|
|
public string ElementName { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets 图元类型,点、线等.
|
|
/// </summary>
|
|
public int DrawType { get; set; } = 0;
|
|
/// <summary>
|
|
/// Gets or sets 图层.
|
|
/// </summary>
|
|
public string Layer { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// Gets or sets 屏幕坐标.
|
|
/// </summary>
|
|
public Point GlobalPosition { get; set; }
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="NavigationEventArgs"/> class.
|
|
/// </summary>
|
|
public NavigationEventArgs() { }
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="NavigationEventArgs"/> class.
|
|
/// </summary>
|
|
/// <param name="pt">The pt.</param>
|
|
/// <param name="elementName">The element name.</param>
|
|
/// <param name="layerName">The layer name.</param>
|
|
/// <param name="drawType">The draw type.</param>
|
|
public NavigationEventArgs(Point pt, string elementName, string layerName, int drawType)
|
|
{
|
|
this.GlobalPosition = pt;
|
|
this.ElementName = elementName;
|
|
this.Layer = layerName;
|
|
this.DrawType = drawType;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 选择的图元
|
|
/// </summary>
|
|
public class SelectedElementsArgs : EventArgs
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets 图形元素.
|
|
/// </summary>
|
|
public List<DrawerElementProperty> Elements { get; set; }
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="SelectedElementsArgs"/> class.
|
|
/// </summary>
|
|
public SelectedElementsArgs()
|
|
{
|
|
Elements = null;
|
|
}
|
|
public SelectedElementsArgs(List<DrawerElementProperty> elements)
|
|
{
|
|
Elements = elements;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 图层事件参数
|
|
/// </summary>
|
|
public class LayerElementsArgs : EventArgs
|
|
{
|
|
public string LayerName { get; set; }
|
|
public int LayerStatus { get; set; }
|
|
public bool IsChecked { get; set; }
|
|
public LayerElementsArgs() { }
|
|
public LayerElementsArgs(string layerName, int layerStatus, bool isChecked)
|
|
{
|
|
this.LayerName = layerName;
|
|
this.LayerStatus = layerStatus;
|
|
this.IsChecked = isChecked;
|
|
}
|
|
}
|
|
}
|