private void CommonInitialization()
        {
            if (Program.settings.HideMouseCursor)
            {
                Cursor.Hide();
            }

            FormColorSetter.Do
            (
                this,
                Color.FromArgb(Program.settings.InterfaceForeColor),
                Color.FromArgb(Program.settings.InterfaceBackgroundColor)
            );
        }
Esempio n. 2
0
        private void buttonSettings_Click(object sender, EventArgs e)
        {
            using (settingsForm settingsForm = new settingsForm())
            {
                FormColorSetter.Do
                (
                    settingsForm,
                    Color.FromArgb(Program.settings.InterfaceForeColor),
                    Color.FromArgb(Program.settings.InterfaceBackgroundColor)
                );

                if (settingsForm.ShowDialog() == DialogResult.Cancel)
                {
                    return;
                }

                settingsForm.ProcessResult();

                AutorunHelper.SetEnabled(Program.settings.StartWithWindows);
                IsWebCamAvaliable();

                // reinit video source
                {
                    bool isRecording = videoManager.IsRecording();

                    if (isRecording)
                    {
                        StopRecording();
                    }

                    try
                    {
                        videoManager.Initialize();

                        if (isRecording)
                        {
                            StartRecording();
                        }
                    }
                    catch
                    {
                        Reporter.SeriousError(Resources.CurrentWebCamNotAvaliable);
                    }
                }

                InitializeGps();

                CommonInitialization();
            }
        }