protected override void OnStart(string[] args) { _defaultBalloonTipText = "{0} is running...".FormatString(ChoGlobalApplicationSettings.Me.ApplicationName); try { ChoShellExtension.Register(); ChoTrace.WriteLine("Shell Extensions registered successfully."); } catch (Exception ex) { ChoTrace.WriteLine("Failed to register Shell Extensions. {0}".FormatString(ex.Message)); } try { ChoShellFileAssociation.Register(); ChoTrace.WriteLine("File Associations registered successfully."); } catch (Exception ex) { ChoTrace.WriteLine("Failed to register File Associations. {0}".FormatString(ex.Message)); } if (ChoApplication.ApplicationMode == ChoApplicationMode.Console) { ChoAppCmdLineArgs cmdLineArgs = new ChoAppCmdLineArgs(); cmdLineArgs.StartFileCopy(); } base.OnStart(args); }
protected override void OnStart(string[] args) { _defaultBalloonTipText = "{0} is running...".FormatString(ChoGlobalApplicationSettings.Me.ApplicationName); UnregisterShellExtensions(); if (ChoApplication.ApplicationMode == ChoApplicationMode.Console) { ChoAppCmdLineArgs cmdLineArgs = new ChoAppCmdLineArgs(); cmdLineArgs.StartFileCopy(); } base.OnStart(args); }