public MainViewModel() { _es = _sm.GetSettings(SettingType.Event) as EventSettings; _bs = _sm.GetSettings(SettingType.Baisc) as BasicSettings; IsNotiVisible = false; FillColor = _normalColor; Notification = String.Empty; //TODO this is garbage. It's a hack to get things working for now. This needs to be protected if (_bs != null && _bs.WorldID > 0) Task.Factory.StartNew(() => { InitEvents(); }); else MessageBox.Show("You must set a world! Go to the settings menu and select your world then restart the application", "Something Is Wrong!", MessageBoxButton.OK, MessageBoxImage.Error); }
public EventDataFetcher() { _bs = _sm.GetSettings(SettingType.Baisc) as BasicSettings; _es = _sm.GetSettings(SettingType.Event) as EventSettings; }
public EventsViewModel() { _es = _sm.GetSettings(SettingType.Event) as EventSettings; _bs = _sm.GetSettings(SettingType.Baisc) as BasicSettings; WatchedEvents = new ObservableCollection<string>(); if (_es != null && _es.WatchedEvents != null) _es.WatchedEvents.Values.ToList().ForEach(x => WatchedEvents.Add(x)); LoadAsync(); }