public static void Main(string[] args) { SingleInstanceWatcher(); var app = new GSApp(args.ToList()); app.Run(); }
/// <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); }
/// <summary> /// For subsequent instances of GraphSynth, simply get to the original and pass it /// the files that are to be opened - these are passed as the arguments. /// </summary> /// <param name = "e"><see cref = "T:Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs" />. Contains the command-line arguments of the subsequent application instance and indicates whether the first application instance should be brought to the foreground upon exiting the exception handler.</param> protected override void OnStartupNextInstance(StartupNextInstanceEventArgs e) { base.OnStartupNextInstance(e); GSApp.InputArgs = new List <string>(e.CommandLine); SearchIO.output(StringCollectionConverter.Convert(GSApp.InputArgs)); GSApp.ParseArguments(); if (GSApp.ArgAltConfig) { GSApp.settings = GlobalSettings.readInSettings(GSApp.AlternateConfig); } GSApp.OpenFiles(); GSApp.main.setUpGraphElementAddButtons(); GSApp.main.setUpGraphLayoutMenu(); GSApp.main.setUpSearchProcessMenu(); GSApp.main.Activate(); }