コード例 #1
0
        private void byEntryFormToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                EnterDataDlg enterDataDlg = new EnterDataDlg();
                enterDataDlg.Text = "Enter Source Form";
                DialogResult dr = enterDataDlg.ShowDialog();
                if (DialogResult.OK == dr)
                {
                    m_sSearchString = enterDataDlg.sData;
                    m_Dictionary.eGetLexemesByInitialForm(m_sSearchString);
                    ShowLexemes();
                }
            }
            catch (Exception ex)
            {
                string sMsg = "byEntryFormToolStripMenuItem_Click \n";
//                MainLib.ZalError err = new MainLib.ZalError();
                sMsg += "MainLib error: ";
//                sMsg += err.LastError;
                sMsg += "\n";
                sMsg += ".Net client error: ";
                sMsg += ex.Message;
                MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }
        }   //  byEntryFormToolStripMenuItem_Click
コード例 #2
0
        }   //  preprocessToolStripMenuItem_Click (...)

        private void parseWordFormToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EM_ReturnCode eRet = EM_ReturnCode.H_NO_ERROR;

            try
            {
                EnterDataDlg dlg = new EnterDataDlg();
                dlg.Text = "Enter Word Form";
                DialogResult dr = dlg.ShowDialog();
                if (DialogResult.OK == dr)
                {
                    if (null == m_Parser)
                    {
                        eRet = m_Dictionary.eGetParser(ref m_Parser);
                        if (eRet != EM_ReturnCode.H_NO_ERROR)
                        {
                            MessageBox.Show("Unable to retrieve IParser interface.", "Zal Error", MessageBoxButtons.OK);
                            return;
                        }
                    }
                    eRet = m_Parser.eAnalyze(dlg.sData);
                }
                else
                {
                    return;
                }
            }
            catch (Exception ex)
            {
                string sMsg = "Error: ";
//                MainLib.ZalError err = new MainLib.ZalError();
//                sMsg += err.LastError;
                MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }

            if (EM_ReturnCode.H_NO_ERROR == eRet)
            {
                ShowParseOutput();
            }
            else
            {
                MessageBox.Show("Form not found.", "Zal", MessageBoxButtons.OK);
            }
        }   //  parseWordFormToolStripMenuItem_Click (...)
コード例 #3
0
        }   //  byGraphicStemToolStripMenuItem_Click (...)

        private void preprocessToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                EnterDataDlg dlg = new EnterDataDlg();
                dlg.Text = "Enter Data";
                DialogResult dr = dlg.ShowDialog();
                if (DialogResult.OK == dr)
                {
//                    Preprocess (dlg.sData);
                }
            }
            catch (Exception ex)
            {
                string sMsg = "Error in buttonLookup_Click: ";
                sMsg += ex.Message;
                MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }
        }   //  preprocessToolStripMenuItem_Click (...)
コード例 #4
0
        }   //  byEntryFormToolStripMenuItem_Click

        private void byGraphicStemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                EnterDataDlg dlg = new EnterDataDlg();
                dlg.Text = "Enter Graphic Stem";
                DialogResult dr = dlg.ShowDialog();
                if (DialogResult.OK == dr)
                {
                    m_Dictionary.eGetLexemesByGraphicStem(dlg.sData);
                }
            }
            catch (Exception ex)
            {
                string sMsg = "Error: ";
//                MainLib.ZalError err = new MainLib.ZalError();
//                sMsg += err.LastError;
                sMsg = ex.Message;
                MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }
        }   //  byGraphicStemToolStripMenuItem_Click (...)
コード例 #5
0
ファイル: ZalTestForm.cs プロジェクト: kbogatyrev/Zal-Windows
 private void preprocessToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         EnterDataDlg dlg = new EnterDataDlg();
         dlg.Text = "Enter Data";
         DialogResult dr = dlg.ShowDialog();
         if (DialogResult.OK == dr)
         {
     //                    Preprocess (dlg.sData);
         }
     }
     catch (Exception ex)
     {
         string sMsg = "Error in buttonLookup_Click: ";
         sMsg += ex.Message;
         MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
         return;
     }
 }
コード例 #6
0
ファイル: ZalTestForm.cs プロジェクト: kbogatyrev/Zal-Windows
        private void parseWordFormToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EM_ReturnCode eRet = EM_ReturnCode.H_NO_ERROR;
            try
            {
                EnterDataDlg dlg = new EnterDataDlg();
                dlg.Text = "Enter Word Form";
                DialogResult dr = dlg.ShowDialog();
                if (DialogResult.OK == dr)
                {
                    if (null == m_Parser)
                    {
                        eRet = m_Dictionary.eGetParser(ref m_Parser);
                        if (eRet != EM_ReturnCode.H_NO_ERROR)
                        {
                            MessageBox.Show("Unable to retrieve IParser interface.", "Zal Error", MessageBoxButtons.OK);
                            return;
                        }
                    }
                    eRet = m_Parser.eAnalyze (dlg.sData);
                }
                else
                {
                    return;
                }
            }
            catch (Exception ex)
            {
                string sMsg = "Error: ";
            //                MainLib.ZalError err = new MainLib.ZalError();
            //                sMsg += err.LastError;
                MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }

            if (EM_ReturnCode.H_NO_ERROR == eRet)
            {
                ShowParseOutput();
            }
            else
            {
                MessageBox.Show("Form not found.", "Zal", MessageBoxButtons.OK);
            }
        }
コード例 #7
0
ファイル: ZalTestForm.cs プロジェクト: kbogatyrev/Zal-Windows
 private void byGraphicStemToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         EnterDataDlg dlg = new EnterDataDlg();
         dlg.Text = "Enter Graphic Stem";
         DialogResult dr = dlg.ShowDialog();
         if (DialogResult.OK == dr)
         {
             m_Dictionary.eGetLexemesByGraphicStem (dlg.sData);
         }
     }
     catch (Exception ex)
     {
         string sMsg = "Error: ";
     //                MainLib.ZalError err = new MainLib.ZalError();
     //                sMsg += err.LastError;
         sMsg = ex.Message;
         MessageBox.Show (sMsg, "Zal Error", MessageBoxButtons.OK);
         return;
     }
 }
コード例 #8
0
ファイル: ZalTestForm.cs プロジェクト: kbogatyrev/Zal-Windows
 private void byEntryFormToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         EnterDataDlg enterDataDlg = new EnterDataDlg();
         enterDataDlg.Text = "Enter Source Form";
         DialogResult dr = enterDataDlg.ShowDialog();
         if (DialogResult.OK == dr)
         {
             m_sSearchString = enterDataDlg.sData;
             m_Dictionary.eGetLexemesByInitialForm (m_sSearchString);
             ShowLexemes();
         }
     }
     catch (Exception ex)
     {
         string sMsg = "byEntryFormToolStripMenuItem_Click \n";
     //                MainLib.ZalError err = new MainLib.ZalError();
         sMsg += "MainLib error: ";
     //                sMsg += err.LastError;
         sMsg += "\n";
         sMsg += ".Net client error: ";
         sMsg += ex.Message;
         MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
         return;
     }
 }