using PaintDotNet.Annotation.Enum;
using PaintDotNet.Annotation.relationModel;
using PaintDotNet.Base.Enum;
using PaintDotNet.Base.SettingModel;
using System;
using System.Collections.Generic;
namespace PaintDotNet
{
///
/// 存储系统中用到的一些可以放在程序里的下拉的数据
///
public static class InvariantData
{
///
/// 标注测量程序集
///
public static readonly string assembly_Annotation = "PaintDotNet.Annotation";
///
/// 标注路径
///
public static readonly string path_Label = "PaintDotNet.Annotation.Label";
///
/// 测量路径
///
public static readonly string path_Measure = "PaintDotNet.Annotation.Measure";
///
/// 其他路径
///
public static readonly string path_Other = "PaintDotNet.Annotation.Other";
///
/// 程序集
///
public static readonly string assembly_Data = "PaintDotNet.Data";
///
/// 命名空间
///
public static readonly string path_Action = "PaintDotNet.Data.Action";
///
/// 【预处理】【交互操作】分割线宽
///
public static int segmentation = 1;
///
/// 【预处理】【交互操作】连接线宽
///
public static int connection = 1;
///
/// 绘制端点时的减去的值
///
public static int rectless = 6;
///
/// 绘制端点时加上的值
///
public static int rectplus = 12;
///
/// 单位集合
///
public static Dictionary unitsDictionary = new Dictionary()
{
//{(int)MeasurementUnit.Pixel, PdnResources.GetString("MeasurementUnit.Pixel")},
{(int)MeasurementUnit.Inch, PdnResources.GetString("MeasurementUnit.Inch")},
{(int)MeasurementUnit.Mil, PdnResources.GetString("MeasurementUnit.Mil")},
{(int)MeasurementUnit.Centimeter, PdnResources.GetString("MeasurementUnit.Centimeter")},
{(int)MeasurementUnit.Millimeter,PdnResources.GetString("Menu.Mm.text")},
{(int)MeasurementUnit.Micron,PdnResources.GetString("Menu.Micron.text")},
{(int)MeasurementUnit.Nano,PdnResources.GetString("Menu.nanometer.text")}
};
///
/// 单位集合(针对标尺标定)
///
public static Dictionary ruleUnitsDictionary = new Dictionary()
{
//{(int)MeasurementUnit.Pixel, PdnResources.GetString("MeasurementUnit.Pixel")},
{(int)MeasurementUnit.Inch, PdnResources.GetString("MeasurementUnit.Inch") + "/Inch"},
{(int)MeasurementUnit.Mil, PdnResources.GetString("MeasurementUnit.Mil")+ "/Mil"},
{(int)MeasurementUnit.Centimeter, PdnResources.GetString("MeasurementUnit.Centimeter")+ "/Centimeter"},
{(int)MeasurementUnit.Millimeter,PdnResources.GetString("Menu.Mm.text")+ "/Millimeter"},
{(int)MeasurementUnit.Micron,PdnResources.GetString("Menu.Micron.text")+ "/Micron"},
{(int)MeasurementUnit.Nano,PdnResources.GetString("Menu.nanometer.text")+ "/Nanometer"}
};
///
/// 单位符号集合
///
public static Dictionary unitSymbolsDictionary = new Dictionary()
{
//{(int)MeasurementUnit.Pixel, "px"},
{(int)MeasurementUnit.Inch, "in"},
{(int)MeasurementUnit.Mil, "mil"},
{(int)MeasurementUnit.Centimeter, "cm"},
{(int)MeasurementUnit.Millimeter,"mm"},
{(int)MeasurementUnit.Micron,"μm"},
{(int)MeasurementUnit.Nano,"nm"}
};
///
/// 常规设置->窗口里面的类型数组
///
public static string[] settingName = new string[11] { PdnResources.GetString("Menu.Set.Generalsettings.Namingrules.text"), PdnResources.GetString("Menu.UserInfo.text"), PdnResources.GetString("Menu.Set.Generalsettings.dotspacingsetting.text"), PdnResources.GetString("Menu.Set.Generalsettings.Softwarelanguage.text"), PdnResources.GetString("Menu.Set.Generalsettings.Systemreset.text"), PdnResources.GetString("Menu.BasicSettings.text"), PdnResources.GetString("Menu.ImageCollection.CameraSetting.Text"), PdnResources.GetString("Menu.Directionsetting.text"), PdnResources.GetString("Menu.Auxiliarylinesettings.text") , PdnResources.GetString("Menu.CaptureSave.text"),"拼图设置" };
///
/// 常规设置->窗口里面的数值位数数组
///
public static string[] numberNum = new string[9] {"1", "2", "3", "4", "5", "6", "7", "8", "9" };
///
/// 常规设置->窗口里面的参数说明
///
public static Dictionary parameterList = new Dictionary()
{
{"%P",PdnResources.GetString("Menu.Nameprefix.text") },
{"%I",PdnResources.GetString("Menu.Set.Generalsettings.Thevalueo001.text") },
{"%h",PdnResources.GetString("Menu.Set.Generalsettings.thehourpanttime.text")+"(00-59)" },
{"%m",PdnResources.GetString("Menu.Set.Generalsettings.theminrenttime.text")+"(00-59)" },
{"%s",PdnResources.GetString("Menu.Set.Generalsettings.Thesecondnttime.text")+"(00-59)" },
{"%Y",PdnResources.GetString("Menu.Set.Generalsettings.Theannualparate.Suchas.text")+":2010" },
{"%M",PdnResources.GetString("Menu.Set.Generalsettings.themonrentdate.text")+"(01-12)" },
{"%D",PdnResources.GetString("Menu.Set.Generalsettings.Thedaypartentdate.text")+"(01-31)" },
{"%G",PdnResources.GetString("Menu.CreateaGUIDidentifier.text") },
{"%U",PdnResources.GetString("Menu.Windowsusercurrentlyloggedin.text") },
{"%N",PdnResources.GetString("Menu.NowRuleName.text") },
{"%E",PdnResources.GetString("Menu.NowRuleFangDa.text") },
{"%T1",PdnResources.GetString("Menu.Set.CustomText.text") },
{"%T2",PdnResources.GetString("Menu.Set.CustomText.text") },
{"%T3",PdnResources.GetString("Menu.Set.CustomText.text") },
{"%Z1",PdnResources.GetString("Menu.Set.NamedRuleCharacter.text") + 1},
{"%Z2",PdnResources.GetString("Menu.Set.NamedRuleCharacter.text") + 2},
{"%R",PdnResources.GetString("Menu.Set.SavePosition.text") }
};
///
/// 线形的集合
/// 需要改成多语言版本
///
public static object[] dashStyles = new object[5] {
PdnResources.GetString("DashStyle.Solid"),
PdnResources.GetString("DashStyle.Dash"),
PdnResources.GetString("DashStyle.Dot"),
PdnResources.GetString("DashStyle.DashDot"),
PdnResources.GetString("DashStyle.DashDotDot")
};
///
/// 线的粗细
///
public static object[] thinkness = new object[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
///
/// 脚本,里面的自动执行和交互执行
///
public static Dictionary scriptDictionary = new Dictionary()
{
{1, PdnResources.GetString("Menu.automated.text")},
{2, PdnResources.GetString("Menu.Interactiveexecution.text")}
};
public static Dictionary scriptManualDictionary = new Dictionary()
{
{2, PdnResources.GetString("Menu.Interactiveexecution.text")}
};
///
/// 构建标注分类关系
///
public static List GetLabelRelations()
{
List list = new List();
//文本
LabelRelationModel modelText = new LabelRelationModel();
modelText.id = 1;
modelText.name = PdnResources.GetString("Menu.LabelAction.DrawTextString.Text");
modelText.childLabel = new List();
modelText.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawTextString.Text"), DrawToolType.DrawTextString, typeof(LabelStyleModel.Text)));
list.Add(modelText);
//标记
LabelRelationModel modelMark = new LabelRelationModel();
modelMark.id = 2;
modelMark.name = PdnResources.GetString("Menu.LabelAction.MarkAction.Text");
modelMark.childLabel = new List();
modelMark.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawDateMark.Text"), DrawToolType.DrawDateMark, typeof(LabelStyleModel.DateMark)));
modelMark.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawTimeMark.Text"), DrawToolType.DrawTimeMark, typeof(LabelStyleModel.TimeMark)));
modelMark.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawNumberMark.Text"), DrawToolType.DrawNumberMark, typeof(LabelStyleModel.NumberMark)));
modelMark.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawPointMark.Text"), DrawToolType.DrawPointMark, typeof(LabelStyleModel.PointMark)));
modelMark.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawGainNumber.Text"), DrawToolType.DrawGainNumber, typeof(LabelStyleModel.GainNumber)));
list.Add(modelMark);
//直线
LabelRelationModel modelLine = new LabelRelationModel();
modelLine.id = 3;
modelLine.name = PdnResources.GetString("Menu.LabelAction.DrawLine.Text");
modelLine.childLabel = new List();
modelLine.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawLine.Text"), DrawToolType.DrawLine, typeof(LabelStyleModel.LineChildLine)));
modelLine.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawLineSegment.Text"), DrawToolType.DrawLineSegment, typeof(LabelStyleModel.LineChildLineSegment)));
list.Add(modelLine);
//曲线
LabelRelationModel modelCurve = new LabelRelationModel();
modelCurve.id = 4;
modelCurve.name = PdnResources.GetString("Menu.LabelAction.DrawCurve.Text");
modelCurve.childLabel = new List();
modelCurve.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawPencil.Text"), DrawToolType.DrawPencil, typeof(LabelStyleModel.Pencil)));
modelCurve.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureBrokenLine.Text"), DrawToolType.DrawPolygonLine, typeof(LabelStyleModel.Polyline)));
modelCurve.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawCurve.Text"), DrawToolType.DrawCurve, typeof(LabelStyleModel.CurveModel)));
modelCurve.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawClosedCurve.Text"), DrawToolType.DrawClosedCurve, typeof(LabelStyleModel.ClosedCurve)));
list.Add(modelCurve);
//箭头
LabelRelationModel modelArrow = new LabelRelationModel();
modelArrow.id = 5;
modelArrow.name = PdnResources.GetString("Menu.LabelAction.ArrowAction.Text");
modelArrow.childLabel = new List();
modelArrow.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawOneArrowLine.Text"), DrawToolType.DrawOneArrowLine, typeof(LabelStyleModel.OneWayArrow)));
modelArrow.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawTwoArrowLine.Text"), DrawToolType.DrawTwoArrowLine, typeof(LabelStyleModel.TwoWayArrow)));
list.Add(modelArrow);
//圆
LabelRelationModel modelCircle = new LabelRelationModel();
modelCircle.id = 6;
modelCircle.name = PdnResources.GetString("Menu.LabelAction.DrawCircle.Text");
modelCircle.childLabel = new List();
modelCircle.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawCircle.Text"), DrawToolType.DrawCircle, typeof(LabelStyleModel.CircleModel)));
modelCircle.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawEllipse.Text"), DrawToolType.DrawEllipse, typeof(LabelStyleModel.Oval)));
list.Add(modelCircle);
//多边形
LabelRelationModel modelPolygon = new LabelRelationModel();
modelPolygon.id = 7;
modelPolygon.name = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
modelPolygon.childLabel = new List();
modelPolygon.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text"), DrawToolType.DrawRectangle, typeof(LabelStyleModel.PolygonRectangle)));
modelPolygon.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text"), DrawToolType.DrawPolygon, typeof(LabelStyleModel.PolygonPolygon)));
modelPolygon.childLabel.Add(CreateLabelChildModel(PdnResources.GetString("Menu.LabelAction.DrawRoundRectangle.Text"), DrawToolType.DrawRoundRectangle, typeof(LabelStyleModel.RoundedRectangle)));
list.Add(modelPolygon);
//标注大小
LabelRelationModel model = new LabelRelationModel();
model.id = 8;
model.name = PdnResources.GetString("Markpointsetting.Text");
model.childLabel = new List();
list.Add(model);
return list;
}
///
/// 构建测量分类关系
///
public static List GetMeasureRelations()
{
List list = new List();
MeasureRelationModel pleaseChoise = new MeasureRelationModel();
pleaseChoise.id = 0;
pleaseChoise.name = PdnResources.GetString("Menu.Pleaseselect.Text");
list.Add(pleaseChoise);
//长度测量
MeasureRelationModel lengthMeasure = new MeasureRelationModel();
lengthMeasure.id = 1;
lengthMeasure.name = PdnResources.GetString("Menu.MeasureAction.LengthMeasurement.Text");
lengthMeasure.childLabel = new List();
lengthMeasure.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
lengthMeasure.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.LabelAction.DrawLine.Text"), DrawToolType.MeasureLine, typeof(MeasureStyleModel.MeasureLine)));
lengthMeasure.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureLength.Text"), DrawToolType.MeasureLength, typeof(MeasureStyleModel.MeasureLength)));
lengthMeasure.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureHLine.Text"), DrawToolType.MeasureHLine, typeof(MeasureStyleModel.MeasureHLine)));
lengthMeasure.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureVLine.Text"), DrawToolType.MeasureVLine, typeof(MeasureStyleModel.MeasureVLine)));
lengthMeasure.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureDistanceLine.Text"), DrawToolType.MeasureDistanceLine, typeof(MeasureStyleModel.MeasureDistanceLine)));
list.Add(lengthMeasure);
//多点线段
MeasureRelationModel multLine = new MeasureRelationModel();
multLine.id = 2;
multLine.name = PdnResources.GetString("Menu.MeasureAction.MultiPointLineSegment.Text");
multLine.childLabel = new List();
multLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
multLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureMulLine.Text"), DrawToolType.MeasureMulLine, typeof(MeasureStyleModel.MeasureMulLine)));
multLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureMulHVLine.Text"), DrawToolType.MeasureMulHVLine, typeof(MeasureStyleModel.MeasureMulHVLine)));
multLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MultiPointLineSegment.Text"), DrawToolType.MeasureMulSegment, typeof(MeasureStyleModel.MeasureMulSegment)));
multLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureMulVLine.Text"), DrawToolType.MeasureMulVLine, typeof(MeasureStyleModel.MeasureMulVLine)));
list.Add(multLine);
//曲线长度
MeasureRelationModel curveLength = new MeasureRelationModel();
curveLength.id = 3;
curveLength.name = PdnResources.GetString("Menu.MeasureAction.CurveLength.Text");
curveLength.childLabel = new List();
curveLength.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
curveLength.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureBrokenLine.Text"), DrawToolType.MeasureBrokenLine, typeof(MeasureStyleModel.MeasureBrokenLine)));
curveLength.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureTraceCurve.Text"), DrawToolType.MeasureTraceCurve, typeof(MeasureStyleModel.MeasureTraceCurve)));
curveLength.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.LabelAction.DrawCurve.Text"), DrawToolType.MeasureCurveLine, typeof(MeasureStyleModel.MeasureCurveLine)));
list.Add(curveLength);
//点垂线
MeasureRelationModel pointVertical = new MeasureRelationModel();
pointVertical.id = 4;
pointVertical.name = PdnResources.GetString("Menu.MeasureAction.MeasurePLine.Text");
pointVertical.childLabel = new List();
pointVertical.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
pointVertical.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasurePLine.Text"), DrawToolType.MeasurePLine, typeof(MeasureStyleModel.MeasurePLine)));
pointVertical.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureMulPLine.Text"), DrawToolType.MeasureMulPLine, typeof(MeasureStyleModel.MeasureMulPLine)));
pointVertical.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureHMulPLine.Text"), DrawToolType.MeasureHMulPLine, typeof(MeasureStyleModel.MeasureHMulPLine)));
pointVertical.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureVMulPLine.Text"), DrawToolType.MeasureVMulPLine, typeof(MeasureStyleModel.MeasureVMulPLine)));
pointVertical.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasurePointHLine.Text"), DrawToolType.MeasurePointHLine, typeof(MeasureStyleModel.MeasurePointHLine)));
list.Add(pointVertical);
//平行线测量
MeasureRelationModel parallelLine = new MeasureRelationModel();
parallelLine.id = 5;
parallelLine.name = PdnResources.GetString("Menu.MeasureAction.ParallelLines.Text");
parallelLine.childLabel = new List();
parallelLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
parallelLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureParallelLine.Text"), DrawToolType.MeasureParallelLine, typeof(MeasureStyleModel.MeasureParallelLine)));
parallelLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureMulParallelLine.Text"), DrawToolType.MeasureMulParallelLine, typeof(MeasureStyleModel.MeasureMulParallelLine)));
parallelLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureVMulParallelLine.Text"), DrawToolType.MeasureVMulParallelLine, typeof(MeasureStyleModel.MeasureVMulParallelLine)));
parallelLine.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureHMulParallelLine.Text"), DrawToolType.MeasureHMulParallelLine, typeof(MeasureStyleModel.MeasureHMulParallelLine)));
list.Add(parallelLine);
//多边形测量
MeasureRelationModel modelPolygon = new MeasureRelationModel();
modelPolygon.id = 6;
modelPolygon.name = PdnResources.GetString("Menu.MeasureAction.PolygonMeasurement.Text");
modelPolygon.childLabel = new List();
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.LabelAction.DrawClosedCurve.Text"), DrawToolType.MeasureClosedCurve, typeof(MeasureStyleModel.MeasureClosedCurve)));
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text"), DrawToolType.MeasurePolygon, typeof(MeasureStyleModel.MeasurePolygon)));
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text"), DrawToolType.MeasureRectangle, typeof(MeasureStyleModel.MeasureRectangle)));
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureRandRectangle.Text"), DrawToolType.MeasureRandRectangle, typeof(MeasureStyleModel.MeasureRandRectangle)));
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureSquare.Text"), DrawToolType.MeasureSquare, typeof(MeasureStyleModel.MeasureSquare)));
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureRandSquare.Text"), DrawToolType.MeasureRandSquare, typeof(MeasureStyleModel.MeasureRandSquare)));
modelPolygon.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureTracePolygon.Text"), DrawToolType.MeasureTracePolygon, typeof(MeasureStyleModel.MeasureTracePolygon)));
list.Add(modelPolygon);
//圆形测量
MeasureRelationModel modelCircular = new MeasureRelationModel();
modelCircular.id = 7;
modelCircular.name = PdnResources.GetString("Menu.MeasureAction.CircularMeasurement.Text");
modelCircular.childLabel = new List();
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureCircle.Text"), DrawToolType.MeasureCircle, typeof(MeasureStyleModel.MeasureCircle)));
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureInnerCircle.Text"), DrawToolType.MeasureInnerCircle, typeof(MeasureStyleModel.MeasureInnerCircle)));
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureOuterCircle.Text"), DrawToolType.MeasureOuterCircle, typeof(MeasureStyleModel.MeasureOuterCircle)));
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureDiameterCircle.Text"), DrawToolType.MeasureDiameterCircle, typeof(MeasureStyleModel.MeasureDiameterCircle)));
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasurePointEdgeSize.Text"), DrawToolType.MeasurePointEdgeSize, typeof(MeasureStyleModel.MeasurePointEdgeSize)));
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasurePointCenterSize.Text"), DrawToolType.MeasurePointCenterSize, typeof(MeasureStyleModel.MeasurePointCenterSize)));
modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasurePointArcSize.Text"), DrawToolType.MeasurePointArcSize, typeof(MeasureStyleModel.MeasurePointArcSize)));
//modelCircular.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureCenterCenterSize.Text"), DrawToolType.MeasureCenterCenterSize, typeof(MeasureStyleModel.MeasureCenterCenterSize)));
list.Add(modelCircular);
//角度测量
MeasureRelationModel modelAngle = new MeasureRelationModel();
modelAngle.id = 8;
modelAngle.name = PdnResources.GetString("Menu.MeasureAction.AngleMeasurement.Text");
modelAngle.childLabel = new List();
modelAngle.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
modelAngle.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureThreePointAngle.Text"), DrawToolType.MeasureThreePointAngle, typeof(MeasureStyleModel.MeasureThreePointAngle)));
modelAngle.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureFourPointAngle.Text"), DrawToolType.MeasureFourPointAngle, typeof(MeasureStyleModel.MeasureFourPointAngle)));
modelAngle.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureThreePointArc.Text"), DrawToolType.MeasureThreePointArc, typeof(MeasureStyleModel.MeasureThreePointArc)));
list.Add(modelAngle);
//对准度测量
MeasureRelationModel modelRegistration = new MeasureRelationModel();
modelRegistration.id = 9;
modelRegistration.name = PdnResources.GetString("Menu.MeasureAction.RegistrationMeasurement.Text");
modelRegistration.childLabel = new List();
modelRegistration.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
modelRegistration.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureCenterCenterSize.Text"), DrawToolType.MeasureCenterCenterSize, typeof(MeasureStyleModel.MeasureCenterCenterSize)));
modelRegistration.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.MeasureAction.MeasureTwoLineVLDistance.Text"), DrawToolType.MeasureTwoLineVLDistance, typeof(MeasureStyleModel.MeasureTwoLineVLDistance)));
list.Add(modelRegistration);
//标记点测量
MeasureRelationModel model = new MeasureRelationModel();
model.id = 10;
model.name = PdnResources.GetString("Markpointsetting.Text");
model.childLabel = new List();
model.childLabel.Add(CreateMeasureChildModel(PdnResources.GetString("Menu.Pleaseselect.Text"), DrawToolType.Pointer, null));
list.Add(model);
return list;
}
///
/// 测量属性的全部集合
///
public static Dictionary measureAttributes = new Dictionary()
{
{ MeasureAttributes.ALL, PdnResources.GetString("Menu.Pleaseselect.Text") },//0
{ MeasureAttributes.MeasureMethod, PdnResources.GetString("Menu.Measuringway.text") },//1
{ MeasureAttributes.MeasureUnitCN, PdnResources.GetString("Menu.Unitsofmeasurement.text")+"("+PdnResources.GetString("Menu.Set.Generalsettings.Chinese.text")+")" },//2
{ MeasureAttributes.MeasureUnitEN, PdnResources.GetString("Menu.Imagement.Measurementlist.Unitofmeasurement(English).text") },//3
{ MeasureAttributes.PixelStartX, PdnResources.GetString("Menu.Pixelstartingpoint.text")+"X" },//4
{ MeasureAttributes.PixelStartY, PdnResources.GetString("Menu.Pixelstartingpoint.text")+"Y" },//5
{ MeasureAttributes.PhysicalStartX, PdnResources.GetString("Menu.Physicalstartingpoint.text")+"X" },//6
{ MeasureAttributes.PhysicalStartY, PdnResources.GetString("Menu.Physicalstartingpoint.text")+"Y" },//7
{ MeasureAttributes.PixelLength, PdnResources.GetString("Menu.Pixellength.text") },//8
{ MeasureAttributes.PhysicalLength, PdnResources.GetString("Menu.Physicallength.text") },//9
{ MeasureAttributes.PixelAverageIntercept, PdnResources.GetString("Menu.Pixelaverageintercept.text") },//10
{ MeasureAttributes.PhysicalAverage, PdnResources.GetString("Menu.Physicalmeanintercept.text") },//11
{ MeasureAttributes.NumberOfSegments, PdnResources.GetString("Menu.Linenumber.text") },//12
{ MeasureAttributes.PixelDistance, PdnResources.GetString("Menu.Pixeldistance.text") },//13
{ MeasureAttributes.PhysicalDistance, PdnResources.GetString("Menu.Physicaldistance.text") },//14
{ MeasureAttributes.PixelAverageDistance, PdnResources.GetString("Menu.Averagepixeldistance.text") },//15
{ MeasureAttributes.PhysicalAverageDistance, PdnResources.GetString("Menu.Physicaleandistance.text") },//16
{ MeasureAttributes.NumberOfEdges, PdnResources.GetString("Menu.Numberofedges.text") },//17
{ MeasureAttributes.PixelArea, PdnResources.GetString("Menu.Thepixelarea.text") },//18
{ MeasureAttributes.PhysicalArea, PdnResources.GetString("Menu.Physicalarea.text") },//19
{ MeasureAttributes.PixelCircumference, PdnResources.GetString("Menu.Pixelcircumference.text") },//20
{ MeasureAttributes.PhysicalCircumference, PdnResources.GetString("Menu.Physicalperimeter.text") },//21
{ MeasureAttributes.PixelCenterX, PdnResources.GetString("Menu.Pixelcircle.text")+"X" },//22
{ MeasureAttributes.PixelCenterY, PdnResources.GetString("Menu.Pixelcircle.text")+"Y" },//23
{ MeasureAttributes.PhysicalCenterX, PdnResources.GetString("Menu.Thphysicalenterofcircle.text")+"X" },//24
{ MeasureAttributes.PhysicalCenterY, PdnResources.GetString("Menu.Thphysicalenterofcircle.text")+"Y" },//25
{ MeasureAttributes.PixelRadius, PdnResources.GetString("Menu.Pixelsradius.text") },//26
{ MeasureAttributes.PhysicalRadius, PdnResources.GetString("Menu.Physicalradius.text") },//27
{ MeasureAttributes.PixelDiameter, PdnResources.GetString("Menu.Pixeldiameter.text") },//28
{ MeasureAttributes.PhysicalDiameter, PdnResources.GetString("Menu.Physicaldiameter.text") },//29
{ MeasureAttributes.Angle, PdnResources.GetString("Menu.TheAngle.text") },//30
{ MeasureAttributes.PixelArcLength, PdnResources.GetString("Menu.Pixelarclength.text") },//31
{ MeasureAttributes.PhysicalArcLength, PdnResources.GetString("Menu.Physicalarclength.text") }//32
};
///
/// 测量和属性关系的集合
///
public static Dictionary measureRelationAttributes = new Dictionary()
{
//长度测量
{ DrawToolType.MeasureLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
{ DrawToolType.MeasureLength, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
{ DrawToolType.MeasureHLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
{ DrawToolType.MeasureVLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
{ DrawToolType.MeasureDistanceLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
//多点线段
{ DrawToolType.MeasureMulLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } },
{ DrawToolType.MeasureMulHVLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } },
{ DrawToolType.MeasureMulSegment, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } },
{ DrawToolType.MeasureMulVLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } },
//曲线
{ DrawToolType.MeasureBrokenLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12 } },
{ DrawToolType.MeasureTraceCurve, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
{ DrawToolType.MeasureCurveLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
//点垂线
{ DrawToolType.MeasurePLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
{ DrawToolType.MeasureMulPLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } },
{ DrawToolType.MeasureHMulPLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } },
{ DrawToolType.MeasureVMulPLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } },
{ DrawToolType.MeasurePointHLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
//平行线
{ DrawToolType.MeasureParallelLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
{ DrawToolType.MeasureMulParallelLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 16 } },
{ DrawToolType.MeasureVMulParallelLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 16 } },
{ DrawToolType.MeasureHMulParallelLine, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 16 } },
//多边形
{ DrawToolType.MeasureClosedCurve, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19 } },
{ DrawToolType.MeasurePolygon, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19 } },
{ DrawToolType.MeasureTracePolygon, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19 } },
{ DrawToolType.MeasureRectangle, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 18, 19, 20, 21 } },
{ DrawToolType.MeasureRandRectangle, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 18, 19, 20, 21 } },
{ DrawToolType.MeasureSquare, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 18, 19, 20, 21 } },
{ DrawToolType.MeasureRandSquare, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 18, 19, 20, 21 } },
//圆形
{ DrawToolType.MeasureCircle, new int[]{ 0, 1, 2, 3, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
{ DrawToolType.MeasureInnerCircle, new int[]{ 0, 1, 2, 3, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
{ DrawToolType.MeasureOuterCircle, new int[]{ 0, 1, 2, 3, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
{ DrawToolType.MeasureDiameterCircle, new int[]{ 0, 1, 2, 3, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
{ DrawToolType.MeasurePointEdgeSize, new int[]{ 0, 1, 2, 3, 13, 14, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
{ DrawToolType.MeasurePointCenterSize, new int[]{ 0, 1, 2, 3, 13, 14, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
{ DrawToolType.MeasurePointArcSize, new int[]{ 0, 1, 2, 3, 13, 14, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
//角度
{ DrawToolType.MeasureThreePointAngle, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 30 } },
{ DrawToolType.MeasureFourPointAngle, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 30 } },
{ DrawToolType.MeasureThreePointArc, new int[]{ 0, 1, 2, 3, 18, 19, 22,23,24,25,26,27, 30,31, 32 } },
//对准度测量
{ DrawToolType.MeasureCenterCenterSize, new int[]{ 0, 1, 2, 3, 13, 14, 18, 19, 20, 21,22,23,24,25,26,27,28,29 } },
{ DrawToolType.MeasureTwoLineVLDistance, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
};
///
/// 创建标记的子类
///
/// 标记名称
/// 对应的工具枚举
/// 对应的配置类型
///
public static LabelRelationModel.ChildLabel CreateLabelChildModel(string name, DrawToolType num, Type type)
{
LabelRelationModel.ChildLabel label = new LabelRelationModel.ChildLabel();
label.name = name;
label.drawToolType = num;
label.type = type;
return label;
}
///
/// 创建测量的子类
///
/// 测量名称
/// 对应的工具枚举
/// 对应的配置类型
///
public static MeasureRelationModel.ChildLabel CreateMeasureChildModel(string name, DrawToolType num, Type type)
{
MeasureRelationModel.ChildLabel measure = new MeasureRelationModel.ChildLabel();
measure.name = name;
measure.drawToolType = num;
measure.type = type;
return measure;
}
///
/// 文件-批量保存,里面文件格式
///
public static Dictionary fileFormatDictionary = new Dictionary()
{
{".jpg", PdnResources.GetString("Menu.JointPhotographicExpertsGroup.text")+".jpg/jpeg"},
{".bmp", PdnResources.GetString("Menu.Bitmapfile.text")+".bmp"},
{".tiff", PdnResources.GetString("Menu.markingimagefileformat.text")+".tiff"}
};
///
/// 腐蚀/膨胀的结构元素
///
public static Dictionary structures = new Dictionary()
{
{ Structure.conventional, PdnResources.GetString("ColorsForm.MoreLessButton.Text.Less") },
{ Structure.horizon, PdnResources.GetString("Menu.Level.text") },
{ Structure.angle45, PdnResources.GetString("Menu.45°.text") },
{ Structure.vertical, PdnResources.GetString("Menu.vertical.text") },
{ Structure.angle135, PdnResources.GetString("Menu.135°.text") },
{ Structure.cross, PdnResources.GetString("Menu.cross.text") },
{ Structure.square, PdnResources.GetString("Menu.Image.Square.Text") },
{ Structure.octagon, PdnResources.GetString("Menu.octagon.text") }
};
///
/// 去碎屑的筛选的参数
///
public static Dictionary filterparameters = new Dictionary()
{
{ FilterParameters.Area, PdnResources.GetString("Menu.area.text") },
{ FilterParameters.AreaRatio, PdnResources.GetString("Menu.Arearatio.text") },
{ FilterParameters.LongTrail, PdnResources.GetString("Menu.Maximumcaliperdiameter.text") },
{ FilterParameters.AspectRatio, PdnResources.GetString("Menu.Aspectratio.text") }
};
///
/// 单位筛选
///
public static Dictionary unitparameters = new Dictionary()
{
{ MeasurementUnit.Micron, PdnResources.GetString("Menu.Micron.text") },
{ MeasurementUnit.Pixel, PdnResources.GetString("Menu.Pixel.text") }
};
///
/// 去碎屑方式
///
public static Dictionary functionparameters = new Dictionary()
{
{ FunctionParameters.Remove, PdnResources.GetString("Menu.Binaryoperation.Removedebris.Remove.text") },
{ FunctionParameters.Choise, PdnResources.GetString("Menu.MeasureAction.MeasureSelect.Text") }
};
///
/// 物相提取->定义物体->轮廓
///
public static Dictionary contourparameters = new Dictionary()
{
{ ContourParameters.Polygon, PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text") },
{ ContourParameters.Rectangle, PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text") },
{ ContourParameters.Oval, PdnResources.GetString("Menu.LabelAction.DrawEllipse.Text") }
};
public static Dictionary styleparameters = new Dictionary()
{
{ StyleParameters.Solid, PdnResources.GetString("Menu.solid.text") },
{ StyleParameters.Sideline, PdnResources.GetString("Menu.Sideline.text") }
};
public static Dictionary processingparameters = new Dictionary()
{
{ ProcessingParameters.Add, PdnResources.GetString("Menu.Binaryoperation.Phaseextraction.append.text") },
{ ProcessingParameters.Delete, PdnResources.GetString("Menu.Edit.Delete.Text") }
};
public static Dictionary fieldofviewparameters = new Dictionary()
{
{ FieldOfViewParameters.One, PdnResources.GetString("Menu.style.text")+"1" },
{ FieldOfViewParameters.Two, PdnResources.GetString("Menu.style.text")+"2" },
{ FieldOfViewParameters.Three, PdnResources.GetString("Menu.style.text")+"3" }
};
public static Dictionary debrisSelectionparameters = new Dictionary()
{
{ DebrisSelectionParameters.area, PdnResources.GetString("Menu.area.text") },
{ DebrisSelectionParameters.areaRatio, PdnResources.GetString("Menu.Arearatio.text") },
{ DebrisSelectionParameters.perimeter, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.perimeter.text") },
{ DebrisSelectionParameters.longAxis, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Longaxis.text") },
{ DebrisSelectionParameters.shortAxis, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Shortaxis.text") },
{ DebrisSelectionParameters.centerX, PdnResources.GetString("Menu.Thecentercoordinates.text")+"x" },
{ DebrisSelectionParameters.centerY, PdnResources.GetString("Menu.Thecentercoordinates.text")+"y" },
{ DebrisSelectionParameters.inclinationAngle, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.angleofinclination.text") },
{ DebrisSelectionParameters.objectAppearance, PdnResources.GetString("Menu.Objectappearance.text") },
{ DebrisSelectionParameters.height, PdnResources.GetString("Menu.height.text") },
{ DebrisSelectionParameters.width, PdnResources.GetString("Menu.width.text") },
{ DebrisSelectionParameters.aspectRatio, PdnResources.GetString("Menu.Aspectratio.text") },
{ DebrisSelectionParameters.redDensity, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Reddensity.text") },
{ DebrisSelectionParameters.greenDensity, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Greendensity.text") },
{ DebrisSelectionParameters.blueDensity, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Bluedensity.text") },
/*{ DebrisSelectionParameters.maxDensity, "最大密度" },
{ DebrisSelectionParameters.avgDensity, "平均密度" },
{ DebrisSelectionParameters.minDensity, "最小密度" },
{ DebrisSelectionParameters.sumDensity, "密度和" },*/
{ DebrisSelectionParameters.majorAxis, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.majoraxis.text") },
{ DebrisSelectionParameters.minorAxis, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.short trail.text") },
{ DebrisSelectionParameters.circumcircleDiameter, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Circumscribedcirclediameter.text") },
{ DebrisSelectionParameters.nodularity, PdnResources.GetString("Menu.nodularity.text") },
{ DebrisSelectionParameters.equalCircleDiameter, PdnResources.GetString("Menu.Diameterofequalareacircle.text") },
{ DebrisSelectionParameters.maxCaliperDiameter, PdnResources.GetString("Menu.Maximumcaliperdiameter.text") },
{ DebrisSelectionParameters.minCaliperDiameter, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.MinimumCaliperDiameter.text") },
{ DebrisSelectionParameters.avgCaliperDiameter, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.AverageCaliperDiameter.text") },
{ DebrisSelectionParameters.maxGray, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Maximumgrayscale.text") },
{ DebrisSelectionParameters.minGray, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.grayscaleminimization.text") },
{ DebrisSelectionParameters.avgGray, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Averagegray.text") },
{ DebrisSelectionParameters.fiberLength, PdnResources.GetString("Menu.Generalanalysis.Particlestatistics.Fiberlength.text") },
{ DebrisSelectionParameters.fillArea, "填充面积" },
{ DebrisSelectionParameters.waistDepth, "腰宽" },
{ DebrisSelectionParameters.waistDepthShort, "腰深" },
};
///
/// 颗粒统计-判断条件集合
///
public static string[] judgeCondition = new string[] { ">", "<", ">=", "<=" };
///
/// 颗粒统计-关联条件集合
///
public static string[] joinCondition = new string[] { "and", "or" };
///
/// 标注设置-点标记-点样式
///
public static Dictionary someStyle = new Dictionary()
{
{ SomeStyle.Arrow, PdnResources.GetString("Menu.LabelAction.ArrowAction.Text")},
{ SomeStyle.Dot, PdnResources.GetString("Menu.Set.Labelsettings.Dots.text") },
{ SomeStyle.Triangle,PdnResources.GetString("Menu.Set.Labelsettings.triangle.text")}
};
///
/// 标注设置-标记-位置
///
public static Dictionary tagLocation = new Dictionary()
{
{ TagLocation.UpLeft, PdnResources.GetString("Menu.Upperleft.text")},
{ TagLocation.UpRight, PdnResources.GetString("Menu.Upperright.text")},
{ TagLocation.DownLeft, PdnResources.GetString("Menu.Lowerleft.text") },
{ TagLocation.DownRight,PdnResources.GetString("Menu.Lowerright.text")}
};
}
}