コード例 #1
0
ファイル: ZalTestForm.cs プロジェクト: kbogatyrev/Zal-Windows
        public void ThreadProc()
        {
            try
            {
                MainLibManaged.DelegateProgress DelegateProgress = new MainLibManaged.DelegateProgress(m_formParent.UpdateProgressBar);

                EM_ReturnCode eRet = EM_ReturnCode.H_NO_ERROR;

                if (etDbOperation.eExportTable == m_eOperationType)
                {
                    eRet = m_formParent.m_Dictionary.eExportTestData(m_sPath, DelegateProgress);
                }
                else if (etDbOperation.eImportTable == m_eOperationType)
                {
                    eRet = m_formParent.m_Dictionary.eImportTestData(m_sPath, DelegateProgress);
                }
                else
                {
                    MessageBox.Show ("Internal error: bad DB opcode",
                                     "Zal Error",
                                     MessageBoxButtons.OK);
                    return;
                }

                if (eRet < 0)
                {
                    string sMsg = "Database error.";
                    MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                }
            }
            catch (Exception ex)
            {
                string sMsg = "importTestDataToolStripMenuItem_Click: ";
                sMsg += ex.Message;
                sMsg += "\n";
                MessageBox.Show (sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }
        }
コード例 #2
0
        public void ThreadProc()
        {
            try
            {
                MainLibManaged.DelegateProgress DelegateProgress = new MainLibManaged.DelegateProgress(m_formParent.UpdateProgressBar);

                EM_ReturnCode eRet = EM_ReturnCode.H_NO_ERROR;

                if (etDbOperation.eExportTable == m_eOperationType)
                {
                    eRet = m_formParent.m_Dictionary.eExportTestData(m_sPath, DelegateProgress);
                }
                else if (etDbOperation.eImportTable == m_eOperationType)
                {
                    eRet = m_formParent.m_Dictionary.eImportTestData(m_sPath, DelegateProgress);
                }
                else
                {
                    MessageBox.Show("Internal error: bad DB opcode",
                                    "Zal Error",
                                    MessageBoxButtons.OK);
                    return;
                }

                if (eRet < 0)
                {
                    string sMsg = "Database error.";
                    MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                }
            }
            catch (Exception ex)
            {
                string sMsg = "importTestDataToolStripMenuItem_Click: ";
                sMsg += ex.Message;
                sMsg += "\n";
                MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }
        } //  ThreadProc()