Exemplo n.º 1
0
        void AddPlateTabToDiagPage(PLATE_INFO pi)
        {
            TabPage page = new TabPage();

            LPRInteractiveEditUC.LPRInteractiveEditUC LPRDiagDisplay;
            LPRDiagDisplay          = new LPRInteractiveEditUC.LPRInteractiveEditUC(m_AppData);
            LPRDiagDisplay.Location = new Point(10, 10);
            page.Controls.Add(LPRDiagDisplay);
            page.Text = (pi.plateNumber == null)? " ": pi.plateNumber;

            tabControlDiagdisplay.TabPages.Add(page);

            m_TabPageLPRDiagnosticsTable.Add(page, LPRDiagDisplay);

            Bitmap BinarizedPlateImage = CreateTestBinarizedImage(pi);

            // the binarized from the test method in this C# program:
            //     LPRDiagDisplay.PostPicture(BinarizedPlateImage, (pi.plateNumber == null) ? " " : pi.plateNumber);

            LPRDiagDisplay.PostPicture(pi.plateImage, (pi.plateNumber == null)? " ": pi.plateNumber);


            LPRDiagDisplay.PostHistogram(pi.histoBmp, pi.histString);

            for (int c = 0; c < pi.charImages.Count(); c++)
            {
                LPRDiagDisplay.PostCharImage(pi.charImages[c], c, " ");
            }
        }
Exemplo n.º 2
0
 void OnReceiveChannels(string[] list)
 {
     lock (m_ReceiveDataSingleton)
     {
         m_ChannelIndexTable = new ThreadSafeHashTable(4);
         m_ChanneList        = list;
         int i = 0;
         foreach (string chan in list)
         {
             m_ChannelIndexTable.Add(chan, i);
             i++;
         }
     }
 }
Exemplo n.º 3
0
        private void buttonSelectFile_Click(object sender, EventArgs e)
        {
            try
            {
                dataGridViewFilesInProcess.Rows.Clear();
                m_DataGridRowIndex.Clear();

                openFileDialog1.FileName = " "; // clear out the default file name 'openFileDialog1'

                openFileDialog1.Filter = "Media Files|*.asf;*.avi;*.wmv;*.mov|All Files|*.*";

                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    string[] files = new string[1];// because MovieFileController.LoadFiles(files) wants a file array
                    files[0] = openFileDialog1.FileName;
                    LoadDefaultCameraName(files[0]);
                    m_FrameGenerator.MovieFileController.LoadFiles(files);

                    dataGridViewFilesInProcess.Rows.Add(files[0], "not started");
                    m_DataGridRowIndex.Add(files[0], dataGridViewFilesInProcess.Rows.Count - 1);
                }
            }
            catch (Exception ex) { m_Log.Trace(ex, ErrorLog.LOG_TYPE.INFORMATIONAL); }
        }
Exemplo n.º 4
0
        void SendMessagesLoop()
        {
            SEND_MESSAGE message;

            while (!m_Stop)
            {
                Thread.Sleep(10);

                message = m_SendMessagesQ.Dequeue();
                if (message != null)
                {
                    m_SendResultEvents.Add(message.Mail_Key, (object)message.sendResultCallBack);
                    SendMessageToDotNet(message);
                }
            }
        }
Exemplo n.º 5
0
        public void StartThreads()
        {
            IPAddress[] ipAddresses = ConnectionServer.GetValidLocalAddress();
            if (ipAddresses == null)
            {
                m_Log.Log(" no local IP addresses found, exiting", ErrorLog.LOG_TYPE.FATAL);
                return;
            }

            bool loopBackAddressFound = false;


            foreach (IPAddress addr in ipAddresses)
            {
                try
                {
                    // eliminate duplicates
                    if (!m_LocalHostPortsTable.Contains(addr.ToString()))
                    {
                        if (addr.ToString().Contains("127.0"))
                        {
                            loopBackAddressFound = true;
                        }

                        m_LocalHostPortsTable.Add(addr.ToString(), addr.ToString());

                        m_Log.Log("IP Server listening on host addr: " + addr.ToString(), ErrorLog.LOG_TYPE.INFORMATIONAL);

                        ConnectionServer con = new ConnectionServer(addr, 13000, HandleReceivedMessage, m_AppData);
                        m_Server.Add(con);
                    }
                }
                catch (Exception ex) { m_Log.Trace(ex, ErrorLog.LOG_TYPE.FATAL); }
            }

            // ensure we are listening to the loop back 127.0.0.1
            if (!loopBackAddressFound)
            {
                try
                {
                    ConnectionServer con = new ConnectionServer(IPAddress.Loopback, 13000, HandleReceivedMessage, m_AppData);
                    m_Server.Add(con);
                }
                catch (Exception ex) { m_Log.Trace(ex, ErrorLog.LOG_TYPE.FATAL); }
            }
        }
Exemplo n.º 6
0
        void AddPlateTabToEditPage(PLATE_INFO pi)
        {
            TabPage page = new TabPage();

            LPRInteractiveEditUC.LPRInteractiveEditUC LPREditor;
            LPREditor          = new LPRInteractiveEditUC.LPRInteractiveEditUC(m_AppData);
            LPREditor.Location = new Point(10, 10);
            page.Controls.Add(LPREditor);
            page.Text = pi.plateNumber;

            tabControlLPRResults.TabPages.Add(page);

            m_TabPageLPREditorTable.Add(page, LPREditor);

            LPREditor.PostPicture(pi.plateImage, pi.plateNumber);
            char[] plateCharsArray = pi.plateNumber.ToCharArray();
            for (int c = 0; c < pi.numChars; c++)
            {
                LPREditor.PostCharImage(pi.charImages[c], c, plateCharsArray[c].ToString());
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// generates exception if index is already in the table
 /// </summary>
 /// <param name="index"></param>
 public void MarkValueAsUsed(int handle)
 {
     handleHashTable.Add(handle, handle);
 }
Exemplo n.º 8
0
 void OnReceiveChannels(string[] list)
 {
     lock (m_ReceiveDataSingleton)
     {
         m_ChannelIndexTable = new ThreadSafeHashTable(4);
         m_ChanneList = list;
         int i  = 0;
         foreach (string chan in list)
         {
             m_ChannelIndexTable.Add(chan,i);
             i++;
         }
     }
 }