예제 #1
0
파일: search.cs 프로젝트: anndream/anpr-1
        public SmartSearchLibUC(APPLICATION_DATA appData, ABORT_CLOSE giveup)
        {
            InitializeComponent();

            m_AppData = appData;
            m_AppData.AddOnClosing(OnClose,APPLICATION_DATA.CLOSE_ORDER.FIRST);
            m_Log = (ErrorLog)m_AppData.Logger;
            GiveUp = giveup;

            m_PathManager= (PATHS) m_AppData.PathManager ;

            textBoxMinMatch.Text = "0";

            m_SearchTool = new SearchLib(m_AppData);

            this.Text = "Smart Search";

            m_ZoomTrackLock = new object();
            trackBarZoomControl.Minimum = 0;
            trackBarZoomControl.Maximum = 1000;

            buttonUndoDelete.Enabled = false;
            dataGridView1.KeyDown += new KeyEventHandler(dataGridView1_KeyDown);

            dataGridView1.CellClick +=new DataGridViewCellEventHandler(dataGridView1_CellContentClick); // mouse click on cell
            dataGridView1.SelectionChanged += new EventHandler(dataGridView1_SelectionChanged);  // support cell selection changes by keyboard (i.e. not by mouse click)

            dataGridView1.Columns["time"].DefaultCellStyle.Format = m_AppData.TimeFormatStringForDisplay;// "dd MMM yyyy,  HH: mm: ss: ffff";

            m_SearchStatusDisplay = new SearchStatusDisplayUC(m_AppData, UserCanceledSearch);
            m_SearchStatusDisplay.Location = new Point(594, 55);
            this.Controls.Add(m_SearchStatusDisplay);
        }
예제 #2
0
        public SmartSearchLibUC(APPLICATION_DATA appData, ABORT_CLOSE giveup)
        {
            InitializeComponent();

            m_AppData = appData;
            m_AppData.AddOnClosing(OnClose, APPLICATION_DATA.CLOSE_ORDER.FIRST);
            m_Log  = (ErrorLog)m_AppData.Logger;
            GiveUp = giveup;

            m_PathManager = (PATHS)m_AppData.PathManager;


            textBoxMinMatch.Text = "0";

            m_SearchTool = new SearchLib(m_AppData);

            this.Text = "Smart Search";

            m_ZoomTrackLock             = new object();
            trackBarZoomControl.Minimum = 0;
            trackBarZoomControl.Maximum = 1000;

            buttonUndoDelete.Enabled = false;
            dataGridView1.KeyDown   += new KeyEventHandler(dataGridView1_KeyDown);

            dataGridView1.CellClick        += new DataGridViewCellEventHandler(dataGridView1_CellContentClick); // mouse click on cell
            dataGridView1.SelectionChanged += new EventHandler(dataGridView1_SelectionChanged);                 // support cell selection changes by keyboard (i.e. not by mouse click)


            dataGridView1.Columns["time"].DefaultCellStyle.Format = m_AppData.TimeFormatStringForDisplay;// "dd MMM yyyy,  HH: mm: ss: ffff";


            m_SearchStatusDisplay          = new SearchStatusDisplayUC(m_AppData, UserCanceledSearch);
            m_SearchStatusDisplay.Location = new Point(594, 55);
            this.Controls.Add(m_SearchStatusDisplay);
        }
예제 #3
0
파일: search.cs 프로젝트: anndream/anpr-1
        void SearchProgressCB(SearchLib.SEARCH_STATUS status)
        {
            try
            {
                // just send this to the display
                m_SearchStatusDisplay.SetStatus(status);

                switch (status.errorCode)
                {

                    case SearchLib.SEARCH_ERROR_CODES.TOO_MANY_ENTRIES:
                        m_SearchTool.StopSearch();

                        break;
                }
            }
            catch (Exception ex)
            {
                m_Log.Trace(ex, ErrorLog.LOG_TYPE.INFORMATIONAL);
            }
        }