private static void Main(string[] args) { if (args.Length > 0 && args[0] == STARTUP_CMD) { try { var loader = new BingLoader(); loader.GetBackground(); } catch (Exception exception) { MessageBox.Show(exception.ToString(), exception.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); } Application.Exit(); } else { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var form = new BingWallpaperOptions(); Application.Run(form); } }
public BingWallpaperOptions() { InitializeComponent(); BingLoader = new BingLoader(); updateStartupButton(); }