/// <summary> /// 构造函数: /// 创建,<c>WSNTimeSlidePicker</c> /// </summary> public WSNTimeSlidePicker() { bar = new WSNTrackBar.WSNTrackBar(); bar.Minimum = 0; bar.Maximum = 24 * 60 * 60 - 1; bar.SmallChange = 60; BackErrorColor = Color.FromArgb(255, 211, 115); backNormalColor = Color.White; timer = new Timer(); timer.Interval = 200; BlinkTotalCount = 6; timer.Tick += new EventHandler(timer_Tick); blinkCount = 0; //this.bar.Value = 0; bar.Orientation = Orientation.Vertical; host = new WSNPopupControlHost.WSNPopupControlHost(bar); //host.ChangeRegion = true;//设置显示区域。 //host.Opacity = 0.8F;//设置透明度。 host.CanResize = false; //设置可以改变大小。 host.OpenFocused = false; //把焦点设置到弹出窗体上。 host.AutoClose = false; this.Click += new EventHandler(WSNTimeSlidePicker_Click); bar.ValueChanged += new EventHandler(bar_ValueChanged); this.Validating += new System.ComponentModel.CancelEventHandler(WSNTimeSlidePicker_Validating); this.TextChanged += new EventHandler(WSNTimeSlidePicker_TextChanged); this.Text = "23:59:59"; }
/// <summary> /// 构造函数: /// 创建,<c>WSNTimeSlidePicker</c> /// </summary> public WSNTimeSlidePicker() { bar = new WSNTrackBar.WSNTrackBar(); bar.Minimum = 0; bar.Maximum = 24 * 60 * 60-1; bar.SmallChange = 60; BackErrorColor = Color.FromArgb(255, 211, 115); backNormalColor = Color.White; timer = new Timer(); timer.Interval = 200; BlinkTotalCount = 6; timer.Tick += new EventHandler(timer_Tick); blinkCount = 0; //this.bar.Value = 0; bar.Orientation = Orientation.Vertical; host = new WSNPopupControlHost.WSNPopupControlHost(bar); //host.ChangeRegion = true;//设置显示区域。 //host.Opacity = 0.8F;//设置透明度。 host.CanResize = false;//设置可以改变大小。 host.OpenFocused = false;//把焦点设置到弹出窗体上。 host.AutoClose = false; this.Click += new EventHandler(WSNTimeSlidePicker_Click); bar.ValueChanged += new EventHandler(bar_ValueChanged); this.Validating += new System.ComponentModel.CancelEventHandler(WSNTimeSlidePicker_Validating); this.TextChanged += new EventHandler(WSNTimeSlidePicker_TextChanged); this.Text = "23:59:59"; }