/// <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); }