Example #1
0
        private void AutostartDelayer_Handler(object sender, EventArgs e)
        {
            camView.Image = ImageDrawer.GetEmptyImage();
            SetStatusBarStatus(StatusState.Ready, Resources.Ready);

            if (!IsWebCamAvaliable())
            {
                return;
            }

            ButtonStartStopEnable();
            VideoInitialization();
        }
        private void AfterInitializeComponent()
        {
            Text = string.Format("{0} v{1}", Application.ProductName, GetProgramVersion());

            IsWebCamAvaliable();

            if (Program.settings.AutostartRecording && Program.settings.DelayBeforeStart > 0)
            {
                autoStartDelayer = new AutoStartDelayer
                                   (
                    Program.settings.DelayBeforeStart * 1000,
                    AutostartDelayer_Handler
                                   );

                SetStatusBarStatus(StatusState.WaitingBeforeStart, Resources.WaitingBeforeStart);

                camView.Image = ImageDrawer.CreateImage(800, 600, Resources.OnStartDelay);

                ButtonStartStopDisable();
            }
            else
            {
                VideoInitialization();
            }

            if (Program.settings.StartMinimized)
            {
                this.WindowState = FormWindowState.Minimized;
            }

            InitDrawingFrames();

            if (Program.settings.StartWithFullWindowedVideo)
            {
                MakeFullWindowVideo();
            }

            CommonInitialization();
        }