AIMS/DrawGraph/BoardPack/AkxisPackObj.cs
2022-08-23 21:12:59 +08:00

365 lines
6.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using DrawGraph;
using Newtonsoft.Json;
using System;
namespace DrawGraph
{
[JsonObject(MemberSerialization.OptOut)]
[Serializable]
public class AkxisPackObj : PackObjBase
{
private EIsBool isVisible = EIsBool.True;
private EIsBool scale_IsVisible = EIsBool.True;
private EIsBool majorTic_Visible = EIsBool.True;
private EIsBool minorGrid_IsVisible = EIsBool.True;
private EIsBool majorGrid_Visible = EIsBool.True;
private float major_dashOff = 0f;
private float major_dashOn = 5f;
private float penWidth = 0.1f;
private float minor_dashOff = 1f;
private float minor_dashOn = 5f;
private float scaleFontSize = 6f;
private float labelGap = 0.15f;
private AlignH alignH = AlignH.Center;
private EIsBool isSkipFirstLabel = EIsBool.False;
private EIsBool isSkipLastLabel = EIsBool.False;
private AxisType axisTypeValue = AxisType.Linear;
private DateUnit dateUnitValue = DateUnit.Minute;
private double minValue = 0.0;
private double maxValue = 180.0;
private DateTime beginTime = DateTime.Now;
private double timeSpan = 1440.0;
private double majorStep = 40.0;
private double minorStep = 20.0;
[ClassAttributs(Description = "小跨度步长")]
public double MinorStep
{
get
{
return this.minorStep;
}
set
{
this.minorStep = value;
}
}
[ClassAttributs(Description = "大跨度步长")]
public double MajorStep
{
get
{
return this.majorStep;
}
set
{
this.majorStep = value;
}
}
[ClassAttributs(Description = "轴的时长,设置轴类型为Date时才有用")]
public double TimeSpan
{
get
{
return this.timeSpan;
}
set
{
this.timeSpan = value;
}
}
[ClassAttributs(Description = "轴的开始时间,设置轴类型为Date时才有用")]
public DateTime BeginTime
{
get
{
return this.beginTime;
}
set
{
this.beginTime = value;
}
}
[ClassAttributs(Description = "最小值")]
public double MaxValue
{
get
{
return this.maxValue;
}
set
{
this.maxValue = value;
}
}
[ClassAttributs(Description = "最大值")]
public double MinValue
{
get
{
return this.minValue;
}
set
{
this.minValue = value;
}
}
[ClassAttributs(Description = "轴的数据单位,设置轴类型为Date时才有用")]
public DateUnit DateUnitValue
{
get
{
return this.dateUnitValue;
}
set
{
this.dateUnitValue = value;
}
}
[ClassAttributs(Description = "轴的类型")]
public AxisType AxisTypeValue
{
get
{
return this.axisTypeValue;
}
set
{
this.axisTypeValue = value;
}
}
[ClassAttributs(Description = "不显示最后一个刻度值")]
public EIsBool IsSkipLastLabel
{
get
{
return this.isSkipLastLabel;
}
set
{
this.isSkipLastLabel = value;
}
}
[ClassAttributs(Description = "不显示第一个刻度值")]
public EIsBool IsSkipFirstLabel
{
get
{
return this.isSkipFirstLabel;
}
set
{
this.isSkipFirstLabel = value;
}
}
[ClassAttributs(Description = "刻度值的水平对齐方式")]
public AlignH AlignH
{
get
{
return this.alignH;
}
set
{
this.alignH = value;
}
}
[ClassAttributs(Description = "轴刻度值与轴大跨度刻度之间的距离")]
public float LabelGap
{
get
{
return this.labelGap;
}
set
{
this.labelGap = value;
}
}
[ClassAttributs(Description = "轴的字体大小")]
public float ScaleFontSize
{
get
{
return this.scaleFontSize;
}
set
{
this.scaleFontSize = value;
}
}
[ClassAttributs(Description = "笔刷的宽度")]
public float PenWidth
{
get
{
return this.penWidth;
}
set
{
this.penWidth = value;
}
}
[ClassAttributs(Description = "小网格跨度虚线单位长度")]
public float Minor_DashOn
{
get
{
return this.minor_dashOn;
}
set
{
this.minor_dashOn = value;
}
}
[ClassAttributs(Description = "小网格跨度虚线中间孔大小0代表是实线")]
public float Minor_DashOff
{
get
{
return this.minor_dashOff;
}
set
{
this.minor_dashOff = value;
}
}
[ClassAttributs(Description = "大网格跨度虚线单位长度")]
public float Major_DashOn
{
get
{
return this.major_dashOn;
}
set
{
this.major_dashOn = value;
}
}
[ClassAttributs(Description = "大网格跨度虚线中间孔大小0代表是实线")]
public float Major_DashOff
{
get
{
return this.major_dashOff;
}
set
{
this.major_dashOff = value;
}
}
[ClassAttributs(Description = "大网格线是否可见")]
public EIsBool MajorGrid_Visible
{
get
{
return this.majorGrid_Visible;
}
set
{
this.majorGrid_Visible = value;
}
}
[ClassAttributs(Description = "轴的刻度是否显示")]
public EIsBool MajorTic_Visible
{
get
{
return this.majorTic_Visible;
}
set
{
this.majorTic_Visible = value;
}
}
[ClassAttributs(Description = "是否显示小跨度网格")]
public EIsBool MinorGrid_IsVisible
{
get
{
return this.minorGrid_IsVisible;
}
set
{
this.minorGrid_IsVisible = value;
}
}
[ClassAttributs(Description = "轴的刻度值是否显示")]
public EIsBool Scale_IsVisible
{
get
{
return this.scale_IsVisible;
}
set
{
this.scale_IsVisible = value;
}
}
[ClassAttributs(Description = "轴是否显示\r\n此值设置为真其它值设置才有意义")]
public EIsBool IsVisible
{
get
{
return this.isVisible;
}
set
{
this.isVisible = value;
}
}
public AkxisPackObj(ZedGraphControl zgc, PackObjManager poManager) : base(zgc, poManager)
{
this.beginTime = this.beginTime.AddHours((double)(-(double)this.beginTime.Hour + 1));
this.beginTime = this.beginTime.AddMinutes((double)(-(double)this.beginTime.Minute));
this.beginTime = this.beginTime.AddSeconds((double)(-(double)this.beginTime.Second));
}
}
}