예제 #1
0
 /// <summary>
 /// Handles Display "StateChange" event.
 /// Sends launch application request to bring application to the front.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="displayState">Display state.</param>
 private void OnDisplayStateChange(object sender, DisplayStateChangedEventArgs displayState)
 {
     if (displayState.State != DisplayState.Off && !_isAppInBackgroundOnUsersDemand)
     {
         Tizen.Applications.AppControl.SendLaunchRequest(
             new Tizen.Applications.AppControl
         {
             ApplicationId = Current.ApplicationInfo.ApplicationId
         }
             );
     }
 }
 private void OnDisplayOn(object sender, DisplayStateChangedEventArgs args)
 {
     if (args.State == DisplayState.Normal)
     {
         try
         {
             AppControl.SendLaunchRequest(appControl);
         }
         catch (Exception e)
         {
             Console.WriteLine("CONSOLE ERROR: " + e);
         }
     }
 }