132 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			132 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using DrawGraph;
 | |
| using Newtonsoft.Json;
 | |
| using System;
 | |
| using System.Drawing;
 | |
| 
 | |
| 
 | |
| namespace DrawGraph
 | |
| {
 | |
| 	[JsonObject(MemberSerialization.OptOut)]
 | |
| 	[Serializable]
 | |
| 	public class Yr2AxisPackObj : AkxisPackObj
 | |
| 	{
 | |
| 		public Yr2AxisPackObj(ZedGraphControl zgc, PackObjManager poManager) : base(zgc, poManager)
 | |
| 		{
 | |
| 			bool flag = zgc == null;
 | |
| 			if (!flag)
 | |
| 			{
 | |
| 				this.baseZed = zgc;
 | |
| 				base.PackText = "Y2轴" + this.index.ToString();
 | |
| 				GraphPane graphPane = this.baseZed.GraphPane;
 | |
| 				graphPane.Y2Axis.Title.Text = "";
 | |
| 				graphPane.Y2Axis.Scale.IsVisible = false;
 | |
| 				graphPane.Y2Axis.MajorTic.IsInside = false;
 | |
| 				graphPane.Y2Axis.MajorTic.IsOutside = false;
 | |
| 				graphPane.Y2Axis.MajorTic.IsOpposite = false;
 | |
| 				graphPane.Y2Axis.MinorTic.IsInside = false;
 | |
| 				graphPane.Y2Axis.MinorTic.IsOutside = false;
 | |
| 				graphPane.Y2Axis.MinorTic.IsOpposite = false;
 | |
| 				graphPane.Y2Axis.MajorGrid.IsVisible = false;
 | |
| 				graphPane.Y2Axis.MinorGrid.IsVisible = false;
 | |
| 				graphPane.Y2Axis.Scale.AlignH = AlignH.Left;
 | |
| 			}
 | |
| 		}
 | |
| 
 | |
| 		public override void Draw()
 | |
| 		{
 | |
| 			bool flag = this.baseZed == null;
 | |
| 			if (!flag)
 | |
| 			{
 | |
| 				GraphPane graphPane = this.baseZed.GraphPane;
 | |
| 				bool flag2 = false;
 | |
| 				bool flag3 = base.IsVisible == EIsBool.True;
 | |
| 				if (flag3)
 | |
| 				{
 | |
| 					flag2 = true;
 | |
| 				}
 | |
| 				graphPane.Y2Axis.IsVisible = flag2;
 | |
| 				graphPane.Y2Axis.Scale.IsVisible = flag2;
 | |
| 				graphPane.Y2Axis.Type = base.AxisTypeValue;
 | |
| 				bool flag4 = base.AxisTypeValue == AxisType.Date;
 | |
| 				if (flag4)
 | |
| 				{
 | |
| 					graphPane.Y2Axis.Scale.MajorUnit = base.DateUnitValue;
 | |
| 					graphPane.Y2Axis.Scale.MinorUnit = base.DateUnitValue;
 | |
| 					graphPane.Y2Axis.Scale.Min = new XDate(base.BeginTime);
 | |
| 					graphPane.Y2Axis.Scale.Max = new XDate(base.BeginTime.AddMinutes(base.TimeSpan));
 | |
| 				}
 | |
| 				else
 | |
| 				{
 | |
| 					bool flag5 = base.AxisTypeValue == AxisType.Linear;
 | |
| 					if (flag5)
 | |
| 					{
 | |
| 						graphPane.Y2Axis.Scale.Min = base.MinValue;
 | |
| 						graphPane.Y2Axis.Scale.Max = base.MaxValue;
 | |
| 					}
 | |
| 				}
 | |
| 				flag2 = false;
 | |
| 				bool flag6 = base.Scale_IsVisible == EIsBool.True;
 | |
| 				if (flag6)
 | |
| 				{
 | |
| 					flag2 = true;
 | |
| 				}
 | |
| 				graphPane.Y2Axis.Scale.IsVisible = flag2;
 | |
| 				flag2 = false;
 | |
| 				bool flag7 = base.MajorTic_Visible == EIsBool.True;
 | |
| 				if (flag7)
 | |
| 				{
 | |
| 					flag2 = true;
 | |
| 				}
 | |
| 				graphPane.Y2Axis.Scale.AlignH = base.AlignH;
 | |
| 				graphPane.Y2Axis.Scale.FontSpec.Size = base.ScaleFontSize;
 | |
| 				graphPane.Y2Axis.Scale.LabelGap = base.LabelGap;
 | |
| 				graphPane.Y2Axis.MajorTic.IsInside = flag2;
 | |
| 				graphPane.Y2Axis.MajorTic.IsOutside = flag2;
 | |
| 				graphPane.Y2Axis.MajorTic.IsOpposite = flag2;
 | |
| 				graphPane.Y2Axis.MinorTic.IsInside = flag2;
 | |
| 				graphPane.Y2Axis.MinorTic.IsOutside = flag2;
 | |
| 				graphPane.Y2Axis.MinorTic.IsOpposite = flag2;
 | |
| 				flag2 = false;
 | |
| 				bool flag8 = base.MajorGrid_Visible == EIsBool.True;
 | |
| 				if (flag8)
 | |
| 				{
 | |
| 					flag2 = true;
 | |
| 				}
 | |
| 				graphPane.Y2Axis.MajorGrid.IsVisible = flag2;
 | |
| 				graphPane.Y2Axis.MajorGrid.Color = Color.Gray;
 | |
| 				graphPane.Y2Axis.MajorGrid.DashOff = base.Major_DashOff;
 | |
| 				graphPane.Y2Axis.MajorGrid.DashOn = base.Major_DashOn;
 | |
| 				graphPane.Y2Axis.MajorGrid.PenWidth = base.PenWidth;
 | |
| 				flag2 = false;
 | |
| 				bool flag9 = base.MinorGrid_IsVisible == EIsBool.True;
 | |
| 				if (flag9)
 | |
| 				{
 | |
| 					flag2 = true;
 | |
| 				}
 | |
| 				graphPane.Y2Axis.MinorGrid.IsVisible = flag2;
 | |
| 				graphPane.Y2Axis.MinorGrid.Color = Color.Gray;
 | |
| 				graphPane.Y2Axis.MinorGrid.DashOff = base.Minor_DashOff;
 | |
| 				graphPane.Y2Axis.MinorGrid.DashOn = base.Minor_DashOn;
 | |
| 				graphPane.Y2Axis.MinorGrid.PenWidth = base.PenWidth;
 | |
| 				flag2 = false;
 | |
| 				bool flag10 = base.IsSkipFirstLabel == EIsBool.True;
 | |
| 				if (flag10)
 | |
| 				{
 | |
| 					flag2 = true;
 | |
| 				}
 | |
| 				graphPane.Y2Axis.Scale.IsSkipFirstLabel = flag2;
 | |
| 				flag2 = false;
 | |
| 				bool flag11 = base.IsSkipLastLabel == EIsBool.True;
 | |
| 				if (flag11)
 | |
| 				{
 | |
| 					flag2 = true;
 | |
| 				}
 | |
| 				graphPane.Y2Axis.Scale.IsSkipLastLabel = flag2;
 | |
| 				graphPane.Y2Axis.Scale.MajorStep = base.MajorStep;
 | |
| 				graphPane.Y2Axis.Scale.MinorStep = base.MinorStep;
 | |
| 				base.Refresh();
 | |
| 			}
 | |
| 		}
 | |
| 	}
 | |
| }
 |