Enumerate() public static method

public static Enumerate ( ) : IEnumerable
return IEnumerable
Esempio n. 1
0
        public static void RefreshVideoSources()
        {
            AvailableVideoSources.Clear();

            switch (SelectedVideoSourceKind)
            {
            case VideoSourceKind.Window:
                AvailableVideoSources.Add(WindowVSLI.Desktop);
                AvailableVideoSources.Add(WindowVSLI.TaskBar);

                foreach (var win in WindowHandler.EnumerateVisible())
                {
                    AvailableVideoSources.Add(new WindowVSLI(win.Handle));
                }
                break;

            case VideoSourceKind.Screen:
                foreach (var Screen in ScreenVSLI.Enumerate())
                {
                    AvailableVideoSources.Add(Screen);
                }
                break;
            }

            if (Instance != null && SelectedVideoSourceKind != VideoSourceKind.NoVideo)
            {
                Instance.VideoSourceBox.SelectedIndex = 0;
            }
        }
Esempio n. 2
0
        public void RefreshVideoSources()
        {
            AvailableVideoSources.Clear();

            switch (SelectedVideoSourceKind)
            {
            case VideoSourceKind.Window:
                AvailableVideoSources.Add(WindowVSLI.Desktop);
                AvailableVideoSources.Add(WindowVSLI.TaskBar);

                foreach (var win in Window.EnumerateVisible())
                {
                    AvailableVideoSources.Add(new WindowVSLI(win));
                }

                SelectedVideoSource = WindowVSLI.Desktop;
                break;

            case VideoSourceKind.Screen:
                foreach (var screen in ScreenVSLI.Enumerate())
                {
                    AvailableVideoSources.Add(screen);
                }

                SelectedVideoSource = AvailableVideoSources[0];
                break;
            }
        }