Esempio n. 1
0
 public LockForm(LockFormPanel panel)
 {
     InitializeComponent();
     LockPanel = panel;
 }
Esempio n. 2
0
        /// <summary>
        /// 响应广播消息
        /// </summary>
        /// <param name="recordInfo"></param>
        /// <param name="isWaitOne"></param>
        private void ActiveMessage(ProcessRecord recordInfo, bool isWaitOne)
        {
            /// <summary>
            /// 显示收费框
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.ShowCharge)
            {
                var        MonitorWidth  = SystemInformation.PrimaryMonitorSize.Width;
                var        MonitorHeight = SystemInformation.PrimaryMonitorSize.Height;
                ChargeForm chargeForm    = new ChargeForm(recordInfo);

                //chargeForm.Width = MonitorWidth / 3;
                //chargeForm.Height = chargeForm.Width / 4 * 3 - 40;

                Point point = new Point();
                point.X             = MonitorWidth - chargeForm.Width;
                point.Y             = MonitorHeight - chargeForm.Height - bottomTitleHeight;
                chargeForm.Location = point;
                //if (isWaitOne)
                //    chargeForm.ShowDialog();
                //else
                chargeForm.Show();
            }
            /// <summary>
            /// 车牌矫正框
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.PlateCorrection)
            {
                var MonitorWidth  = SystemInformation.PrimaryMonitorSize.Width;
                var MonitorHeight = SystemInformation.PrimaryMonitorSize.Height;
                PlateCorrectionForm plateCorrectionForm = new PlateCorrectionForm(recordInfo);

                //plateCorrectionForm.Width = MonitorWidth / 7 * 2;
                //plateCorrectionForm.Height = plateCorrectionForm.Width / 5 * 3 - 40;

                Point point = new Point();
                point.X = MonitorWidth - plateCorrectionForm.Width;
                point.Y = MonitorHeight - plateCorrectionForm.Height - bottomTitleHeight;
                plateCorrectionForm.Location = point;
                //if (isWaitOne)
                //    plateCorrectionForm.ShowDialog();
                //else
                plateCorrectionForm.Show();
            }
            /// <summary>
            /// 确认开闸框
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.OpenInConfirmGate)
            {
                var             MonitorWidth    = SystemInformation.PrimaryMonitorSize.Width;
                var             MonitorHeight   = SystemInformation.PrimaryMonitorSize.Height;
                ConfirmGateForm confirmGateForm = new ConfirmGateForm(recordInfo);

                //confirmGateForm.Width = MonitorWidth / 7 * 2;
                //confirmGateForm.Height = confirmGateForm.Width / 5 * 3 - 40;

                Point point = new Point();
                point.X = MonitorWidth - confirmGateForm.Width;
                point.Y = MonitorHeight - confirmGateForm.Height - bottomTitleHeight;
                confirmGateForm.Location = point;
                //if (isWaitOne)
                //    confirmGateForm.ShowDialog();
                //else
                confirmGateForm.Show();
            }
            /// <summary>
            /// 锁屏幕
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.LockForm)
            {
                LockFormPanel form = new LockFormPanel();
                form.ShowDialog();
            }
            /// <summary>
            /// 手工放行入场
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.HandReleaseIn)
            {
                DataUploadRecord dataUploadRecord = new DataUploadRecord();
                dataUploadRecord.REPORTIMG_TIME = DateTime.Now;
                dataUploadRecord.CHANNEL_TYPE   = enumChannelType.chn_in;
                HandReleaseForm handReleaseForm = new HandReleaseForm(dataUploadRecord);
                handReleaseForm.Title = "手工放行入场";
                handReleaseForm.ShowDialog();
            }
            /// <summary>
            /// 手工放行出场
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.HandReleaseOut)
            {
                DataUploadRecord dataUploadRecord = new DataUploadRecord();
                dataUploadRecord.plateNum       = recordInfo.INOUT_RECODE.VEHICLE_NO;
                dataUploadRecord.CarType        = recordInfo.CarType;
                dataUploadRecord.REPORTIMG_TIME = DateTime.Now;
                dataUploadRecord.CHANNEL_TYPE   = enumChannelType.chn_out;
                HandReleaseForm handReleaseForm = new HandReleaseForm(dataUploadRecord);
                handReleaseForm.Title = "手工放行出场";
                handReleaseForm.ShowDialog();
            }
            /// <summary>
            /// 无牌车放行入场
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.UnlicensedIn)
            {
                DataUploadRecord dataUploadRecord = new DataUploadRecord();
                dataUploadRecord.REPORTIMG_TIME = DateTime.Now;
                dataUploadRecord.CHANNEL_TYPE   = enumChannelType.chn_in;
                UnlicensedCarsEnter unlicensedCarsEnterForm = new UnlicensedCarsEnter(dataUploadRecord);
                unlicensedCarsEnterForm.Title = "无牌车放行入场";
                unlicensedCarsEnterForm.ShowDialog();
            }
            /// <summary>
            /// 无牌车放行出场
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.UnlicensedOut)
            {
                DataUploadRecord dataUploadRecord = new DataUploadRecord();
                dataUploadRecord.REPORTIMG_TIME = DateTime.Now;
                dataUploadRecord.CHANNEL_TYPE   = enumChannelType.chn_out;
                UnlicensedCarsEnter unlicensedCarsEnterForm = new UnlicensedCarsEnter(dataUploadRecord);
                unlicensedCarsEnterForm.Title = "无牌车放行出场";
                unlicensedCarsEnterForm.ShowDialog();
            }
            /// <summary>
            /// 退出系统
            /// </summary>
            if (recordInfo.OPERATER_TYPE == enumOperaterType.Quit)
            {
                G5MessageBox msgBox = new G5MessageBox("确定要退出吗?");
                DialogResult result = msgBox.ShowDialog();
                if (result == DialogResult.Yes)
                {
                    System.Environment.Exit(0);
                    this.Close();
                }
            }
        }