/// <summary>
        /// Use this to return to media browser after launching another wmc application
        /// Example: Internal WMC dvd player or audio player
        /// </summary>
        public static void ReturnToApplication(bool force)
        {
            Microsoft.MediaCenter.Hosting.ApplicationContext context = Microsoft.MediaCenter.Hosting.AddInHost.Current.ApplicationContext;

            if (force || !context.IsForegroundApplication)
            {
                Logger.ReportVerbose("Ensuring MB is front-most app");
                context.ReturnToApplication();
            }
        }
예제 #2
0
        /// <summary>
        /// Use this to return to media browser after launching another wmc application
        /// Example: Internal WMC dvd player or audio player
        /// </summary>
        public static void ReturnToApplication(bool force)
        {
            Debug.Assert(Microsoft.MediaCenter.UI.Application.ApplicationThread == Thread.CurrentThread);
            Microsoft.MediaCenter.Hosting.ApplicationContext context = Application.ApplicationContext;

            if (force || !context.IsForegroundApplication)
            {
                Logger.ReportVerbose("Ensuring MB is front-most app");
                context.ReturnToApplication();
            }
        }