Exemple #1
0
 private static IEnumerable <string> ResetRemovedMonitor(ICallbacks parent, HeliosProfile profile, int monitorIndex, ViewModel.MonitorResetItem item, int monitorToRemove)
 {
     Logger.Debug($"removing Monitor {monitorIndex + 1} and saving its controls for replacement");
     parent.CloseProfileItem(profile.Monitors[monitorToRemove]);
     foreach (string progress in item.RemoveControls())
     {
         yield return(progress);
     }
     ConfigManager.UndoManager.AddUndoItem(new UndoEvents.DeleteMonitorUndoEvent(profile, profile.Monitors[monitorToRemove], monitorToRemove));
     profile.Monitors.RemoveAt(monitorToRemove);
 }
Exemple #2
0
 private static IEnumerable <string> ResetExistingMonitor(int monitorIndex, ViewModel.MonitorResetItem item)
 {
     if (item.NewMonitor != monitorIndex)
     {
         Logger.Debug($"removing controls from Monitor {monitorIndex + 1} for replacement");
         foreach (string progress in item.RemoveControls())
         {
             yield return(progress);
         }
     }
     Logger.Debug($"resetting Monitor {monitorIndex + 1}");
     foreach (string progress in item.Reset())
     {
         yield return(progress);
     }
 }