void InitializeVirtualControl()
        {
            VirtualTimeAxis.TimeAxisType[] types = new VirtualTimeAxis.TimeAxisType[2];
            types[0] = VirtualTimeAxis.TimeAxisType.Rectangle;
            types[1] = VirtualTimeAxis.TimeAxisType.Linear;
            timeAxis = new VirtualTimeAxis(this, types, new Color[] { Color.Red, Color.Lime });
            timeAxis.Bounds = new Rectangle(0, this.Height - 30, this.Width - 1, 30);
            timeAxis.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            timeAxis.Invalidated += new EventHandler(virtualBase_Invalidated);
            timeAxis.MouseDoubleClick += new EventHandler<MouseEventArgs>(virtualTimeAxis_MouseDoubleClick);

            dateAxis = new VirtualDateAxis(this);
            dateAxis.Bounds = new Rectangle(0, this.Height - 50, this.Width - 1, 20);
            dateAxis.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            dateAxis.Invalidated += new EventHandler(virtualBase_Invalidated);
            dateAxis.YearChanged += new EventHandler(virtualDateAxis_YearChanged);
            dateAxis.MonthChanged += new EventHandler(virtualDateAxis_MonthChanged);
            dateAxis.DayChanged += new EventHandler(virtualDateAxis_DayChanged);

            VHSchedule = new VirtualHScroll(this);
            VHSchedule.Bounds = new Rectangle(0, this.Height - 70 + 1, this.Width - 1, 18);
            VHSchedule.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            VHSchedule.VisibleBinding = GetPlayVisible;
            VHSchedule.Scroll += new EventHandler(VHSchedule_Scroll);

            VBClose = new VirtualButton(this);
            VBClose.Bounds = new Rectangle(this.Width - 40, 1, 38, 18);
            VBClose.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            VBClose.Text = "视频";
            VBClose.Invalidated += new EventHandler(virtualBase_Invalidated);
            VBClose.MouseClick += new EventHandler<MouseEventArgs>(VBClose_MouseClick);

            VBTitle = new VirtualButton(this);
            VBTitle.Bounds = new Rectangle(1, 1, 0, 0);
            VBTitle.AutoSize = true;
            VBTitle.TextBinding = GetTitleText;
            VBTitle.Enabled = false;

            VBStartTime = new VirtualButton(this);
            VBStartTime.Bounds = new Rectangle(0, this.Bounds.Height - 90, 60, 20);
            VBStartTime.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
            VBStartTime.VisibleBinding = GetPlayVisible;

            VBEndTime = new VirtualButton(this);
            VBEndTime.Bounds = new Rectangle(this.Bounds.Width - 60 - 1, this.Bounds.Height - 90, 60, 20);
            VBEndTime.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
            VBEndTime.VisibleBinding = GetPlayVisible;

            VBCurrentTime = new VirtualButton(this);
            VBCurrentTime.Bounds = new Rectangle((this.Bounds.Width - 60) / 2, this.Bounds.Height - 90, 60, 20);
            VBCurrentTime.Anchor = AnchorStyles.Bottom;
            VBCurrentTime.VisibleBinding = GetPlayVisible;
        }
        void InitializeVirtualControl()
        {
            VBVideoCruise = new VirtualButton(this);
            VBVideoCruise.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            VBVideoCruise.Bounds = new Rectangle(this.Width - 100 - 1, 1, 18, 18);
            VBVideoCruise.Text = "巡";
            VBVideoCruise.CheckedEnabled = true;
            VBVideoCruise.CheckedBinding = GetCruiseChecked;
            VBVideoCruise.ParentMinSize = new Size(176, 0);
            VBVideoCruise.ParentMouseLeaveHide = true;
            VBVideoCruise.ParentMouseLeaveCheckedShow = true;
            VBVideoCruise.MouseClick += new EventHandler<MouseEventArgs>(VBVideoCruise_MouseClick);

            VBVideoAnalyze = new VirtualButton(this);
            VBVideoAnalyze.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            VBVideoAnalyze.Bounds = new Rectangle(this.Width - 80 - 1, 1, 18, 18);
            VBVideoAnalyze.Text = "识";
            VBVideoAnalyze.CheckedEnabled = true;
            VBVideoAnalyze.CheckedBinding = GetAnalyzeChecked;
            VBVideoAnalyze.ParentMinSize = new Size(156, 0);
            VBVideoAnalyze.ParentMouseLeaveHide = true;
            VBVideoAnalyze.ParentMouseLeaveCheckedShow = true;
            VBVideoAnalyze.MouseClick += new EventHandler<MouseEventArgs>(VBVideoAnalyze_MouseClick);

            VBVideoRecord = new VirtualButton(this);
            VBVideoRecord.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            VBVideoRecord.Bounds = new Rectangle(this.Width - 60 - 1, 1, 18, 18);
            VBVideoRecord.Text = "录";
            VBVideoRecord.CheckedEnabled = true;
            VBVideoRecord.CheckedBinding = GetRecordChecked;
            VBVideoRecord.ParentMinSize = new Size(136, 0);
            VBVideoRecord.ParentMouseLeaveHide = true;
            VBVideoRecord.ParentMouseLeaveCheckedShow = true;
            VBVideoRecord.MouseClick += new EventHandler<MouseEventArgs>(VBVideoRecord_MouseClick);

            VBVideoSnap = new VirtualButton(this);
            VBVideoSnap.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            VBVideoSnap.Bounds = new Rectangle(this.Width - 40 - 1, 1, 18, 18);
            VBVideoSnap.Text = "拍";
            VBVideoSnap.ParentMinSize = new Size(116, 0);
            VBVideoSnap.ParentMouseLeaveHide = true;
            VBVideoSnap.ParentMouseLeaveCheckedShow = true;
            VBVideoSnap.MouseClick += new EventHandler<MouseEventArgs>(VBVideoSnap_MouseClick);

            VBClose = new VirtualButton(this);
            VBClose.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            VBClose.Bounds = new Rectangle(this.Width - 20 - 1, 1, 18, 18);
            VBClose.Text = "关";
            VBClose.ParentMouseLeaveHide = true;
            VBClose.ParentMouseLeaveCheckedShow = true;
            VBClose.MouseClick += new EventHandler<MouseEventArgs>(VBClose_MouseClick);

            VBTiltUp = new VirtualButton(this);
            VBTiltUp.Anchor = AnchorStyles.Top;
            VBTiltUp.Bounds = new Rectangle((this.Width - 20) / 2 + 1, 20 + 1, 18, 18);
            VBTiltUp.Text = "上";
            VBTiltUp.CheckedEnabled = true;
            VBTiltUp.CheckedBinding = GetUpChecked;
            VBTiltUp.ParentMinSize = new Size(60, 100);
            VBTiltUp.ParentMouseLeaveHide = true;
            VBTiltUp.ParentMouseLeaveCheckedShow = true;
            VBTiltUp.EnabledBinding = GetPTZEnabled;
            VBTiltUp.MouseDown += new EventHandler<MouseEventArgs>(VBTiltUp_MouseDown);
            VBTiltUp.MouseUp += new EventHandler<MouseEventArgs>(VBPTZStop_MouseUp);

            VBTiltDown = new VirtualButton(this);
            VBTiltDown.Anchor = AnchorStyles.Bottom;
            VBTiltDown.Bounds = new Rectangle((this.Width - 20) / 2 + 1, this.Height - 40 + 1, 18, 18);
            VBTiltDown.Text = "下";
            VBTiltDown.CheckedEnabled = true;
            VBTiltDown.CheckedBinding = GetDownChecked;
            VBTiltDown.ParentMinSize = new Size(60, 100);
            VBTiltDown.ParentMouseLeaveHide = true;
            VBTiltDown.ParentMouseLeaveCheckedShow = true;
            VBTiltDown.EnabledBinding = GetPTZEnabled;
            VBTiltDown.MouseDown += new EventHandler<MouseEventArgs>(VBTiltDown_MouseDown);
            VBTiltDown.MouseUp += new EventHandler<MouseEventArgs>(VBPTZStop_MouseUp);

            VBPanLeft = new VirtualButton(this);
            VBPanLeft.Anchor = AnchorStyles.Left;
            VBPanLeft.Bounds = new Rectangle(1, (this.Height - 20) / 2 + 1, 18, 18);
            VBPanLeft.Text = "左";
            VBPanLeft.CheckedEnabled = true;
            VBPanLeft.CheckedBinding = GetLeftChecked;
            VBPanLeft.ParentMinSize = new Size(60, 100);
            VBPanLeft.ParentMouseLeaveHide = true;
            VBPanLeft.ParentMouseLeaveCheckedShow = true;
            VBPanLeft.EnabledBinding = GetPTZEnabled;
            VBPanLeft.MouseDown += new EventHandler<MouseEventArgs>(VBPanLeft_MouseDown);
            VBPanLeft.MouseUp += new EventHandler<MouseEventArgs>(VBPTZStop_MouseUp);

            VBPanRight = new VirtualButton(this);
            VBPanRight.Anchor = AnchorStyles.Right;
            VBPanRight.Bounds = new Rectangle(this.Width - 20 - 1, (this.Height - 20) / 2 + 1, 18, 18);
            VBPanRight.Text = "右";
            VBPanRight.CheckedEnabled = true;
            VBPanRight.CheckedBinding = GetRightChecked;
            VBPanRight.ParentMinSize = new Size(60, 100);
            VBPanRight.ParentMouseLeaveHide = true;
            VBPanRight.ParentMouseLeaveCheckedShow = true;
            VBPanRight.EnabledBinding = GetPTZEnabled;
            VBPanRight.MouseDown += new EventHandler<MouseEventArgs>(VBPanRight_MouseDown);
            VBPanRight.MouseUp += new EventHandler<MouseEventArgs>(VBPTZStop_MouseUp);

            VBZoomTele = new VirtualButton(this);
            VBZoomTele.Bounds = new Rectangle(1, 20 + 1, 18, 18);
            VBZoomTele.Text = "高";
            VBZoomTele.CheckedEnabled = true;
            VBZoomTele.CheckedBinding = GetTeleChecked;
            VBZoomTele.ParentMinSize = new Size(60, 100);
            VBZoomTele.ParentMouseLeaveHide = true;
            VBZoomTele.ParentMouseLeaveCheckedShow = true;
            VBZoomTele.EnabledBinding = GetPTZEnabled;
            VBZoomTele.MouseDown += new EventHandler<MouseEventArgs>(VBZoomTele_MouseDown);
            VBZoomTele.MouseUp += new EventHandler<MouseEventArgs>(VBPTZStop_MouseUp);

            VBZoomWide = new VirtualButton(this);
            VBZoomWide.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            VBZoomWide.Bounds = new Rectangle(this.Width - 20 - 1, 20 + 1, 18, 18);
            VBZoomWide.Text = "低";
            VBZoomWide.CheckedEnabled = true;
            VBZoomWide.CheckedBinding = GetWideChecked;
            VBZoomWide.ParentMinSize = new Size(60, 100);
            VBZoomWide.ParentMouseLeaveHide = true;
            VBZoomWide.ParentMouseLeaveCheckedShow = true;
            VBZoomWide.EnabledBinding = GetPTZEnabled;
            VBZoomWide.MouseDown += new EventHandler<MouseEventArgs>(VBZoomWide_MouseDown);
            VBZoomWide.MouseUp += new EventHandler<MouseEventArgs>(VBPTZStop_MouseUp);

            VBSpeedFast = new VirtualButton(this);
            VBSpeedFast.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            VBSpeedFast.Bounds = new Rectangle(1, this.Height - 40, 18, 18);
            VBSpeedFast.Text = "快";
            VBSpeedFast.ParentMinSize = new Size(60, 100);
            VBSpeedFast.ParentMouseLeaveHide = true;
            VBSpeedFast.ParentMouseLeaveCheckedShow = true;
            VBSpeedFast.EnabledBinding = GetPTZEnabled;
            VBSpeedFast.MouseDown += new EventHandler<MouseEventArgs>(VBSpeedFast_MouseDown);

            VBSpeedSlow = new VirtualButton(this);
            VBSpeedSlow.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            VBSpeedSlow.Bounds = new Rectangle(this.Width - 20 - 1, this.Height - 40, 18, 18);
            VBSpeedSlow.Text = "慢";
            VBSpeedSlow.ParentMinSize = new Size(60, 100);
            VBSpeedSlow.ParentMouseLeaveHide = true;
            VBSpeedSlow.ParentMouseLeaveCheckedShow = true;
            VBSpeedSlow.EnabledBinding = GetPTZEnabled;
            VBSpeedSlow.MouseDown += new EventHandler<MouseEventArgs>(VBSpeedSlow_MouseDown);

            VBAlarmYes = new VirtualButton(this);
            VBAlarmYes.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            VBAlarmYes.Text = "是";
            VBAlarmYes.Bounds = new Rectangle(this.Width - 40 - 1, this.Height - 20, 18, 18);
            VBAlarmYes.CheckedEnabled = true;
            VBAlarmYes.CheckedBinding = GetYesChecked;
            VBAlarmYes.VisibleBinding = GetYesNoVisible;
            VBAlarmYes.ParentMinSize = new Size(100, 100);
            VBAlarmYes.MouseClick += new EventHandler<MouseEventArgs>(VBAlarmYes_MouseClick);

            VBAlarmNo = new VirtualButton(this);
            VBAlarmNo.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            VBAlarmNo.Text = "否";
            VBAlarmNo.Bounds = new Rectangle(this.Width - 20 - 1, this.Height - 20, 18, 18);
            VBAlarmNo.CheckedEnabled = true;
            VBAlarmNo.CheckedBinding = GetNoChecked;
            VBAlarmNo.VisibleBinding = GetYesNoVisible;
            VBAlarmNo.ParentMinSize = new Size(100, 100);
            VBAlarmNo.MouseClick += new EventHandler<MouseEventArgs>(VBAlarmNo_MouseClick);

            VBPlayer = new VirtualButton(this);
            VBPlayer.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            VBPlayer.Text = "播放器";
            VBPlayer.Bounds = new Rectangle(this.Width - 20 - 1, 40, 18, 48);
            VBPlayer.ParentMouseLeaveHide = true;
            VBPlayer.ParentMinSize = new Size(20, 200);
            VBPlayer.MouseClick += new EventHandler<MouseEventArgs>(VBPlayer_MouseClick);

            VBTitle = new VirtualButton(this);
            VBTitle.Bounds = new Rectangle(1, 1, 0, 0);
            VBTitle.ParentMouseLeaveHide = true;
            VBTitle.AutoSize = true;
            VBTitle.TextBinding = GetTitleText;
            VBTitle.Enabled = false;

            VBState = new VirtualButton(this);
            VBState.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            VBState.Bounds = new Rectangle(1, this.Height - 20, 0, 0);
            VBState.CheckedEnabled = true;
            VBState.CheckedBinding = GetStateChecked;
            VBState.AutoSize = true;
            VBState.TextBinding = GetStateText;
            VBState.ParentMouseLeaveHide = true;
            VBState.ParentMouseLeaveCheckedShow = true;
            VBState.Enabled = false;
        }