123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- using SmartCoalApplication.Annotation.Enum;
- using SmartCoalApplication.Base.SettingModel;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Drawing.Drawing2D;
- using System.Windows.Forms;
- using static SmartCoalApplication.Base.SettingModel.LabelStyleModel;
- using static System.Windows.Forms.Control;
- namespace SmartCoalApplication.Annotation
- {
- /// <summary>
- /// 用来给标注、测量、视场以及其它工具使用的接口
- /// </summary>
- public interface ISurfaceBox
- {
- /// <summary>
- /// 获取缩放比例
- /// </summary>
- double ScaleRatio { get; }
- /// <summary>
- ///
- /// </summary>
- bool Capture { get; set; }
- /// <summary>
- /// 绘制鼠标划选的标记
- /// </summary>
- bool DrawRectangleFlag { get; set; }
- Rectangle DrawRectangle { get; set; }
- /// <summary>
- /// 激活的工具
- /// </summary>
- DrawToolType ActiveTool { get; set; }
-
- DrawAnalysisModel AnalysisStyleModel { get; set; }
- /// <summary>
- /// 鼠标形状
- /// </summary>
- Cursor Cursor { get; set; }
- RectangleF GetVisibleDocumentRectangleF();
- SizeF GetDocumentSize();
- /// <summary>
- /// 获取controls
- /// </summary>
- ControlCollection Controls { get; }
- /// <summary>
- /// 添加到历史记录,用于撤销
- /// </summary>
- /// <param name="c"></param>
- void AddCommandToHistory(Command.Command c);
- /// <summary>
- /// 刷新界面
- /// </summary>
- void Refresh();
- /// <summary>
- /// 设置标记
- /// </summary>
- void SetDirty();
- /// <summary>
- /// 获取未缩放的坐标点
- /// </summary>
- /// <param name="location"></param>
- /// <returns></returns>
- Point GetScalePoint(PointF location);
- /// <summary>
- /// 获取缩放的原点
- /// </summary>
- /// <returns></returns>
- Point GetCalcOriginPoint();
- Rectangle RectangleToScreen(Rectangle rectangle);
- /// <summary>
- /// 获取未缩放的值
- /// </summary>
- /// <param name="deltaX"></param>
- /// <returns></returns>
- int UnscaleScalar(int deltaX);
- PointF GetDocumentScrollPositionF();
- void SetDocumentScrollPositionF(PointF newScrollPos);
- void Update();
- PointF DocumentToClient(PointF pointF);
- /// <summary>
- /// 获取系统当前选中单位及每单位像素值
- /// </summary>
- /// <returns>3位字符串数组,
- /// 0:系统选中单位枚举字符串
- /// 1:系统选中单位名称字符串
- /// 2:系统选中单位符号字符串
- /// 3:系统选中单位每单位像素长度</returns>
- string[] GetPxPerUnit();
- /// <summary>
- /// 单位的文字
- /// </summary>
- /// <returns></returns>
- Dictionary<int, string> GetUnitsDictionary();
- /// <summary>
- /// 单位的缩写
- /// </summary>
- /// <returns></returns>
- Dictionary<int, string> GetUnitSymbolsDictionary();
- /// <summary>
- /// 获取当前DocumentWorkspace的视场行为
- /// </summary>
- /// <returns></returns>
- CombineMode GetCombineMode();
- /// <summary>
- /// 设置当前鼠标的状态
- /// </summary>
- /// <param name="status"></param>
- void SetMouseStatus(bool status);
- /// <summary>
- /// 获取当前鼠标的状态
- /// </summary>
- /// <returns></returns>
- bool GetMouseStatus();
- #region 标注、测量
- /// <summary>
- /// 测量的连续绘制标记
- /// </summary>
- /// <returns></returns>
- bool ContinuousDrawingMeasure();
- /// <summary>
- /// 视场的连续绘制标记
- /// </summary>
- /// <returns></returns>
- bool ContinuousDrawingView();
- void SetContinuousDrawingMeasure(bool v);
- /// <summary>
- /// 标注、测量、视场等的集合
- /// </summary>
- GraphicsList GraphicsList { get; }
- /// <summary>
- /// 重置标注、测量的管理类
- /// </summary>
- void ResetUndoManager();
- /// <summary>
- /// 获取标注的样式信息
- /// </summary>
- /// <returns></returns>
- LabelStyleModel GetLabelStyleModel();
- /// <summary>
- /// 获取测量的样式信息
- /// </summary>
- /// <returns></returns>
- MeasureStyleModel GetMeasureStyleModel();
- /// <summary>
- /// 获取测量单位对应的换算字典
- /// </summary>
- /// <returns></returns>
- Dictionary<MeasurementUnit, double> getMeasureInfo();
- /// <summary>
- /// 更新命名的延续数字
- /// </summary>
- void UpdateContinueNum();
- #endregion
- bool ViewMoveOnMouseLeftDoubleClickEnable { get; set; }
- PointF GetRulerPointInPanel(PointF point);
- PointF ScalePointToRulerPoint(PointF point);
- int ToolNumber { set; }
- /// <summary>
- /// 删除视场
- /// </summary>
- /// <returns></returns>
- bool DeleteFieldOfView();
- /// <summary>
- /// 获取测量的样式信息
- /// </summary>
- /// <returns></returns>
- MeasureAreaModel GetMeasureAreaModel();
- double getUnitNum();
- string getAliasName();
- int getDecimalPlaces();
- }
- }
|