Esempio n. 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            CommandLineOptions options = new CommandLineOptions();

            if (CommandLine.Parser.Default.ParseArguments(e.Args, options))
            {
                DisableTouchKit = options.DisableTouchKit;

                if (options.Profiles != null && options.Profiles.Count > 0)
                {
                    StartupProfile = options.Profiles.Last();
                }
            }

            string documentPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), options.DocumentPath);
            HeliosInit.Initialize(documentPath, "ControlCenter.log", options.LogLevel);
        }
Esempio n. 2
0
        public bool SignalExternalCommandLineArgs(IList<string> args)
        {

            CommandLineOptions options = new CommandLineOptions();

            CommandLine.Parser.Default.ParseArguments(args.ToArray(), options);

            if (options.Exit)
            {
                ApplicationCommands.Close.Execute(null, Application.Current.MainWindow);
            }
            else if (options.Profiles != null && options.Profiles.Count > 0 && File.Exists(options.Profiles.Last()))
            {
                ControlCenterCommands.RunProfile.Execute(options.Profiles.Last(), Application.Current.MainWindow);
            }

            return true;
        }