コード例 #1
0
 public LayoutController(ILayoutService service, IPageService pageService, IZoneService zoneService, IWidgetBasePartService widgetService)
     : base(service)
 {
     _pageService   = pageService;
     _zoneService   = zoneService;
     _widgetService = widgetService;
 }
コード例 #2
0
        public CyclesController(ICyclesService cyclesService, IZoneService zoneService, IPlayerService playerService, CyclesUserData userData)
        {
            logger.Debug("Initializing Cycle Tracker Controller");
            this.cyclesService = cyclesService;
            this.zoneService   = zoneService;
            this.playerService = playerService;
            this.isStopped     = false;

            this.userData = userData;

            // Initialize the refresh timer
            this.cycleRefreshTimer    = new Timer(this.RefreshCycles);
            this.CycleRefreshInterval = 1000;

            // Initialize the start call count to 0
            this.startCallCount = 0;

            // Set up handling of the cycle settings UseAdjustedTable property changed so that we can load the correct table when it changes
            this.UserData.PropertyChanged += UserData_PropertyChanged;

            // Initialize the WorldCycles collection
            this.InitializeCycles();

            // Do this on a background thread since it takes awhile
            Task.Factory.StartNew(this.InitializeCycleZoneNames);

            logger.Info("Cycle Tracker Controller initialized");
        }
コード例 #3
0
        public DungeonsController(IDungeonsService dungeonsService, IZoneService zoneService, IPlayerService playerService, IWebBrowserController browserController, DungeonsUserData userData)
        {
            logger.Debug("Initializing Dungeons Controller");
            this.dungeonsService     = dungeonsService;
            this.zoneService         = zoneService;
            this.playerService       = playerService;
            this.browserController   = browserController;
            this.userData            = userData;
            this.isStopped           = false;
            this.tickStopped         = false;
            this.currentRunTimeSaved = false;

            // Initialize the dungeon timer view model
            this.DungeonTimerData = new DungeonTimerViewModel(userData);

            // Initialize the refresh timer
            this.dungeonsRefreshTimer = new Timer(this.Refresh);
            this.RefreshInterval      = 250;

            // Initialize the start call count to 0
            this.startCallCount = 0;

            // Initialize the dungeons
            this.InitializeDungeons();

            // This takes a while, so do it on a background thread
            Task.Factory.StartNew(() =>
            {
                this.InitializeDungeonZoneNames();
            });

            logger.Info("Dungeons Controller initialized");
        }
コード例 #4
0
        public Game(ICollection <string> userIds, IMapInfo mapInfo, IGameSettings settings)
        {
            if (userIds == null)
            {
                throw new ArgumentNullException(nameof(userIds));
            }
            if (mapInfo == null)
            {
                throw new ArgumentNullException(nameof(mapInfo));
            }
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            this.actionPoints = settings.ActionPoints;

            var tanks = userIds.Select(x => new Tank(new Health(settings.TankHealthPoint), x)).ToArray();

            var map = new Map(new MapCreationData(mapInfo, tanks), new BattlefieldBuilder(),
                              new RandomSpawnService());

            // намерено скрываем типы используемых интерфейсов внутри класса игры
            this.mapAdapter    = new MapAdapter(map);
            this.bulletService = new BulletService(this.mapAdapter, settings.BulletActionPoints);
            this.moveService   = new MoveService(this.mapAdapter);
            this.zoneService   = new ZoneService(this.mapAdapter, settings.ZoneRadius);

            this.DestroyedObjects = new DestroyedInfo(new Dictionary <string, Coordinates>(), new ICellContentInfo[0]);
        }
コード例 #5
0
        public MainMapViewModel(
            IRequestService requestService,
            ILayerService layerService,
            IGeolocatorService geolocatorService,
            INavigationService navigationService,
            IHexagonal hexagonal,
            IHeatGradientService heatGradientService,
            IZoneService zoneService)
        {
            _requestService      = requestService;
            _layerService        = layerService;
            _geolocatorService   = geolocatorService;
            _navigationService   = navigationService;
            _hexagonal           = hexagonal;
            _heatGradientService = heatGradientService;
            _zoneService         = zoneService;

            Initialized         = false;
            _layerLast          = 0;
            _currentPositionTag = String.Empty;
            _currentPosition    = _geolocatorService.LastRecordedPosition;
            //MainMapInitialCameraUpdate = CameraUpdateFactory.NewPositionZoom(_currentPosition, 12.0); // zoom can be within: [2,21]
            CameraPosition cp = new CameraPosition(_currentPosition, 12.0, 0.0, 60.0);

            MainMapInitialCameraUpdate = CameraUpdateFactory.NewCameraPosition(cp);
        }
コード例 #6
0
 public CreditContractController(
     dbwebContext context,
     IBookingServices ibookService,
     IUserServices iuserService,
     ICustomerServices icustService,
     IRelationService irelaService,
     IContractGroupService icontGroupService,
     IContractTypeService iconTypeService,
     IZoneService izoneService,
     IBranchService ibranchService,
     ISysParameterService isysParamService,
     IStatusService istatusService
     )
 {
     ctx               = context;
     iBookService      = ibookService;
     iUserService      = iuserService;
     iCustService      = icustService;
     iRelaService      = irelaService;
     iContGroupService = icontGroupService;
     iContTypeService  = iconTypeService;
     iZoneService      = izoneService;
     iBranchService    = ibranchService;
     iSysParamService  = isysParamService;
     iStatusService    = istatusService;
 }
コード例 #7
0
        public EventsController(IEventsService eventsService, IZoneService zoneService, IPlayerService playerService, EventsUserData userData)
        {
            logger.Debug("Initializing Event Tracker Controller");
            this.eventsService = eventsService;
            this.zoneService   = zoneService;
            this.playerService = playerService;
            this.isStopped     = false;

            this.userData = userData;

            // Initialize the refresh timer
            this.eventRefreshTimer    = new Timer(this.RefreshEvents);
            this.EventRefreshInterval = 1000;

            // Initialize the start call count to 0
            this.startCallCount = 0;

            // Set up handling of the event settings UseAdjustedTable property changed so that we can load the correct table when it changes
            this.UserData.PropertyChanged += UserData_PropertyChanged;

            // Initialize the WorldEvents collection
            this.InitializeEvents();
            this.InitializeEventZoneNames();
            this.InitializeNotifications();
            logger.Info("Event Tracker Controller initialized");
        }
コード例 #8
0
        public MapViewModel(IZoneCompletionController zoneController, IZoneService zoneService, IPlayerService playerService,
                            PlayerMarkersViewModel mapMarkers, ZoneItemsViewModel zoneItems, MapUserData userData)
        {
            this.zoneController = zoneController;
            this.zoneService    = zoneService;
            this.userData       = userData;

            this.CharacterPointer = new CharacterPointerViewModel(zoneController, userData);
            this.CharacterPointer.PropertyChanged += CharacterPointer_PropertyChanged;
            this.Drawings = new DrawingsViewModel(this.CharacterPointer, zoneService, playerService, userData);

            this.MapMarkers = mapMarkers;
            this.ZoneItems  = zoneItems;

            // Make sure the zone service is ready
            this.zoneService.Initialize();

            if (playerService.HasValidMapId)
            {
                this.ContinentData = this.zoneService.GetContinentByMap(playerService.MapId);
            }
            else
            {
                this.ContinentData = this.zoneService.GetContinent(DEFAULT_CONTINENT_ID);
            }

            this.FloorId = 1;
            if (playerService.HasValidMapId)
            {
                this.FloorId = this.zoneService.GetMap(playerService.MapId).DefaultFloor;
            }

            ((INotifyPropertyChanged)this.zoneController).PropertyChanged += ZoneControllerPropertyChanged;
            this.zoneController.Start();
        }
コード例 #9
0
 public DbSeeder(
     IWorldService worldService,
     IFactionService factionService,
     IItemService itemService,
     IItemCategoryService itemCategoryService,
     IZoneService zoneService,
     IProfileService profileService,
     ILoadoutService loadoutService,
     IScrimRulesetManager rulesetManager,
     IFacilityService facilityService,
     IFacilityTypeService facilityTypeService,
     IVehicleService vehicleService,
     IVehicleTypeService vehicleTypeService,
     IDeathEventTypeService deathTypeService,
     ISqlScriptRunner sqlScriptRunner,
     ILogger <DbSeeder> logger
     )
 {
     _worldService        = worldService;
     _factionService      = factionService;
     _itemService         = itemService;
     _itemCategoryService = itemCategoryService;
     _zoneService         = zoneService;
     _profileService      = profileService;
     _loadoutService      = loadoutService;
     _rulesetManager      = rulesetManager;
     _facilityService     = facilityService;
     _facilityTypeService = facilityTypeService;
     _vehicleService      = vehicleService;
     _vehicleTypeService  = vehicleTypeService;
     _deathTypeService    = deathTypeService;
     _sqlScriptRunner     = sqlScriptRunner;
     _logger = logger;
 }
コード例 #10
0
 public ZoneValidationRequestService(
     IZoneValidationRequestRepository zoneValidationRequestRepository,
     IZoneService zoneService)
 {
     _zoneValidationRequestRepository = zoneValidationRequestRepository;
     _zoneService = zoneService;
 }
コード例 #11
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="task">The task that this view model wraps</param>
        /// <param name="zoneService">Service that provides zone information, such as map name</param>
        public PlayerTaskViewModel(PlayerTask task, IZoneService zoneService, IPlayerTasksController controller, CompositionContainer container)
        {
            this.Task                 = task;
            this.zoneService          = zoneService;
            this.controller           = controller;
            this.container            = container;
            this.currentCharacterName = string.Empty;

            this.Task.PropertyChanged += (o, e) =>
            {
                if (e.PropertyName == "MapID")
                {
                    this.RefreshMapName();
                }
                else if (e.PropertyName.Contains("Location"))
                {
                    this.OnPropertyChanged(() => this.HasZoneLocation);
                    this.OnPropertyChanged(() => this.HasContinentLocation);
                }
            };
            if (this.Task.MapID != -1)
            {
                System.Threading.Tasks.Task.Factory.StartNew(this.RefreshMapName);
            }

            this.CopyWaypointCommand       = new DelegateCommand(this.CopyWaypoint);
            this.EditCommand               = new DelegateCommand(this.Edit);
            this.DeleteCommand             = new DelegateCommand(this.Delete);
            this.UserData.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.Task.PropertyChanged     += (o, e) => this.RefreshVisibility();
            this.RefreshVisibility();
        }
コード例 #12
0
 public WidgetFilter(IWorkContextAccessor workContextAccessor, IShapeFactory shapeFactory, IEnumerable <IWidgetProvider> providers, IZoneService zoneService)
 {
     this.shapeFactory        = shapeFactory;
     this.providers           = providers;
     this.zoneService         = zoneService;
     this.workContextAccessor = workContextAccessor;
 }
コード例 #13
0
 public AssetController(IAssetService assetService, IZoneService zoneService, ILocationService locationService, IAssetModelService assetModelService)
 {
     this.assetService      = assetService;
     this.zoneService       = zoneService;
     this.locationService   = locationService;
     this.assetModelService = assetModelService;
 }
コード例 #14
0
        public MapViewModel(IZoneCompletionController zoneController, IZoneService zoneService, IPlayerService playerService,
                            ZoneItemsStore zoneItemsStore, MapUserData userData)
        {
            this.zoneController = zoneController;
            this.zoneService    = zoneService;
            this.userData       = userData;

            this.CharacterPointer = new CharacterPointerViewModel(zoneController, userData);
            this.CharacterPointer.PropertyChanged += CharacterPointer_PropertyChanged;

            this.MapMarkers = new MarkersViewModel(userData);
            this.ZoneItems  = new ZoneItemsViewModel(zoneItemsStore);

            if (playerService.HasValidMapId)
            {
                this.ContinentData = this.zoneService.GetContinentByMap(playerService.MapId);
            }
            else
            {
                this.ContinentData = this.zoneService.GetContinent(DEFAULT_CONTINENT_ID);
            }

            this.FloorId = 1;

            ((INotifyPropertyChanged)this.zoneController).PropertyChanged += ZoneControllerPropertyChanged;
            this.zoneController.Start();
        }
コード例 #15
0
        public TasksController(IZoneService zoneService, IPlayerService playerService, TasksUserData userData, CompositionContainer container)
        {
            logger.Debug("Initializing Player Tasks Controller");
            this.zoneService   = zoneService;
            this.playerService = playerService;
            this.container     = container;
            this.isStopped     = false;

            this.CharacterName = this.playerService.CharacterName;
            this.UserData      = userData;
            this.PlayerTasks   = new ObservableCollection <PlayerTaskViewModel>();

            // Initialize all loaded tasks
            logger.Info("Initializing all loaded player tasks");
            foreach (var task in this.UserData.Tasks)
            {
                var taskVm = new PlayerTaskViewModel(task, zoneService, this, this.container);
                taskVm.OnNewCharacterDetected(this.CharacterName);
                this.PlayerTasks.Add(taskVm);
            }

            // Initialize refresh timers
            this.refreshTimer    = new Timer(this.Refresh);
            this.RefreshInterval = 125;
            this.CurrentMapID    = -1;

            logger.Info("Player Tasks Controller initialized");
        }
コード例 #16
0
ファイル: ZoneController.cs プロジェクト: andres1447/FriMav
 public ZoneController(
     IZoneService zoneService,
     ICustomerService customerService)
 {
     _zoneService     = zoneService;
     _customerService = customerService;
 }
コード例 #17
0
 public async Task <ActionResult <Zone> > UpdateZone(
     [FromServices] IZoneService zoneService,
     [FromRoute] int zoneId,
     [FromBody] CreateOrUpdateZoneCommand command)
 {
     return(await zoneService.UpdateZone(zoneId, command));
 }
コード例 #18
0
        public PlayerMarkersViewModel(TaskTrackerViewModel taskTrackerVm,
                                      MapUserData userData,
                                      PlayerTasksFactory playerTaskFactory,
                                      IPlayerTasksController tasksController,
                                      IZoneService zoneService,
                                      IPlayerService playerService)
        {
            this.taskTrackerVm     = taskTrackerVm;
            this.playerTaskFactory = playerTaskFactory;
            this.tasksController   = tasksController;
            this.zoneService       = zoneService;
            this.playerService     = playerService;
            this.userData          = userData;

            this.PlayerMarkers = new ObservableCollection <PlayerMarkerViewModel>();

            this.playerTasksCollection = (ObservableCollection <PlayerTaskViewModel>) this.taskTrackerVm.PlayerTasks.Source;
            foreach (var task in this.playerTasksCollection)
            {
                task.PropertyChanged += Task_PropertyChanged;
                if (task.HasContinentLocation)
                {
                    this.PlayerMarkers.Add(new PlayerMarkerViewModel(task, this.zoneService, this.playerService));
                }
            }
            this.playerTasksCollection.CollectionChanged += PlayerTasksCollection_CollectionChanged;

            this.InitializeTemplates();
            this.PlayerMarkers.CollectionChanged += PlayerMarkers_CollectionChanged;
        }
コード例 #19
0
 public AddZoneForm(LocaleProvider localeProvider, IZoneService zonesService)
 {
     InitializeComponent();
     this.localeProvider = localeProvider;
     this.zonesService   = zonesService;
     this.BindingContext = localeProvider.Locale;
 }
コード例 #20
0
ファイル: ZoneItemsStore.cs プロジェクト: SamHurne/gw2pao
        public ZoneItemsStore(IZoneService zoneService, IPlayerService playerService, ZoneCompletionUserData zoneUserData)
        {
            this.zoneService = zoneService;
            this.playerService = playerService;
            this.zoneUserData = zoneUserData;

            this.Data = new Dictionary<int, ContinentZoneItems>(); 
        }
コード例 #21
0
 public frmAddSubZone(IZoneService zoneService)
 {
     _zoneService = zoneService;
     isUpdate     = false;
     InitializeComponent();
     this.btnClear.Text = "Limpiar";
     //this.cbTypeVehicle.DataSource = System.Enum.GetValues(typeof(VehicleType));
 }
コード例 #22
0
 public TrackingController(
     ITrackingService trackingService,
     IZoneService zoneService
     )
 {
     _trackingService = trackingService;
     _zoneService     = zoneService;
 }
コード例 #23
0
 public frmAddSubZone(IZoneService ZoneService, Zone actualZone)
 {
     _zoneService = ZoneService;
     ActualZone   = actualZone;
     isUpdate     = true;
     InitializeComponent();
     btnClear.Text = "Cancelar";
 }
コード例 #24
0
        public ZoneItemsStore(IZoneService zoneService, IPlayerService playerService, ZoneCompletionUserData zoneUserData)
        {
            this.zoneService   = zoneService;
            this.playerService = playerService;
            this.zoneUserData  = zoneUserData;

            this.Data = new Dictionary <int, ContinentZoneItems>();
        }
コード例 #25
0
 public ZonesController(
     IZoneService zoneService,
     IZoneValidationRequestService zoneValidationRequestService,
     UserManager <ApplicationUser> userManager)
 {
     _zoneService = zoneService;
     _userManager = userManager;
     _zoneValidationRequestService = zoneValidationRequestService;
 }
コード例 #26
0
        /// <summary>
        /// Constructs a new Player Marker view model
        /// </summary>
        /// <param name="taskViewModel">View model of the marker's corresponding task</param>
        public PlayerMarkerViewModel(PlayerTaskViewModel taskViewModel, IZoneService zoneService, IPlayerService playerService)
        {
            this.taskViewModel = taskViewModel;
            this.zoneService   = zoneService;
            this.playerService = playerService;

            this.taskViewModel.PropertyChanged      += TaskViewModel_PropertyChanged;
            this.taskViewModel.Task.PropertyChanged += Task_PropertyChanged;
        }
コード例 #27
0
 public frmLogin(ILogService logService, IUserService userService, IVehicleService vehicleService, IZoneService zoneService, IRouteZoneService routeZoneService)
 {
     InitializeComponent();
     _unitOfWork       = new UnitOfWork();
     _logger           = logService;
     _userService      = userService;
     _vehicleService   = vehicleService;
     _zoneService      = zoneService;
     _routeZoneService = routeZoneService;
 }
コード例 #28
0
 public MainZoneViewModel(
     ILayerService layerService,
     IZoneService zoneService,
     INavigationService navigationService)
 {
     _layerService      = layerService;
     _zoneService       = zoneService;
     _navigationService = navigationService;
     IsBusy             = true;
 }
コード例 #29
0
 public WidgetService(IRepository <Widget, int> repository,
                      IEventBus eventBus,
                      ICacheManager cacheManager,
                      ISignals signals, IZoneService zoneService)
     : base(repository, eventBus)
 {
     this.cacheManager = cacheManager;
     this.signals      = signals;
     this.zoneService  = zoneService;
 }
コード例 #30
0
        public frmAddZone(IZoneService zoneService)
        {
            _zoneService = zoneService;
            //	isUpdate = false;
            InitializeComponent();
            this.btnClear.Text = "Limpiar";
            isUpdate           = false;

            subZone = new List <Zone>();
        }
コード例 #31
0
 public InventoryService(
     IInventoryDao inventoryDao,
     IProductDao productDao,
     IProductService productService,
     IZoneService zoneService)
 {
     _inventoryDao   = inventoryDao;
     _productDao     = productDao;
     _productService = productService;
     _zoneService    = zoneService;
 }
コード例 #32
0
ファイル: PlayerTaskViewModel.cs プロジェクト: DaLoL/gw2pao
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="task">The task that this view model wraps</param>
        /// <param name="zoneService">Service that provides zone information, such as map name</param>
        public PlayerTaskViewModel(PlayerTask task, IZoneService zoneService, IPlayerTasksController controller, CompositionContainer container)
        {
            this.Task = task;
            this.zoneService = zoneService;
            this.controller = controller;
            this.container = container;

            this.Task.PropertyChanged += (o, e) =>
                {
                    if (e.PropertyName == "MapID")
                        this.RefreshMapName();
                };
            System.Threading.Tasks.Task.Factory.StartNew(this.RefreshMapName);

            this.CopyWaypointCommand = new DelegateCommand(this.CopyWaypoint);
            this.EditCommand = new DelegateCommand(this.Edit);
            this.DeleteCommand = new DelegateCommand(this.Delete);
            this.UserData.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.Task.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.RefreshVisibility();
        }
コード例 #33
0
        public NewTaskDialogViewModel(ICommerceService commerceService, IPlayerService playerService, IZoneService zoneService, IPlayerTasksController controller)
        {
            this.commerceService = commerceService;
            this.playerService = playerService;
            this.zoneService = zoneService;
            this.controller = controller;

            this.ItemsProvider = new ItemResultsProvider(this.commerceService);

            this.Task = new PlayerTask();
            this.Task.MapID = this.playerService.MapId;
            this.Task.Location = this.playerService.PlayerPosition;
            this.RefreshLocationCommand = new DelegateCommand(this.RefreshLocation);
            this.ApplyCommand = new DelegateCommand(this.AddOrUpdateTask);
        }
コード例 #34
0
ファイル: TasksController.cs プロジェクト: DaLoL/gw2pao
        public TasksController(IZoneService zoneService, IPlayerService playerService, TasksUserData userData, CompositionContainer container)
        {
            logger.Debug("Initializing Player Tasks Controller");
            this.zoneService = zoneService;
            this.playerService = playerService;
            this.container = container;
            this.isStopped = false;

            this.UserData = userData;
            this.PlayerTasks = new ObservableCollection<PlayerTaskViewModel>();

            // Initialize all loaded tasks
            logger.Info("Initializing all loaded player tasks");
            foreach (var task in this.UserData.Tasks)
                this.PlayerTasks.Add(new PlayerTaskViewModel(task, zoneService, this, this.container));

            // Initialize refresh timers
            this.refreshTimer = new Timer(this.Refresh);
            this.RefreshInterval = 125;
            this.CurrentMapID = -1;

            logger.Info("Player Tasks Controller initialized");
        }
コード例 #35
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="task">The task that this view model wraps</param>
        /// <param name="zoneService">Service that provides zone information, such as map name</param>
        public PlayerTaskViewModel(PlayerTask task, IZoneService zoneService, IPlayerTasksController controller, CompositionContainer container)
        {
            this.Task = task;
            this.zoneService = zoneService;
            this.controller = controller;
            this.container = container;
            this.currentCharacterName = string.Empty;

            this.Task.PropertyChanged += (o, e) =>
                {
                    if (e.PropertyName == "MapID")
                    {
                        this.RefreshMapName();
                    }
                    else if (e.PropertyName.Contains("Location"))
                    {
                        this.OnPropertyChanged(() => this.HasZoneLocation);
                        this.OnPropertyChanged(() => this.HasContinentLocation);
                    }
                };
            if (this.Task.MapID != -1)
                System.Threading.Tasks.Task.Factory.StartNew(this.RefreshMapName);

            this.CopyWaypointCommand = new DelegateCommand(this.CopyWaypoint);
            this.EditCommand = new DelegateCommand(this.Edit);
            this.DeleteCommand = new DelegateCommand(this.Delete);
            this.UserData.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.Task.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.RefreshVisibility();
        }
コード例 #36
0
        public ZoneCompletionController(IZoneService zoneService, IPlayerService playerService, ISystemService systemService, IHasZoneName zoneNameObject, ZoneCompletionUserData userData)
        {
            logger.Debug("Initializing Zone Completion Controller");
            this.zoneService = zoneService;
            this.playerService = playerService;
            this.systemService = systemService;
            this.zoneNameObject = zoneNameObject;
            this.isStopped = false;

            this.CharacterPosition = new API.Data.Entities.Point();
            this.CameraDirection = new API.Data.Entities.Point();

            this.UserData = userData;

            // Initialize refresh timers
            this.zoneRefreshTimer = new Timer(this.RefreshZone);
            this.ZoneRefreshInterval = 1000;
            this.itemLocationsRefreshTimer = new Timer(this.RefreshLocations);
            this.LocationsRefreshInterval = 250; // TODO: Tweak this until we get good performance without sucking up the CPU

            this.startCallCount = 0;
            this.CurrentMapID = -1;
            logger.Info("Zone Completion Controller initialized");
        }
コード例 #37
0
        public PlayerMarkersViewModel(TaskTrackerViewModel taskTrackerVm,
            MapUserData userData,
            PlayerTasksFactory playerTaskFactory,
            IPlayerTasksController tasksController,
            IZoneService zoneService,
            IPlayerService playerService)
        {
            this.taskTrackerVm = taskTrackerVm;
            this.playerTaskFactory = playerTaskFactory;
            this.tasksController = tasksController;
            this.zoneService = zoneService;
            this.playerService = playerService;
            this.userData = userData;

            this.PlayerMarkers = new ObservableCollection<PlayerMarkerViewModel>();

            this.playerTasksCollection = (ObservableCollection<PlayerTaskViewModel>)this.taskTrackerVm.PlayerTasks.Source;
            foreach (var task in this.playerTasksCollection)
            {
                task.PropertyChanged += Task_PropertyChanged;
                if (task.HasContinentLocation)
                    this.PlayerMarkers.Add(new PlayerMarkerViewModel(task, this.zoneService, this.playerService));
            }
            this.playerTasksCollection.CollectionChanged += PlayerTasksCollection_CollectionChanged;

            this.InitializeTemplates();
            this.PlayerMarkers.CollectionChanged += PlayerMarkers_CollectionChanged;
        }
コード例 #38
0
ファイル: MapViewModel.cs プロジェクト: reecebedding/gw2pao
        public MapViewModel(IZoneCompletionController zoneController, IZoneService zoneService, IPlayerService playerService,
            ZoneItemsStore zoneItemsStore, MapUserData userData)
        {
            this.zoneController = zoneController;
            this.zoneService = zoneService;
            this.userData = userData;

            this.CharacterPointer = new CharacterPointerViewModel(zoneController, userData);
            this.CharacterPointer.PropertyChanged += CharacterPointer_PropertyChanged;

            this.MapMarkers = new MarkersViewModel(userData);
            this.ZoneItems = new ZoneItemsViewModel(zoneItemsStore);

            if (playerService.HasValidMapId)
                this.ContinentData = this.zoneService.GetContinentByMap(playerService.MapId);
            else
                this.ContinentData = this.zoneService.GetContinent(DEFAULT_CONTINENT_ID);

            this.FloorId = 1;

            ((INotifyPropertyChanged)this.zoneController).PropertyChanged += ZoneControllerPropertyChanged;
            this.zoneController.Start();
        }
コード例 #39
0
        public EventsController(IEventsService eventsService, IZoneService zoneService, IPlayerService playerService, EventsUserData userData)
        {
            logger.Debug("Initializing Event Tracker Controller");
            this.eventsService = eventsService;
            this.zoneService = zoneService;
            this.playerService = playerService;
            this.isStopped = false;

            this.userData = userData;

            // Initialize the refresh timer
            this.eventRefreshTimer = new Timer(this.RefreshEvents);
            this.EventRefreshInterval = 1000;

            // Initialize the start call count to 0
            this.startCallCount = 0;

            // Set up handling of the event settings UseAdjustedTable property changed so that we can load the correct table when it changes
            this.UserData.PropertyChanged += UserData_PropertyChanged;

            // Initialize the WorldEvents collection
            this.InitializeWorldEvents();

            // Do this on a background thread since it takes awhile
            Task.Factory.StartNew(this.InitializeWorldEventZoneNames);

            logger.Info("Event Tracker Controller initialized");
        }
コード例 #40
0
ファイル: PlayerTasksFactory.cs プロジェクト: SamHurne/gw2pao
 public PlayerTasksFactory(IZoneService zoneService, IPlayerTasksController controller, CompositionContainer container)
 {
     this.zoneService = zoneService;
     this.tasksController = controller;
     this.container = container;
 }
コード例 #41
0
        public DungeonsController(IDungeonsService dungeonsService, IZoneService zoneService, IPlayerService playerService, IWebBrowserController browserController, DungeonsUserData userData)
        {
            logger.Debug("Initializing Dungeons Controller");
            this.dungeonsService = dungeonsService;
            this.zoneService = zoneService;
            this.playerService = playerService;
            this.browserController = browserController;
            this.userData = userData;
            this.isStopped = false;
            this.tickStopped = false;
            this.currentRunTimeSaved = false;

            // Initialize the dungeon timer view model
            this.DungeonTimerData = new DungeonTimerViewModel(userData);

            // Initialize the refresh timer
            this.dungeonsRefreshTimer = new Timer(this.Refresh);
            this.RefreshInterval = 250;

            // Initialize the start call count to 0
            this.startCallCount = 0;

            // Initialize the dungeons
            this.InitializeDungeons();

            // This takes a while, so do it on a background thread
            Task.Factory.StartNew(() =>
                {
                    this.InitializeDungeonZoneNames();
                });

            logger.Info("Dungeons Controller initialized");
        }
コード例 #42
0
        /// <summary>
        /// Constructs a new Player Marker view model
        /// </summary>
        /// <param name="taskViewModel">View model of the marker's corresponding task</param>
        public PlayerMarkerViewModel(PlayerTaskViewModel taskViewModel, IZoneService zoneService, IPlayerService playerService)
        {
            this.taskViewModel = taskViewModel;
            this.zoneService = zoneService;
            this.playerService = playerService;

            this.taskViewModel.PropertyChanged += TaskViewModel_PropertyChanged;
            this.taskViewModel.Task.PropertyChanged += Task_PropertyChanged;
        }