Ejemplo n.º 1
0
        private static async Task <bool> ActivateForProtocolAsync(Uri activationProtocolUri)
        {
            await Task.Delay(1);

            if (activationProtocolUri != null)
            {
                if (activationProtocolUri.Host.Equals("contribution"))
                {
                    var contribution = new ContributionViewModel();
                    contribution.Populate(activationProtocolUri);

                    return(NavigationService.Current.Navigate(typeof(ContributionsPage), contribution));
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
        private static async Task <bool> ActivateForProtocolAsync(Uri activationProtocolUri)
        {
            await Task.Delay(1);

            if (activationProtocolUri != null)
            {
                var assistanceLaunchQuery = string.Empty;

                if (activationProtocolUri.Scheme.Equals("windows.personalassistantlaunch"))
                {
                    assistanceLaunchQuery = activationProtocolUri.ExtractQueryValue("LaunchContext");
                }

                if (activationProtocolUri.Host.Equals("contribution") || assistanceLaunchQuery.Equals("contribution"))
                {
                    var contribution = new ContributionViewModel();
                    contribution.Populate(activationProtocolUri);

                    return(NavigationService.Current.Navigate(typeof(ContributionsPage), contribution));
                }
            }

            return(false);
        }