internal CharacterTimers(string charName, IEnumerable <TimerEntry> timers) : base(charName) { var view = CollectionViewSource.GetDefaultView(TimerList); view.SortDescriptions.Add(new SortDescription(nameof(TimerEntry.RemainingTime), ListSortDirection.Ascending)); ((ICollectionViewLiveShaping)view).IsLiveSorting = true; foreach (var timer in timers) { TimerList.Add(timer); } ClearReadyCommand = new CommandWrapper(o => ClearReady(), o => true); }
internal ConfigPanel() : base("Settings") { LoadConfig(); DropFocusCommand = new CommandWrapper(o => DropFocus((FrameworkElement)o), o => o is FrameworkElement); }
internal Dataset() { RefreshCommand = new CommandWrapper(o => Refresh(true), o => true); RefreshTimer.Elapsed += (sender, e) => Refresh(false); Refresh(true); }