public ShutterNode() : base() { index++; this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxShutterType; this.Text = UIResMang.GetString("TextShutter"); this.Title = UIResMang.GetString("TextShutter") + index; SetText(this.Title); this.Size = new Size(60, 60); this.Padding = new Padding(15); this.Radius = 30; this.FlatStyle = EFlatStyle.Flat; this.Alpha = 0.6f; this.BackgroundColor = Color.White; this.Symbol = ProjResManager.CopyImage(Path.Combine(MyCache.ProjectResCtrlDir, "Shutter_On.png")); this.ImageOn = ProjResManager.CopyImage(Path.Combine(MyCache.ProjectResCtrlDir, "Shutter_On.png")); this.ImageOff = ProjResManager.CopyImage(Path.Combine(MyCache.ProjectResCtrlDir, "Shutter_Off.png")); this.ShutterUpDown = new KNXObject(); this.ShutterStop = new KNXObject(); this.AbsolutePositionOfShutter = new KNXObject(); this.AbsolutePositionOfBlinds = new KNXObject(); this.StateUpperPosition = new KNXObject(); this.StateLowerPosition = new KNXObject(); this.StatusActualPositionOfShutter = new KNXObject(); this.StatusActualPositionOfBlinds = new KNXObject(); }
public DimmerNode() : base() { index++; this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxDimmerType; this.Text = UIResMang.GetString("TextDimmer"); this.Title = UIResMang.GetString("TextDimmer") + index; SetText(this.Title); this.Size = new Size(60, 60); this.Padding = new Padding(15); this.FlatStyle = EFlatStyle.Flat; this.Radius = 30; this.Alpha = 0.6f; this.BackgroundColor = Color.White; this.Symbol = ProjResManager.CopyImage(Path.Combine(MyCache.ProjectResCtrlDir, "Dimmer_Off.png")); this.ImageOn = ProjResManager.CopyImage(Path.Combine(MyCache.ProjectResCtrlDir, "Dimmer_On.png")); this.ImageOff = ProjResManager.CopyImage(Path.Combine(MyCache.ProjectResCtrlDir, "Dimmer_Off.png")); this.Switch = new KNXObject(); this.DimRelatively = new KNXObject(); this.DimAbsolutely = new KNXObject(); this.StateOnOff = new KNXObject(); this.StateDimValue = new KNXObject(); }
/// <summary> /// 从工程文件中导入控件 /// </summary> /// <param name="knx"></param> public DimmerNode(KNXDimmer knx, BackgroundWorker worker) : base(knx, worker) { this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxDimmerType; SetText(this.Title); this.Symbol = knx.Symbol; this.ImageOn = knx.ImageOn; this.ImageOff = knx.ImageOff; this.Switch = knx.Switch ?? new KNXObject(); this.DimRelatively = knx.DimRelatively ?? new KNXObject(); this.DimAbsolutely = knx.DimAbsolutely ?? new KNXObject(); this.StateOnOff = knx.StateOnOff ?? new KNXObject(); this.StateDimValue = knx.StateDimValue ?? new KNXObject(); }
/// <summary> /// 从工程文件中导入控件 /// </summary> /// <param name="knx"></param> public ShutterNode(KNXShutter knx, BackgroundWorker worker) : base(knx, worker) { this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxShutterType; SetText(this.Title); this.Symbol = knx.Symbol; this.ImageOn = knx.ImageOn; this.ImageOff = knx.ImageOff; this.ShutterUpDown = knx.ShutterUpDown ?? new KNXObject(); this.ShutterStop = knx.ShutterStop ?? new KNXObject(); this.AbsolutePositionOfShutter = knx.AbsolutePositionOfShutter ?? new KNXObject(); this.AbsolutePositionOfBlinds = knx.AbsolutePositionOfBlinds ?? new KNXObject(); this.StateUpperPosition = knx.StateUpperPosition ?? new KNXObject(); this.StateLowerPosition = knx.StateLowerPosition ?? new KNXObject(); this.StatusActualPositionOfShutter = knx.StatusActualPositionOfShutter ?? new KNXObject(); this.StatusActualPositionOfBlinds = knx.StatusActualPositionOfBlinds ?? new KNXObject(); }