using System.Collections.Generic; using System; using System.Drawing; using System.Diagnostics; using System.Data; using System.Collections; using System.Windows.Forms; using AR; using System.Windows.Media; using System.Windows; using System.ComponentModel; namespace vmsnet { public class CTrendSetting : AR.Setting { [Browsable(false)] public DateTime graph_time_start { get; set; } [Browsable(false)] public DateTime graph_time_end { get; set; } [Category("Y-Axis"), DisplayName("Y축 표시영역(시작)"), Description("Y축 그래프의 시작범위 입니다(voltage)")] public float graph_y_start { get; set; } [Category("Y-Axis"), DisplayName("Y축 표시영역(종료)"), Description("Y축 그래프의 종료범위 입니다(voltage)")] public float graph_y_end { get; set; } [Category("X-Axis"), DisplayName("X축 바닥영역 최소 크기"), Description("X축 바닥 글자 영역의 최소 크기 입니다. 글자가 가려지는 경우 이값을 늘려주세요")] public float graph_bottom_minsize { get; set; } [Category("Y-Axis"), DisplayName("Y축영역 자동설정"), Description("Y축 영역을 자동으로 설정합니다. 입력된 값에 따라서 자동으로 변경 됩니다")] public bool y_scale_auto { get; set; } [Browsable(false)] public string tv_selectgroup0 { get; set; } [Browsable(false)] public string tv_selectgroup { get; set; } public override void AfterLoad() { if ((graph_y_end < graph_y_start) || (graph_y_start == 0f && graph_y_end == 0f)) y_scale_auto = true; if (graph_time_end.Year == 1982 || graph_time_start.Year == 1982) { graph_time_end = DateTime.Now; graph_time_start = graph_time_end.AddDays(-7); } if (graph_bottom_minsize < 1) graph_bottom_minsize = 45; } public override void AfterSave() { } } public class CSetting : AR.Setting { public int MaxChCount { get; set; } public string bugreport { get; set; } public int datadiv { get; set; } public string databasefolder { get; set; } public string sangho { get; set; } public string tel { get; set; } ////트렌드뷰의 각종 설정값 public CSetting() { var fn = this.filename; bugreport = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Bugreport"); } public string GetDatabasePath() { if (databasefolder.isEmpty()) { //트렌드와 알람은 상위폴더를 반환해야한다 var di = new System.IO.DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); return di.Parent.FullName; } else return databasefolder; } public override void AfterLoad() { if (datadiv == 0) datadiv = 1; } public override void AfterSave() { //throw new NotImplementedException(); } } }