示例#1
0
        public Main()
        {
            this.InitializeComponent();
            this.buttonSendImage.Enabled = false;
            this.Text = $"Alturos Yolo TestUI {Application.ProductVersion}";

            var files = Directory.GetFiles(@".\Images");

            this.dataGridViewFiles.DataSource = files.Select(o => new { Name = o }).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._yoloWrapper = new YoloWrapper();
            this.Initialize(config);
        }