Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            String rootPath    = comboBox1.Text;
            String projectName = textBox2.Text;

            if (rootPath.Equals("") || projectName.Equals(""))
            {
                System.Windows.Forms.MessageBox.Show("Please fill all fields");
            }
            else
            {
                String projectPath = Path.Combine(rootPath, projectName);

                if (Directory.Exists(projectPath))
                {
                    System.Windows.Forms.MessageBox.Show("This project already exists!");
                }
                else
                {
                    LocalConfig.addRecentProject(projectPath);
                    Directory.CreateDirectory(projectPath);

                    getObjectDetectionAndSlim(projectPath);

                    ObjectDetectionMenuForm odmf1 = new ObjectDetectionMenuForm(projectPath);
                    odmf1.Show();
                    caller.Hide();
                    this.Close();
                }
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            String projectPath = comboBox1.Text;

            if (projectPath.Equals(""))
            {
                System.Windows.Forms.MessageBox.Show("Please select a directory");
            }
            else
            {
                if (Path.GetFileName(Directory.GetDirectories(projectPath)[1]).Equals("research"))
                {
                    LocalConfig.addRecentProject(projectPath);
                    ObjectDetectionMenuForm odmf1 = new ObjectDetectionMenuForm(projectPath);
                    odmf1.Show();
                    caller.Hide();
                    this.Close();
                }
                else
                {
                    System.Windows.Forms.MessageBox.Show("Invalid Project Directory!");
                }
            }
        }
 public GenerateODImagePrepareForm(ObjectDetectionMenuForm caller)
 {
     InitializeComponent();
     this.caller = caller;
 }