Example #1
0
        private void toolStripButtonStartAlgorithm_Click(object sender, EventArgs e)
        {
            try
            {
                if (ClFasadaPreprocessing.IsPreProcessing())
                {
                    ClFasadaPreprocessing.ResetFasade();
                    return;
                }

                if (m_lAlgorithmsList.Count == 0)
                {
                    MessageBox.Show("Choose PreProcessing Algorithm(s)", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                if (m_Model3D == null)
                {
                    if (m_sTestDirectory.Length == 0)
                    {
                        MessageBox.Show("Choose Test Directory", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    FilesExtensionForm form = new FilesExtensionForm(Cl3DModel.sm_ListManagedFilesExtensions);
                    form.ShowDialog();
                    if (form.OutExtensionList.Count == 0)
                    {
                        MessageBox.Show("No files Extension has been chosen", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    Cursor.Current = Cursors.WaitCursor;
                    ClFasadaPreprocessing.RunAlgorithms(m_sTestDirectory, m_lAlgorithmsList, form.OutExtensionList, checkBoxLogging.Checked, checkBoxSubfolders.Checked); // w przyszlosci mozna wybrac formaty ktore chce sie przetwarzac
                }
                else
                {
                    Cursor.Current = Cursors.WaitCursor;
                    ClFasadaPreprocessing.RunAlgorithms(m_Model3D, m_lAlgorithmsList);
                }
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Arrow;
                MessageBox.Show(ex.Message + "\n\n Call Stack:\n\n" + ex.StackTrace, "Exception !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                ClInformationSender.SendInformation("EXCEPTION\n" + ex.Message + "\n\n Call Stack:\n\n" + ex.StackTrace, ClInformationSender.eInformationType.eDebugText);
            }
        }
        private void toolStripButtonStartAlgorithm_Click(object sender, EventArgs e)
        {
            try
            {
                if (ClFasadaPreprocessing.IsPreProcessing())
                {
                    ClFasadaPreprocessing.ResetFasade();
                    return;
                }

                if (m_lAlgorithmsList.Count == 0)
                {
                    MessageBox.Show("Choose PreProcessing Algorithm(s)", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                if (m_Model3D == null)
                {
                    if(m_sTestDirectory.Length == 0)
                    {
                        MessageBox.Show("Choose Test Directory", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    FilesExtensionForm form = new FilesExtensionForm(Cl3DModel.sm_ListManagedFilesExtensions);
                    form.ShowDialog();
                    if (form.OutExtensionList.Count == 0)
                    {
                        MessageBox.Show("No files Extension has been chosen", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    Cursor.Current = Cursors.WaitCursor;
                    ClFasadaPreprocessing.RunAlgorithms(m_sTestDirectory, m_lAlgorithmsList, form.OutExtensionList, checkBoxLogging.Checked, checkBoxSubfolders.Checked); // w przyszlosci mozna wybrac formaty ktore chce sie przetwarzac
                }
                else
                {
                    Cursor.Current = Cursors.WaitCursor;
                    ClFasadaPreprocessing.RunAlgorithms(m_Model3D, m_lAlgorithmsList);
                }
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Arrow;
                MessageBox.Show(ex.Message + "\n\n Call Stack:\n\n" + ex.StackTrace, "Exception !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                ClInformationSender.SendInformation("EXCEPTION\n" + ex.Message + "\n\n Call Stack:\n\n" + ex.StackTrace, ClInformationSender.eInformationType.eDebugText);
            }
        }