2021-02-21 21:52:41 -06:00
|
|
|
// Decompiled with JetBrains decompiler
|
|
|
|
|
// Type: ZuneUI.WebUrlCommandHandler
|
|
|
|
|
// Assembly: ZuneShell, Version=4.7.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
|
|
|
|
// MVID: FC8028F3-A47B-4FB4-B35B-11D1752D8264
|
|
|
|
|
// Assembly location: C:\Program Files\Zune\ZuneShell.dll
|
|
|
|
|
|
|
|
|
|
using Microsoft.Zune.Service;
|
|
|
|
|
using Microsoft.Zune.Shell;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
|
|
|
|
|
namespace ZuneUI
|
|
|
|
|
{
|
|
|
|
|
public class WebUrlCommandHandler : ICommandHandler
|
|
|
|
|
{
|
|
|
|
|
public void Execute(string command, IDictionary commandArgs)
|
|
|
|
|
{
|
|
|
|
|
EPassportPolicyId ePassportPolicy = EPassportPolicyId.None;
|
2021-02-21 22:59:09 -06:00
|
|
|
if (commandArgs != null && commandArgs.Contains("PassportPolicyId"))
|
|
|
|
|
ePassportPolicy = (EPassportPolicyId)commandArgs["PassportPolicyId"];
|
2021-02-21 21:52:41 -06:00
|
|
|
else if (SignIn.Instance.SignedIn)
|
|
|
|
|
{
|
|
|
|
|
Uri uri = new Uri(command, UriKind.Absolute);
|
|
|
|
|
if (uri.Host.EndsWith("zune.net", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
if (uri.Scheme == "http")
|
|
|
|
|
ePassportPolicy = EPassportPolicyId.MBI;
|
|
|
|
|
else if (uri.Scheme == "https")
|
|
|
|
|
ePassportPolicy = EPassportPolicyId.MBI_SSL;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-06-06 15:08:07 -05:00
|
|
|
ZuneApplication.Service2.LaunchBrowserForExternalUrl(command, ePassportPolicy);
|
2021-02-21 21:52:41 -06:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|