Example #1
0
 /// <summary>
 /// On-click handler
 /// </summary>
 public virtual void OnClick()
 {
     if (_applicationInfo != null)
     {
         ApplicationApi.LaunchSession(_applicationInfo.GetUri());
     }
 }
Example #2
0
        public override void OnClick()
        {
            string internalName = InternalName;

            if (internalName == "Bluetooth")
            {
                var task = new ConnectionSettingsTask();
                task.ConnectionSettingsType = ConnectionSettingsType.Bluetooth;
                task.Show();
            }
            else if (internalName == "Wifi")
            {
                var task = new ConnectionSettingsTask();
                task.ConnectionSettingsType = ConnectionSettingsType.WiFi;
                task.Show();
            }
            else if (internalName == "Phone")
            {
                //ApplicationApi.LaunchSession("app://5B04B775-356B-4AA0-AAF8-6491FFEA5602/Start");
                ApplicationApi.LaunchSession("app://5B04B775-356B-4AA0-AAF8-6491FFEA561C/CallSettings");
            }
            else if (internalName == "Search")
            {
                ApplicationApi.LaunchSession("app://5B04B775-356B-4AA0-AAF8-6491FFEA5661/SearchHome?QuerySource=HardwareBtn");
            }
            else if (internalName == "BatterySaving")
            {
                ApplicationApi.LaunchSession("app://AFE91DD5-26FB-4ba6-A5A4-4BCEDE8FB3E6/_default");
            }
            else if (internalName == "DataConnection")
            {
                ApplicationApi.LaunchSession("app://5B04B775-356B-4AA0-AAF8-6491FFEA561F/_default");
            }
            else if (internalName == "Accelerometer")
            {
                ApplicationApi.LaunchSession("app://126b3759-8034-4fff-b987-3c0c6f9136f3/_default");
            }
            else if (internalName == "InternetSharing")
            {
                ApplicationApi.LaunchSession("app://5B04B775-356B-4AA0-AAF8-6491FFEA5629/_default");
            }
        }