internal DigitalPointDocument(Device device, SolutionNode parent, DevicePoint dataModel, int folderId) { InitializeComponent(); //报警组 var items = new List <object>(); for (int i = 0; i < 16; i++) { items.Add(new { text = (i + 1).ToString(), value = (1 << i) }); } cmd_AlarmGroup.ItemsSource = items; //安全区 items = new List <object>(); for (int i = 0; i < 26; i++) { items.Add(new { text = ((char)(((int)('A')) + i)).ToString(), value = (1 << i) }); } cmbSafeArea.ItemsSource = items; Controller = new PointDocumentController(this, gridProperty, device, DevicePoint_TypeEnum.Digital, parent, dataModel, folderId); this.Title = Controller.OriginalModel.Name; }
internal AnalogPointDocument(Device device, SolutionNode parent, DevicePoint dataModel, int folderId) { _dataModel = dataModel; InitializeComponent(); List <object> items = new List <object>(); for (double i = 1; i <= 100; i++) { items.Add(new { text = i + "%", value = i }); } cmd_ValueRelativeChangeOptions.ItemsSource = items; items = new List <object>(); for (double i = 1; i <= 100; i++) { items.Add(new { text = i + "%", value = i }); } cmd_Percent.ItemsSource = items; items = new List <object>(); for (double i = 1; i <= 120; i++) { items.Add(new { text = i + "秒", value = i }); } cmd_ValueOnTimeChangeOptions.ItemsSource = items; items = new List <object>(); for (double i = 1; i <= 120; i++) { items.Add(new { text = i + "秒", value = i }); } cmd_ChangeCycle.ItemsSource = items; //报警组 items = new List <object>(); for (int i = 0; i < 16; i++) { items.Add(new { text = (i + 1).ToString(), value = (1 << i) }); } cmd_AlarmGroup.ItemsSource = items; //安全区 items = new List <object>(); for (int i = 0; i < 26; i++) { items.Add(new { text = ((char)(((int)('A')) + i)).ToString(), value = (1 << i) }); } cmbSafeArea.ItemsSource = items; Controller = new PointDocumentController(this, gridProperty, device, DevicePoint_TypeEnum.Analog, parent, dataModel, folderId); this.Title = Controller.OriginalModel.Desc; }