static void Main(string[] args) { StartWatch = new Stopwatch(); StartWatch.Start(); IScreenshooter shooter = null; IHotkeyInterface hotkeyInterface = null; if (args.Contains("--sway")) { shooter = new SwayScreenshooter(); } else { shooter = new WinFormsScreenshooter(); } if (args.Contains("--udp")) { hotkeyInterface = new UdpHotkeyInterface(); } else { hotkeyInterface = new HotkeyForm(); } using (var game = new ScreenshotGame(shooter, hotkeyInterface)) game.Run(); }
public ScreenshotGame(IScreenshooter screenshooter, IHotkeyInterface hotkeyInterface) { IsMouseVisible = true; Window.IsBorderless = true; ScreenshotTaker = screenshooter; InactiveSleepTime = System.TimeSpan.Zero; graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; HotkeyManager = hotkeyInterface; }