예제 #1
0
        private void _tableResults_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (_tableResults.Rows.Count > 0 && _tableResults.SelectedCells.Count == 1)
                {
                    OcrFormField field = _tableResults.SelectedCells[0].Tag as OcrFormField;

                    if (field is TextFormField || field is OmrFormField)
                    {
                        DetailedCharacterResults detailedResultsdialog = new DetailedCharacterResults(field);
                        detailedResultsdialog.ShowDialog(this);
                    }
                }
            }
            catch (Exception exp)
            {
                Messager.ShowError(this, exp);
            }
        }
예제 #2
0
        private void _fieldResults_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (_fieldResults.Rows.Count > 0 && _fieldResults.SelectedRows.Count == 1)
                {
                    int formIndex  = _cmbSelectedForm.SelectedIndex;
                    int pageIndex  = _cmbSelectedPage.SelectedIndex;
                    int fieldIndex = _fieldResults.SelectedRows[0].Index;

                    if (_filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex] is TextFormField ||
                        _filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex] is OmrFormField ||
                        _filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex] is UnStructuredTextFormField
#if LEADTOOLS_V20_OR_LATER
                        || _filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex] is OmrAnswerAreaField)
#else
                        )
#endif //#if LEADTOOLS_V20_OR_LATER
                    {
                        DetailedCharacterResults detailedResultsdialog = new DetailedCharacterResults(_filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex]);
                        detailedResultsdialog.ShowDialog(this);
                    }
                    else if (_filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex] is TableFormField)
                    {
                        TableFormField tableField = _filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex] as TableFormField;
                        if (tableField.Result.Status == FormFieldStatus.Success)
                        {
                            DetailedTableResults detailedResultsdialog = new DetailedTableResults(_filledForms[formIndex].ProcessingPages[pageIndex][fieldIndex] as TableFormField);
                            detailedResultsdialog.ShowDialog(this);
                        }
                        else
                        {
                            MessageBox.Show(DemosGlobalization.GetResxString(GetType(), "Resx_FailedRecognize"));
                        }
                    }
                }
            }