private static void Main(string[] args) { Shellscape.Program.MainInstanceStarted += delegate() { Shellscape.Remoting.RemotingTaskMethods.Methods.Add("mailto", delegate(String[] arguments) { Forms.Main.Remote_Mailto(arguments); }); AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs e) { ErrorHelper.Report(e.ExceptionObject as Exception); }; Config.Init(); Shellscape.UpdateManager updates = new Shellscape.UpdateManager(_repoUser, _repoName, _repoName); updates.Error += delegate(object sender, UnhandledExceptionEventArgs e) { if(e.ExceptionObject is System.Net.WebException) { if(e.ExceptionObject != null) { ErrorHelper.Log(e.ExceptionObject as Exception, Guid.NewGuid()); } return; } ErrorHelper.Report(e.ExceptionObject as Exception); }; SystemEvents.SessionEnded += delegate(object sender, SessionEndedEventArgs e) { Shellscape.UpdateManager.Current.Stop(); Application.Exit(); }; }; Shellscape.Program.Run<GmailNotifierPlus.Forms.Main>(args); }
private static void Main(string[] args) { //Shellscape.Program.RemotingServiceType = typeof(RemotingService); Program.Icon = Utilities.ResourceHelper.GetIcon("gmail-classic.ico"); Shellscape.Program.MainInstanceStarted += delegate() { Shellscape.Remoting.RemotingTaskMethods.Methods.Add("mailto", delegate(String[] arguments) { Forms.Main.Remote_Mailto(arguments); }); AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs e) { ErrorHelper.Report(e.ExceptionObject as Exception); }; Config.Init(); Shellscape.UpdateManager updates = new Shellscape.UpdateManager(_repoUser, _repoName, _repoName); updates.Error += delegate(object sender, UnhandledExceptionEventArgs e) { ErrorHelper.Report(e.ExceptionObject as Exception); }; SystemEvents.SessionEnded += delegate(object sender, SessionEndedEventArgs e) { Shellscape.UpdateManager.Current.Stop(); Application.Exit(); }; }; Shellscape.Program.Run<GmailNotifierPlus.Forms.Main>(args); }
private static void Main(string[] args) { Shellscape.Program.MainInstanceStarted += delegate() { Shellscape.Remoting.RemotingTaskMethods.Methods.Add("mailto", delegate(String[] arguments) { Forms.Main.Remote_Mailto(arguments); }); AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs e) { ErrorHelper.Report(e.ExceptionObject as Exception); }; Config.Init(); Shellscape.UpdateManager updates = new Shellscape.UpdateManager(_repoUser, _repoName, _repoName, _repoName); updates.Error += delegate(object sender, UnhandledExceptionEventArgs e) { if (e.ExceptionObject is System.Net.WebException) { if (e.ExceptionObject != null) { ErrorHelper.Log(e.ExceptionObject as Exception, Guid.NewGuid()); } return; } ErrorHelper.Report(e.ExceptionObject as Exception); }; SystemEvents.SessionEnded += delegate(object sender, SessionEndedEventArgs e) { Shellscape.UpdateManager.Current.Stop(); Application.Exit(); }; }; Shellscape.Program.Run <GmailNotifierPlus.Forms.Main>(args); }
private void _Updates_UpdatesAvailable(Shellscape.UpdateManager sender) { sender.Stop(); sender.Download(Config.Current.AppDataPath, new AsyncCompletedEventHandler(_Updates_DownloadComplete)); }