Exemple #1
0
        void PostStats(SYSTEM_STATUS_STRINGS status)
        {
            buttonChannel1.Text      = "Channel 1 " + status.VideoChannel1.status;
            buttonChannel1.BackColor = status.VideoChannel1.color;

            buttonChannel2.Text      = "Channel 2 " + status.VideoChannel2.status;
            buttonChannel2.BackColor = status.VideoChannel2.color;

            buttonChannel3.Text      = "Channel 3 " + status.VideoChannel3.status;
            buttonChannel3.BackColor = status.VideoChannel3.color;

            buttonChannel4.Text      = "Channel 4 " + status.VideoChannel4.status;
            buttonChannel4.BackColor = status.VideoChannel4.color;


            buttonFGStatus_1.Text      = status.FrameGrabber_1.status;
            buttonFGStatus_1.BackColor = status.FrameGrabber_1.color;

            buttonFGStatus_0.Text      = status.FrameGrabber_0.status;
            buttonFGStatus_0.BackColor = status.FrameGrabber_0.color;

            buttonGPSStatus.Text      = status.GPS.status;
            buttonGPSStatus.BackColor = status.GPS.color;


            textBoxHotSwapStatus.Text      = status.Hotswap.status;
            textBoxHotSwapStatus.ForeColor = status.Hotswap.color;

            string driveString = status.Drive.status.Replace("^^", ":");

            buttonDiskDrive.Text      = driveString;
            buttonDiskDrive.BackColor = status.Drive.color;



            buttonLPRServiceStatusIndicator.Text      = status.Service.status;
            buttonLPRServiceStatusIndicator.BackColor = status.Service.color;


            progressBarPlateProcessQueueLevel.Value = (100 * status.LprPlateProcessQueCount.count) / 240;
            progressBarPlateProcessQueueLevel.Invalidate(true);

            labelServiceVersion.Text = status.ServiceVersion.status;
        }
        void PostStats(SYSTEM_STATUS_STRINGS status)
        {
            buttonChannel1.Text = "Channel 1 " + status.VideoChannel1.status;
            buttonChannel1.BackColor = status.VideoChannel1.color;

            buttonChannel2.Text = "Channel 2 " + status.VideoChannel2.status;
            buttonChannel2.BackColor  = status.VideoChannel2.color;

            buttonChannel3.Text = "Channel 3 " + status.VideoChannel3.status;
            buttonChannel3.BackColor  = status.VideoChannel3.color;

            buttonChannel4.Text = "Channel 4 " + status.VideoChannel4.status;
            buttonChannel4.BackColor  = status.VideoChannel4.color;

            buttonFGStatus_1.Text = status.FrameGrabber_1.status;
            buttonFGStatus_1.BackColor = status.FrameGrabber_1.color;

            buttonFGStatus_0.Text = status.FrameGrabber_0.status;
            buttonFGStatus_0.BackColor = status.FrameGrabber_0.color;

            buttonGPSStatus.Text = status.GPS.status;
            buttonGPSStatus.BackColor = status.GPS.color;

            textBoxHotSwapStatus.Text = status.Hotswap.status;
            textBoxHotSwapStatus.ForeColor = status.Hotswap.color;

            string driveString = status.Drive.status.Replace("^^", ":");
            buttonDiskDrive.Text = driveString;
            buttonDiskDrive.BackColor = status.Drive.color;

            buttonLPRServiceStatusIndicator.Text = status.Service.status;
            buttonLPRServiceStatusIndicator.BackColor= status.Service.color;

            progressBarPlateProcessQueueLevel.Value = (100* status.LprPlateProcessQueCount.count )/ 240;
            progressBarPlateProcessQueueLevel.Invalidate(true);

            labelServiceVersion.Text = status.ServiceVersion.status;
        }
        public GoNoGoStatusMainForm()
        {
            InitializeComponent();

            this.Text = "First Evidence GoNoGo System Monitor, version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

            m_AppData = new APPLICATION_DATA();
            m_Log = new ErrorLog(m_AppData);
            m_AppData.Logger =(object) m_Log;

            LPROCR_Lib LPRlib = new LPROCR_Lib();

            // get plate min max to draw the min/max target boxes for the user to see
            LPRlib.GetMinMaxPlateSize(ref minW, ref maxW, ref minH, ref maxH);

            // fudge the min box size so the user will make the plate bigger
            minH += 20;
            minW += 40;

            m_ReceiveDataSingleton = new object();

            jpegQ = new ThreadSafeQueue<JPEG>(30);

            m_PreviousPlateNumber = new string[4];
            m_UneditedImages = new UNEDITEDIMAGES[4];
            m_UneditedImages[0] = new UNEDITEDIMAGES();
            m_UneditedImages[1] = new UNEDITEDIMAGES();
            m_UneditedImages[2] = new UNEDITEDIMAGES();
            m_UneditedImages[3] = new UNEDITEDIMAGES();

            m_SystemStatusLock = new object();
            m_SystemStatus = new SYSTEM_STATUS_STRINGS();

            m_FullScreenPB = new bool[4];
            m_FullScreenPB[0] = false;
            m_FullScreenPB[1] = false;
            m_FullScreenPB[2] = false;
            m_FullScreenPB[3] = false;

            this.FormClosing += new FormClosingEventHandler(GoNoGoStatusMainForm_FormClosing);

            this.Resize +=new EventHandler(GoNoGoStatusMainForm_Resize);

            m_ServerConnection = new RCSClient( m_AppData);

            m_PollingThread = new Thread(PollingLoop);

            m_ServerConnection.MessageEventGenerators.OnRxChannelList += OnReceiveChannels;
            m_ServerConnection.MessageEventGenerators.OnRxJpeg += OnNewJpeg;
            m_ServerConnection.MessageEventGenerators.OnRxHealthStatus += OnRxStats;

            pb_ClickGenericHandler = new pb_ClickDelegate[4];
            pb_ClickGenericHandler[0] = pb_Click0;
            pb_ClickGenericHandler[1] = pb_Click1;
            pb_ClickGenericHandler[2] = pb_Click2;
            pb_ClickGenericHandler[3] = pb_Click3;

            m_JpegPlayControl = new JPEG_PLAY_CONTROL[4];
            m_JpegPlayControl[0] = new JPEG_PLAY_CONTROL();
            m_JpegPlayControl[1] = new JPEG_PLAY_CONTROL();
            m_JpegPlayControl[2] = new JPEG_PLAY_CONTROL();
            m_JpegPlayControl[3] = new JPEG_PLAY_CONTROL();

            progressBarPlateProcessQueueLevel = new MyProgressBar();
            progressBarPlateProcessQueueLevel.Location = new Point(10, 40);
            progressBarPlateProcessQueueLevel.Size = new Size(groupBoxPlateProcessQueLevel.Size.Width-20, 30);

            groupBoxPlateProcessQueLevel.Controls.Add(progressBarPlateProcessQueueLevel);

            buttonSaveCurrentImage.Visible = false;
            buttonSaveCurrentImage.Enabled = false;

            m_PollingThread.Start();
        }
Exemple #4
0
        public GoNoGoStatusMainForm()
        {
            InitializeComponent();

            this.Text = "First Evidence GoNoGo System Monitor, version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

            m_AppData        = new APPLICATION_DATA();
            m_Log            = new ErrorLog(m_AppData);
            m_AppData.Logger = (object)m_Log;

            LPROCR_Lib LPRlib = new LPROCR_Lib();

            // get plate min max to draw the min/max target boxes for the user to see
            LPRlib.GetMinMaxPlateSize(ref minW, ref maxW, ref minH, ref maxH);

            // fudge the min box size so the user will make the plate bigger
            minH += 20;
            minW += 40;


            m_ReceiveDataSingleton = new object();

            jpegQ = new ThreadSafeQueue <JPEG>(30);

            m_PreviousPlateNumber = new string[4];
            m_UneditedImages      = new UNEDITEDIMAGES[4];
            m_UneditedImages[0]   = new UNEDITEDIMAGES();
            m_UneditedImages[1]   = new UNEDITEDIMAGES();
            m_UneditedImages[2]   = new UNEDITEDIMAGES();
            m_UneditedImages[3]   = new UNEDITEDIMAGES();

            m_SystemStatusLock = new object();
            m_SystemStatus     = new SYSTEM_STATUS_STRINGS();


            m_FullScreenPB    = new bool[4];
            m_FullScreenPB[0] = false;
            m_FullScreenPB[1] = false;
            m_FullScreenPB[2] = false;
            m_FullScreenPB[3] = false;

            this.FormClosing += new FormClosingEventHandler(GoNoGoStatusMainForm_FormClosing);

            this.Resize += new EventHandler(GoNoGoStatusMainForm_Resize);

            m_ServerConnection = new RCSClient(m_AppData);

            m_PollingThread = new Thread(PollingLoop);


            m_ServerConnection.MessageEventGenerators.OnRxChannelList  += OnReceiveChannels;
            m_ServerConnection.MessageEventGenerators.OnRxJpeg         += OnNewJpeg;
            m_ServerConnection.MessageEventGenerators.OnRxHealthStatus += OnRxStats;

            pb_ClickGenericHandler    = new pb_ClickDelegate[4];
            pb_ClickGenericHandler[0] = pb_Click0;
            pb_ClickGenericHandler[1] = pb_Click1;
            pb_ClickGenericHandler[2] = pb_Click2;
            pb_ClickGenericHandler[3] = pb_Click3;

            m_JpegPlayControl    = new JPEG_PLAY_CONTROL[4];
            m_JpegPlayControl[0] = new JPEG_PLAY_CONTROL();
            m_JpegPlayControl[1] = new JPEG_PLAY_CONTROL();
            m_JpegPlayControl[2] = new JPEG_PLAY_CONTROL();
            m_JpegPlayControl[3] = new JPEG_PLAY_CONTROL();


            progressBarPlateProcessQueueLevel          = new MyProgressBar();
            progressBarPlateProcessQueueLevel.Location = new Point(10, 40);
            progressBarPlateProcessQueueLevel.Size     = new Size(groupBoxPlateProcessQueLevel.Size.Width - 20, 30);

            groupBoxPlateProcessQueLevel.Controls.Add(progressBarPlateProcessQueueLevel);

            buttonSaveCurrentImage.Visible = false;
            buttonSaveCurrentImage.Enabled = false;

            m_PollingThread.Start();
        }