コード例 #1
0
ファイル: MainForm.cs プロジェクト: sakpung/webstudy
        private void Startup()
        {
            DemoOptions options = DemoOptions.LoadDefault();

            // Show the engine selection dialog
            using (OcrEngineSelectDialog dlg = new OcrEngineSelectDialog(Messager.Caption, options.OcrEngineType.ToString(), false))
            {
                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    _docWriter = new DocumentWriter();
                    _gatherInformationControl.Init(dlg.SelectedOcrEngineType, _docWriter, options, 1);

                    // Add the selected engine name to the demo caption
                    Text = Text + " [" + dlg.SelectedOcrEngineType.ToString() + " Engine]";
                }
                else
                {
                    // Close the demo
                    Close();
                }
            }
        }