public void Attach(MacroData macroData)
 {
     _subscription = Observable.Merge(RxApp.DeferredScheduler,
             macroData.Changed,
             macroData.Deployment.Changed,
             macroData.ScreenElements.Changed)
             .Throttle(TimeSpan.FromSeconds(5.0), RxApp.DeferredScheduler)
             .Subscribe(p =>
                 {
                     _storage.Save(macroData);
                 }
             );
 }
示例#2
0
文件: MacroData.cs 项目: ray2k/Maacro
 public static void SetCurrent(MacroData currentData)
 {
     lock (_lock)
     {
         MacroData.Current = currentData;
     }
 }