コード例 #1
0
 protected override bool OnStartup(Microsoft.VisualBasic.ApplicationServices.StartupEventArgs e)
 {
     // First time app is launched
     app = new App();
     app.Run();
     return(false);
 }
コード例 #2
0
        /// <summary>
        ///   Raises the event, which happens only the first time
        ///   that the application is started.
        /// </summary>
        /// <param name = "e">The <see cref = "Microsoft.VisualBasic.ApplicationServices.StartupEventArgs" />
        ///   instance containing the event data.</param>
        /// <returns></returns>
        protected override bool OnStartup(Microsoft.VisualBasic.ApplicationServices.StartupEventArgs e)
        {
            var app = new GSApp();

            GSApp.InputArgs = new List <string>(e.CommandLine);
            app.Run();
            return(false);
        }
コード例 #3
0
        protected override bool OnStartup(Microsoft.VisualBasic.ApplicationServices.StartupEventArgs eventArgs)
        {
            app = new SingleInstanceApp();
            foreach (var arg in eventArgs.CommandLine)
            {
                app.Args.Add(arg);
            }

            app.Run();
            return(false);
        }