private void ShowPlanInLabel(Plan plan) { if (Plans.Contains(plan)) { } else { Plans.Add(plan); } }
public void SetActivePlan(PowerPlan plan) { if (plan == null) { throw new ArgumentNullException("plan"); } if (!Plans.Contains(plan)) { throw new ArgumentException("Given plan is not in the list of plans", "plan"); } Console.WriteLine("Setting active plan to " + plan.Name); PowercfgSetActive(plan.Guid); Reload(); }