Last active
November 5, 2017 09:16
-
-
Save pnp0a03/649be3291de79caf71a26834012157bd to your computer and use it in GitHub Desktop.
FCU commandline option - OnActivated Override
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnActivated(IActivatedEventArgs args) | |
{ | |
Frame rootFrame = Window.Current.Content as Frame; | |
if(ActivationKind.CommandLineLaunch == args.Kind) | |
{ | |
var commandArgs = args as CommandLineActivatedEventArgs; | |
var operation = commandArgs.Operation; | |
string arguments = operation.Arguments; | |
string activationPath = operation.CurrentDirectoryPath; | |
//operation.ExitCode = arguments.Length; | |
if (null == rootFrame) | |
{ | |
rootFrame = new Frame(); | |
rootFrame.NavigationFailed += OnNavigationFailed; | |
if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) | |
{ | |
} | |
Window.Current.Content = rootFrame; | |
} | |
rootFrame.Navigate(typeof(MainPage), arguments); | |
Window.Current.Activate(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment