Пример #1
0
        public FormPipeline(PipelineDemoSession oeip)
        {
            InitializeComponent();
            _oeip = oeip;

            _oeip.StageHasOutput += Output;
        }
Пример #2
0
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);

            stepTimer.Stop();

            _oeip.Dispose();
            _oeip = null;
        }
Пример #3
0
        private void OpenVideoInPipelineView(object sender, EventArgs e)
        {
            var dlg = new OpenFileDialog();

            dlg.Filter = "Videos (*.mp4;*.mkv;*.webm)|*.mp4;*.mkv;*.webm|All files (*.*)|*.*";
            var res = dlg.ShowDialog();

            if (res == DialogResult.OK)
            {
                try
                {
                    var oeip = PipelineDemoSession.Create(dlg.FileName, chkOtsu.Checked);

                    if (oeip != null)
                    {
                        new FormPipeline(oeip).Show();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }