Esempio n. 1
0
 private static void OnWindowOpened(object sender, AutomationEventArgs automationEventArgs)
 {
     try
     {
         var element = sender as AutomationElement;
         if (element != null)
         {
             if (element.Current.Name.Trim() == "Editor for A Hat in Time (64-bit, DX9, Cooked Editor, PMT)")
             {
                 if (Benchmark != null)
                 {
                     Benchmark.Stop();
                 }
                 Meme.StopElevatorMusic();
             }
             else if (element.Current.Name.Trim() == "Editor for A Hat in Time (64-bit, DX9)")
             {
                 Meme.PlayElevatorMusic();
             }
         }
     }
     catch (ElementNotAvailableException)
     {
     }
 }