Beispiel #1
0
        private void imageFolderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            DialogResult        result = dialog.ShowDialog();

            if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(dialog.SelectedPath))
            {
                var imageInfos = new DirectoryImageReader().Analyze(dialog.SelectedPath);
                if (imageInfos.Count() != 0)
                {
                    List <ImageInfo> lst = (List <ImageInfo>)dataGridViewFiles.DataSource;
                    if (lst == null)
                    {
                        lst = new List <ImageInfo>();
                    }
                    foreach (var o in imageInfos.ToList())
                    {
                        this.richTextBoxConsole.Text += o.Name + " loaded\n";
                        lst.Add(o);
                    }
                    this.dataGridViewFiles.DataSource = null;
                    this.dataGridViewFiles.DataSource = lst;
                }
            }
        }
Beispiel #2
0
        public Main()
        {
            this.InitializeComponent();
            this.buttonSendImage.Enabled = false;
            this.Text = $"Alturos Yolo TestUI {Application.ProductVersion}";
            this.dataGridViewFiles.AutoGenerateColumns = false;

            var imageInfos = new DirectoryImageReader().Analyze(@".\Images");

            this.dataGridViewFiles.DataSource = imageInfos.ToList();

            var configurationDetector = new ConfigurationDetector();
            var config = configurationDetector.Detect();

            if (config == null)
            {
                MessageBox.Show($"Yolo configuration detection failure", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            this.toolStripStatusLabel1.Text = string.Empty;
            this.toolStripStatusLabel2.Text = string.Empty;

            Task.Run(() => this.Initialize(config));
        }
Beispiel #3
0
        public Main()
        {
            this.InitializeComponent();

            this.buttonSendImage.Enabled = false;
            //this.menuStrip1.Visible = false;

            this.toolStripStatusLabelYoloInfo.Text = string.Empty;

            this.Text = $"Alturos Yolo TestUI {Application.ProductVersion}";
            this.dataGridViewFiles.AutoGenerateColumns  = false;
            this.dataGridViewResult.AutoGenerateColumns = false;
            this.richTextBoxConsole.Text += "==========STARTUP==========\n";
            this.richTextBoxConsole.Text += "--Loading \\Images directory\n";
            if (Directory.Exists(@".\Images"))
            {
                var imageInfos = new DirectoryImageReader().Analyze(@".\Images");
                if (imageInfos.Count() != 0)
                {
                    ;
                    foreach (var o in imageInfos.ToList())
                    {
                        this.richTextBoxConsole.Text += o.Name + " loaded\n";
                    }
                    this.dataGridViewFiles.DataSource = imageInfos.ToList();
                }
            }


            Task.Run(() => this.Initialize("."));
            this.LoadAvailableConfigurations();
        }
Beispiel #4
0
        private void openFolderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dialogResult = this.folderBrowserDialog1.ShowDialog();

            if (dialogResult != DialogResult.OK)
            {
                return;
            }

            var imageInfos = new DirectoryImageReader().Analyze(this.folderBrowserDialog1.SelectedPath);

            this.dataGridViewFiles.DataSource = imageInfos.ToList();
        }
Beispiel #5
0
        public Main()
        {
            this.InitializeComponent();

            this.buttonSendImage.Enabled = false;
            this.menuStrip1.Visible      = false;

            this.toolStripStatusLabelYoloInfo.Text = string.Empty;

            this.Text = $"Alturos Yolo TestUI {Application.ProductVersion}";
            this.dataGridViewFiles.AutoGenerateColumns  = false;
            this.dataGridViewResult.AutoGenerateColumns = false;

            var imageInfos = new DirectoryImageReader().Analyze(@".\Images");

            this.dataGridViewFiles.DataSource = imageInfos.ToList();

            Task.Run(() => this.Initialize("."));
            this.LoadAvailableConfigurations();
        }