Ejemplo n.º 1
0
        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)));
        }
Ejemplo n.º 2
0
        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)));
        }
Ejemplo n.º 3
0
        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));
                    }
                });
        }
Ejemplo n.º 4
0
        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));
                }
            });
        }
Ejemplo n.º 5
0
        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");
        }
Ejemplo n.º 6
0
        /// <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");
        }
Ejemplo n.º 7
0
        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");
        }