/// <summary> Создает контролер для видеопроигрывателя. </summary> public VideoPlayerControler( ProjectSettings projectSettings, LogControler logControler) { _projectSettings = projectSettings; _logControler = logControler; }
/// <summary> Создаем контроллер детектора. </summary> /// <param name="logControler"> Контролер лога. </param> public Detector(LogControler logControler) { _logControler = logControler; _wrapper = new YoloWrapper(@"C:\Users\grimy\Desktop\yolo3\yolov3_training_test.cfg", @"C:\Users\grimy\Desktop\yolo3\yolov3_training_final_not.weights", @"C:\Users\grimy\Desktop\yolo3\obj.names"); }
/// <summary> Создать контрол лога. </summary> /// <param name="log"> Лог контролер, который надо привязать к логу. </param> public LogControl(LogControler log) { InitializeComponent(); Dock = DockStyle.Fill; _logControler = log; //Подписываем на событие. _logControler.AddMessageInLog += OnAddMessageInLog; }
/// <summary> Создает контрол панели настроек. </summary> /// <param name="logControler"> Контролер лога. </param> /// <param name="projectSettings"> Контролер настроек. </param> public SettingControl( LogControler logControler, ProjectSettings projectSettings) { InitializeComponent(); Dock = DockStyle.Fill; _logControler = logControler; _projectSettings = projectSettings; _chkDetector.Checked = _projectSettings.IsDetector; _chkIsUnderCatalog.Checked = _projectSettings.IsUnderCatalog; }
/// <summary> Запуск главной формы. </summary> /// <param name="projectSettings"> Контролер настроек. </param> /// <param name="logControler"> Контролер лога. </param> /// <param name="videoPlayerControler"> Контролер видеопроигрывателя. </param> public MainForm( LogControler logControler, VideoPlayerControler videoPlayerControler, ProjectSettings projectSettings) { InitializeComponent(); _logControler = logControler; _videoPlayerControler = videoPlayerControler; _projectSettings = projectSettings; _log = new LogControl(_logControler); _setting = new SettingControl(_logControler, _projectSettings); _videoPlayer = new VideoPlayerControl(_logControler, _videoPlayerControler, _projectSettings); _pnlLog.Controls.Add(_log); _pnlSetting.Controls.Add(_setting); _pnlVideoPlayer.Controls.Add(_videoPlayer); }
/// <summary> Создает контрол видеопроигрывателя. </summary> /// <param name="logControler"> Контролер лога. </param> /// <param name="videoPlayerControler"> Контролер видеопроигрывателя. </param> /// <param name="projectSettings"> Контролер настроек. </param> public VideoPlayerControl( LogControler logControler, VideoPlayerControler videoPlayerControler, ProjectSettings projectSettings) { InitializeComponent(); Dock = DockStyle.Fill; _logControler = logControler; _videoPlayerControler = videoPlayerControler; _projectSettings = projectSettings; _videoPlayerControler.ChangeImage += OnChangeImage; _videoPlayerControler.ChangeFrame += OnChangeFrame; _opnFileDialog.Filter = "Image|*.png; *.jpg|Video|*.mp4; *.avi;"; _detector = new Detector(logControler); }
/// <summary> Создать настройки проекта. </summary> public ProjectSettings(LogControler logControler) { _logControler = logControler; CheckIfXMLEsistsAsync(); }