예제 #1
0
        public GamesWindow()
        {
            InitializeComponent();
            Apps = new AppEntryModel();

            //If null or 1, the app was launched normally
            if (Environment.GetCommandLineArgs() != null)
            {
                //When length is 1, the only argument is the path where the app is installed
                if (Environment.GetCommandLineArgs().Length > 1)
                {
                    LauncherAsync();
                }
            }
        }
예제 #2
0
        public GamesWindow()
        {
            InitializeComponent();
            Debug.WriteLine("Init GamesWindow");
            Apps = new AppEntryModel();
            var args = Environment.GetCommandLineArgs();

            // If null or 1, the app was launched normally
            if (args?.Length > 1)
            {
                // When length is 1, the only argument is the path where the app is installed
                _ = LauncherAsync(args);  // Launches the requested game
            }
            else
            {
                //auto refresh on load
                LoadButton_Click(null, null);
            }
        }