Exemplo n.º 1
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();
        }
Exemplo n.º 2
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();
        }