Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                if (args[0].ToUpperInvariant().StartsWith(@"/C"))
                {
                    // TODO: config
                    return;
                }

                if (args[0].ToUpperInvariant().StartsWith(@"/P"))
                {
                    // TODO: preview
                    return;
                }
            }

            var settings = ConfigProvider.GetConfig();
            var engineSettings = new ScreenSaverSettings() {
                IsFullscreen = settings.IsFullscreen,
                IsMultiMonitorEnabled = settings.IsMultipleMonitorEnabled,
                MaxFps = settings.FpsLimit,
            };

            var screenSaver = new ScreenSaverEngine(engineSettings);
            screenSaver.Engine = new MatrixEngine(settings);
            screenSaver.BindEscapeToExit();
            screenSaver.Run();
        }
Exemplo n.º 2
0
 /// <summary>
 /// .ctor
 /// </summary>
 public ScreenSaverEngine(ScreenSaverSettings settings)
 {
     _viewPorts = new ViewPortCollection(settings.IsFullscreen, settings.IsMultiMonitorEnabled);
     _canvas    = new RenderTexture((uint)_viewPorts.WorkingArea.Width, (uint)_viewPorts.WorkingArea.Height, false);
     _canvas.Clear(Color.Black);
     _canvas.Display(); // Needed due to FBO causing inverted co-ords otherwise
     _chrono     = new Chrono();
     _fpsLimiter = new FpsLimiter(settings.MaxFps);
 }
Exemplo n.º 3
0
 /// <summary>
 /// .ctor
 /// </summary>
 public ScreenSaverEngine(ScreenSaverSettings settings)
 {
     _viewPorts = new ViewPortCollection(settings.IsFullscreen, settings.IsMultiMonitorEnabled);
     _canvas = new RenderTexture((uint) _viewPorts.WorkingArea.Width, (uint) _viewPorts.WorkingArea.Height, false);
     _canvas.Clear(Color.Black);
     _canvas.Display(); // Needed due to FBO causing inverted co-ords otherwise
     _chrono = new Chrono();
     _fpsLimiter = new FpsLimiter(settings.MaxFps);
 }