Example #1
0
 public void PromptForScan()
 {
     if (this.NeedsFullScan)
     {
         DialogResult res = OMLApplication.Current.MediaCenterEnvironment.Dialog("New discs have been detected in the disc changer. Do you want to update your disc library now? It may take several minutes to load and scan each new disc.", "NEW DISCS FOUND", DialogButtons.Yes | DialogButtons.No, -1, true);
         if (res == DialogResult.Yes)
         {
             MediaChangeManagerHelper.RescanAllDiscs();
         }
     }
 }
Example #2
0
        private void beginRescan(object obj)
        {
            //slow this thread down
            //ThreadPriority priority = Thread.CurrentThread.Priority;
            //Thread.CurrentThread.Priority = ThreadPriority.Lowest;

            try
            {
                MediaChangeManagerHelper.RescanAllDiscs();
                //Microsoft.MediaCenter.UI.Application.DeferredInvoke(notifyRescanComplete, null);
            }
            finally
            {
                //
                // Reset our thread's priority back to its previous value
                //
                //Thread.CurrentThread.Priority = priority;
            }
        }