Beispiel #1
0
        private void EnumerateCams()
        {
            int currentTick = System.Environment.TickCount;

            if ((currentTick - m_lastEnumTick > 5000) || (m_lastEnumTick == 0))
            {
                m_lastEnumTick = currentTick;
                confWebcam.Items.Clear();
                confWebcam.Items.AddRange(WebcamManager.Enumerate());
                confWebcam.Items.Add(Language.FormatString(Language.LanguageString.MainForm_Configuration_RefreshWebcamList));
                confWebcam.SelectedIndex = 0;
            }
        }
Beispiel #2
0
        internal static void ShowInstance()
        {
            Webcam cam = WebcamManager.FindByName(Settings.CamName);

            if (cam != null)
            {
                if (s_instance == null)
                {
                    s_instance = new NotifyForm();
                }

                if (Settings.ScheduleMaxResultionAndQuality)
                {
                    cam.Config(new WebcamConfiguration(Settings.CamConfigSizeMax, Settings.CamConfigBPPMax, Settings.CamConfigMediaSubTypeMax));
                }
                else
                {
                    cam.Config(new WebcamConfiguration(Settings.CamConfigSize, Settings.CamConfigBPP, Settings.CamConfigMediaSubType));
                }
                s_instance.m_cam = cam;
                s_instance.AnimateIn();
            }
        }