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; } }
/// <summary> /// Default constructor /// </summary> /// <param name="controller">The events controller</param> public WvWNotificationWindow(IWvWController controller) { this.controller = controller; this.viewModel = new WvWNotificationsWindowViewModel(this.controller); this.DataContext = this.viewModel; InitializeComponent(); this.Loaded += (o, e) => this.LoadWindowLocation(); }
/// <summary> /// Notifies the module that it has be initialized. /// </summary> public void Initialize() { logger.Debug("Initializing WvW Module"); this.wvwController = this.Container.GetExportedValue<IWvWController>(); this.viewController = this.Container.GetExportedValue<IWvWViewController>(); // Register for shutdown Commands.ApplicationShutdownCommand.RegisterCommand(new DelegateCommand(this.Shutdown)); // Get the WvW controller started this.wvwController.Start(); // Initialize the view controller this.viewController.Initialize(); logger.Debug("WvW Module initialized"); }
/// <summary> /// Notifies the module that it has be initialized. /// </summary> public void Initialize() { logger.Debug("Initializing WvW Module"); this.wvwController = this.Container.GetExportedValue <IWvWController>(); this.viewController = this.Container.GetExportedValue <IWvWViewController>(); // Register for shutdown Commands.ApplicationShutdownCommand.RegisterCommand(new DelegateCommand(this.Shutdown)); // Get the WvW controller started this.wvwController.Start(); // Initialize the view controller this.viewController.Initialize(); logger.Debug("WvW Module initialized"); }
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; } }
/// <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; }
/// <summary> /// Default constructor /// </summary> /// <param name="controller">The WvW controller</param> public WvWNotificationsWindowViewModel(IWvWController controller) { this.controller = controller; }
public WvWNotificationsWindowViewModel(IWvWController controller) { this.controller = controller; }