예제 #1
0
 /// <summary>
 /// Starts to sychronize keyboard events, will be failed if <see cref="MainWindows"/> is null or empty.
 /// </summary>
 public static void Start()
 {
     if (Working)
     {
         return;
     }
     Collect();
     MainWindows = AllWindows.Where(w => w.Value).Select(w => w.Key);
     Working     = MainWindows.Any();
     if (!Working)
     {
         FailToStart?.BeginInvoke(null, null);
         return;
     }
     Started?.BeginInvoke(null, null);
 }