public App() { InitializeComponent(); //User-Agent의 헤더 텍스트 입력 UserAgentHelper.SetDefaultUserAgent( "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Mobile Safari/537.36 Edge/15.14900"); }
/// <summary> /// 初始化单一实例应用程序对象。这是执行的创作代码的第一行, /// 已执行,逻辑上等同于 main() 或 WinMain()。 /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; if ("Windows.Mobile" == Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily) { Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; } //调用类构造函数 UserAgentHelper.SetDefaultUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.143930"); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { ConfigureFilters(global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory); this.InitializeComponent(); this.Suspending += OnSuspending; #if NETFX_CORE //User-Agent의 헤더 텍스트 입력 UserAgentHelper.SetDefaultUserAgent( "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Mobile Safari/537.36 Edge/15.14900"); #endif }