public WvWTrackerViewModel(IWvWController wvwController, IHasWvWMap wvwMapVM) { this.controller = wvwController; this.WvWMapVM = wvwMapVM; var collectionViewSource = new AutoRefreshCollectionViewSource(); collectionViewSource.Source = this.controller.CurrentObjectives; this.Objectives = collectionViewSource; switch (this.UserData.ObjectivesSortProperty) { case "Type": this.OnSortingPropertyChanged("Type", ListSortDirection.Ascending); break; case "DistanceFromPlayer": this.OnSortingPropertyChanged("DistanceFromPlayer", ListSortDirection.Ascending); break; case "ShortName": this.OnSortingPropertyChanged("ShortName", ListSortDirection.Ascending); break; case "Location": this.OnSortingPropertyChanged("Location", ListSortDirection.Ascending); break; case "WorldOwner": this.OnSortingPropertyChanged("WorldOwner", ListSortDirection.Ascending); break; default: this.OnSortingPropertyChanged("Type", ListSortDirection.Ascending); break; } }
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"); }
/// <summary> /// Default constructor /// </summary> /// <param name="dungeonsController">The dungeons controller</param> public WvWTrackerView(IWvWController wvwController, IHasWvWMap mapVm) { logger.Debug("New WvWTrackerView created"); this.controller = wvwController; this.viewModel = new WvWTrackerViewModel(this.controller, mapVm); this.DataContext = this.viewModel; InitializeComponent(); // Set the window size and location this.RefreshWindowSizeForOrientation(); this.Closing += WvWTrackerView_Closing; if (Properties.Settings.Default.WvWTrackerHeight > 0) { this.Height = Properties.Settings.Default.WvWTrackerHeight; } if (Properties.Settings.Default.WvWTrackerWidth > 0) { this.Width = Properties.Settings.Default.WvWTrackerWidth; } this.beforeCollapseHeight = this.Height; this.viewModel.PropertyChanged += viewModel_PropertyChanged; }
/// <summary> /// Default constructor /// </summary> /// <param name="wvwController">The WvW controller</param> /// <param name="map">Map for this view model</param> public WvWTrackerViewModel(IWvWController wvwController, IHasWvWMap wvwMapVM) { this.controller = wvwController; this.WvWMapVM = wvwMapVM; }