public WvWMenu(IWvWViewController viewFactory, IWvWService wvwService, WvWUserData userData) { // Build up the sub menu items this.SubMenuItems = new ObservableCollection <IMenuItem>(); // WvW Tracker this.SubMenuItems.Add(new MenuItem(Properties.Resources.OpenWvWTracker, viewFactory.DisplayWvWTracker, viewFactory.CanDisplayWvWTracker)); this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.WvWNotifications, false, () => userData.AreNotificationsEnabled, userData)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenWvWSettingsCommand.Execute(null))); }
public WvWMenu(IWvWViewController viewFactory, IWvWService wvwService, WvWUserData userData) { // Build up the sub menu items this.SubMenuItems = new ObservableCollection<IMenuItem>(); // WvW Tracker this.SubMenuItems.Add(new MenuItem(Properties.Resources.OpenWvWTracker, viewFactory.DisplayWvWTracker, viewFactory.CanDisplayWvWTracker)); this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.WvWNotifications, false, () => userData.AreNotificationsEnabled, userData)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenWvWSettingsCommand.Execute(null))); }
public WvWSettingsViewModel(WvWUserData userData, IWvWService wvwService) { this.UserData = userData; this.PossibleWorlds = new ObservableCollection<World>(); Task.Factory.StartNew(() => { if (wvwService.Worlds == null || wvwService.Worlds.Count == 0) wvwService.LoadData(); foreach (var world in wvwService.Worlds.OrderBy(wld => wld.Name)) { Threading.BeginInvokeOnUI(() => this.PossibleWorlds.Add(world)); } }); }
public WvWSettingsViewModel(WvWUserData userData, IWvWService wvwService) { this.UserData = userData; this.PossibleWorlds = new ObservableCollection <World>(); Task.Factory.StartNew(() => { if (wvwService.Worlds == null || wvwService.Worlds.Count == 0) { wvwService.LoadData(); } foreach (var world in wvwService.Worlds.OrderBy(wld => wld.Name)) { Threading.BeginInvokeOnUI(() => this.PossibleWorlds.Add(world)); } }); }
public WvWController(IWvWService wvwService, IPlayerService playerService, IHasWvWMap hasMap, IGuildService guildService, WvWUserData userData) { logger.Debug("Initializing WvW Controller"); this.wvwService = wvwService; this.playerService = playerService; this.guildService = guildService; this.currentMap = hasMap; this.userData = userData; this.timerCount = 0; this.isStopped = false; // Initialize the refresh timer this.objectivesRefreshTimer = new Timer(this.Refresh); this.ObjectivesRefreshInterval = 500; // Initialize the start call count to 0 this.startCallCount = 0; // Initialize the collections, but do it on a seperate thread since it can take a little time logger.Info("WvW Controller initialized"); }
/// <summary> /// Default constructor /// </summary> /// <param name="dungeonsService">The dungeons service object</param> /// <param name="userSettings">The dungeons user settings object</param> public WvWController(IWvWService wvwService, IPlayerService playerService, IGuildService guildService, IHasWvWMap mapObj, WvWSettings userSettings) { logger.Debug("Initializing WvW Controller"); this.wvwService = wvwService; this.playerService = playerService; this.guildService = guildService; this.mapObj = mapObj; this.userSettings = userSettings; this.timerCount = 0; // Initialize the refresh timer this.objectivesRefreshTimer = new Timer(this.Refresh); this.ObjectivesRefreshInterval = 500; // Initialize the start call count to 0 this.startCallCount = 0; // Have the WvW service load the worlds table this.wvwService.LoadTable(); // Initialize the collections, but do it on a seperate thread since it can take a little time logger.Info("WvW Controller initialized"); }
public WvWController(IWvWService wvwService, IPlayerService playerService, IHasWvWMap hasMap, IGuildService guildService, WvWUserData userData) { logger.Debug("Initializing WvW Controller"); this.wvwService = wvwService; this.playerService = playerService; this.guildService = guildService; this.currentMap = hasMap; this.userData = userData; this.timerCount = 0; this.isStopped = false; // Initialize the refresh timer this.objectivesRefreshTimer = new Timer(this.Refresh); this.ObjectivesRefreshInterval = 500; // Initialize the start call count to 0 this.startCallCount = 0; // Initialize the collections, but do it on a seperate thread since it can take a little time logger.Info("WvW Controller initialized"); }