Example #1
0
        public OverviewTabViewModel(IEventBus eventBus, IModelService modelService, IHandleService handleService, ISettingsService settingsService, IStartProcessService processService)
        {
            this.eventBus        = eventBus;
            this.modelService    = modelService;
            this.handleService   = handleService;
            this.settingsService = settingsService;
            this.processService  = processService;

            var playerInformationChanged = new Subscription <PlayerInformationChangedEvent>(OnPlayerInformationChanged);
            var skillRecognitionChanged  = new Subscription <SkillRecognitionChangedEvent>(OnSkillRecognitionChanged);
            var worldInformationChanged  = new Subscription <WorldInformationChangedEvent>(OnWorldInformationChanged);
            var skillCanBeCasted         = new Subscription <SkillCanBeCastedEvent>(OnSkillCanBeCasted);
            var hotkeyPressed            = new Subscription <HotkeyPressedEvent>(OnHotkeyPressed);

            SubscribeBus(playerInformationChanged);
            SubscribeBus(skillRecognitionChanged);
            SubscribeBus(worldInformationChanged);
            SubscribeBus(skillCanBeCasted);
            SubscribeBus(hotkeyPressed);

            handleService.HandleStatusChanged += OnHandleChanged;

            CurrentSkills = new ObservableCollection <string>
            {
                "pack://application:,,,/Resource/Skill/EmptyFrame.png",
                "pack://application:,,,/Resource/Skill/EmptyFrame.png",
                "pack://application:,,,/Resource/Skill/EmptyFrame.png",
                "pack://application:,,,/Resource/Skill/EmptyFrame.png",
                "pack://application:,,,/Resource/Skill/EmptyFrame.png",
                "pack://application:,,,/Resource/Skill/EmptyFrame.png",
            };

            CurrentSkillState = new ObservableCollection <string> {
                "Cant cast", "Cant cast", "Cant cast", "Cant cast", "Cant cast", "Cant cast"
            };
            CurrentActiveState = new ObservableCollection <string> {
                "Not active", "Not active", "Not active", "Not active", "Not active", "Not active",
            };
            CurrentPlayerClass     = "pack://application:,,,/Resource/Skill/EmptyFrame.png";
            CurrentHealth          = 0;
            CurrentPrimaryResource = 0;
            CurrentPrimaryResource = 0;

            var handle = handleService.GetHandle("Diablo III64");

            DiabloProcessId       = handle != null ? handle.ProcessId : 0;
            DiabloClientRectangle = handle != null ? $"{handle.ClientRectangle.Width}x{handle.ClientRectangle.Height}" : "0x0";

            SkillIndexSuspensionStatus = new ObservableCollection <bool>(settingsService.SmartFeatureSettings.SkillSuspensionStatus);
        }
Example #2
0
 public StartProcessCommand(
     IChatRepository chatRepository,
     IStartProcessService startProcessService,
     IAuthRepository authRepository,
     IStartProcessRepository startProcessRepository,
     IBotService botService,
     IBotWebApiService botWebApiService,
     IProcessContextRepository processContextRepository) : base(botService)
 {
     this.chatRepository           = chatRepository;
     this.startProcessService      = startProcessService;
     this.authRepository           = authRepository;
     this.startProcessRepository   = startProcessRepository;
     this.botWebApiService         = botWebApiService;
     this.processContextRepository = processContextRepository;
     dict = new Dictionary <long, Dictionary <ContextProcess, object> >();
 }
Example #3
0
        public OpportunityFactory(
            ILogger <OpportunityFactory> logger,
            IOptionsMonitor <AppOptions> appOptions,
            GraphSharePointAppService graphSharePointAppService,
            GraphUserAppService graphUserAppService,
            CardNotificationService cardNotificationService,
            INotesService notesService,
            ICheckListProcessService checkListProcessService,
            ICustomerDecisionProcessService customerDecisionProcessService,
            ICustomerFeedbackProcessService customerFeedbackProcessService,
            IProposalDocumentProcessService proposalStatusProcessService,
            INewOpportunityProcessService newOpportunityProcessService,
            IDashboardService dashboardService,
            IAuthorizationService authorizationService,
            IPermissionRepository permissionRepository,
            IStartProcessService startProcessService,
            IDashboardAnalysis dashboardAnalysis,
            GraphTeamsAppService graphTeamsAppService,
            IAddInHelper addInHelper,
            GraphTeamsOnBehalfService graphTeamsOnBeahalfService,
            IMemberService memberService,
            ITeamChannelService teamChannelService,
            IAzureKeyVaultService azureKeyVaultService) : base(logger, appOptions)
        {
            Guard.Against.Null(graphSharePointAppService, nameof(graphSharePointAppService));
            Guard.Against.Null(graphUserAppService, nameof(graphUserAppService));
            Guard.Against.Null(cardNotificationService, nameof(cardNotificationService));
            Guard.Against.Null(notesService, nameof(notesService));
            Guard.Against.Null(checkListProcessService, nameof(checkListProcessService));
            Guard.Against.Null(customerDecisionProcessService, nameof(customerDecisionProcessService));
            Guard.Against.Null(customerFeedbackProcessService, nameof(customerFeedbackProcessService));
            Guard.Against.Null(proposalStatusProcessService, nameof(proposalStatusProcessService));
            Guard.Against.Null(newOpportunityProcessService, nameof(newOpportunityProcessService));
            Guard.Against.Null(startProcessService, nameof(startProcessService));
            Guard.Against.Null(dashboardService, nameof(dashboardService));
            Guard.Against.Null(dashboardAnalysis, nameof(dashboardAnalysis));
            Guard.Against.Null(authorizationService, nameof(authorizationService));
            Guard.Against.Null(permissionRepository, nameof(permissionRepository));
            Guard.Against.Null(graphTeamsAppService, nameof(graphTeamsAppService));
            Guard.Against.Null(addInHelper, nameof(addInHelper));

            _graphSharePointAppService = graphSharePointAppService;
            _graphUserAppService       = graphUserAppService;

            _cardNotificationService        = cardNotificationService;
            _checkListProcessService        = checkListProcessService;
            _customerDecisionProcessService = customerDecisionProcessService;
            _customerFeedbackProcessService = customerFeedbackProcessService;
            _proposalStatusProcessService   = proposalStatusProcessService;
            _newOpportunityProcessService   = newOpportunityProcessService;
            _startProcessService            = startProcessService;
            _dashboardService          = dashboardService;
            _authorizationService      = authorizationService;
            _permissionRepository      = permissionRepository;
            _graphTeamsAppService      = graphTeamsAppService;
            _dashboardAnalysis         = dashboardAnalysis;
            _addInHelper               = addInHelper;
            _graphTeamsOnBehalfService = graphTeamsOnBeahalfService;
            _azureKeyVaultService      = azureKeyVaultService;

            _memberService      = memberService;
            _teamChannelService = teamChannelService;
            _notesService       = notesService;
        }
        public OpportunityFactory(
            ILogger <OpportunityFactory> logger,
            IOptionsMonitor <AppOptions> appOptions,
            GraphSharePointAppService graphSharePointAppService,
            GraphUserAppService graphUserAppService,
            IUserProfileRepository userProfileRepository,
            IRoleMappingRepository roleMappingRepository,
            CardNotificationService cardNotificationService,
            IUserContext userContext,
            ICheckListProcessService checkListProcessService,
            ICustomerDecisionProcessService customerDecisionProcessService,
            IProposalDocumentProcessService proposalStatusProcessService,
            INewOpportunityProcessService newOpportunityProcessService,
            IDashboardService dashboardService,
            IAuthorizationService authorizationService,
            IPermissionRepository permissionRepository,
            IStartProcessService startProcessService,
            IDashboardAnalysis dashboardAnalysis,
            GraphTeamsAppService graphTeamsAppService,
            IAddInHelper addInHelper,
            GraphTeamsOnBehalfService graphTeamsOnBeahalfService,
            IAzureKeyVaultService azureKeyVaultService) : base(logger, appOptions)
        {
            Guard.Against.Null(graphSharePointAppService, nameof(graphSharePointAppService));
            Guard.Against.Null(graphUserAppService, nameof(graphUserAppService));
            Guard.Against.Null(userProfileRepository, nameof(userProfileRepository));
            Guard.Against.Null(roleMappingRepository, nameof(roleMappingRepository));
            Guard.Against.Null(cardNotificationService, nameof(cardNotificationService));
            Guard.Against.Null(userContext, nameof(userContext));
            Guard.Against.Null(checkListProcessService, nameof(checkListProcessService));
            Guard.Against.Null(customerDecisionProcessService, nameof(customerDecisionProcessService));
            Guard.Against.Null(proposalStatusProcessService, nameof(proposalStatusProcessService));
            Guard.Against.Null(newOpportunityProcessService, nameof(newOpportunityProcessService));
            Guard.Against.Null(startProcessService, nameof(startProcessService));
            Guard.Against.Null(dashboardService, nameof(dashboardService));
            Guard.Against.Null(dashboardAnalysis, nameof(dashboardAnalysis));
            Guard.Against.Null(authorizationService, nameof(authorizationService));
            Guard.Against.Null(permissionRepository, nameof(permissionRepository));
            Guard.Against.Null(graphTeamsAppService, nameof(graphTeamsAppService));
            Guard.Against.Null(addInHelper, nameof(addInHelper));

            _graphSharePointAppService = graphSharePointAppService;
            _graphUserAppService       = graphUserAppService;
            _userProfileRepository     = userProfileRepository;
            _roleMappingRepository     = roleMappingRepository;
            _cardNotificationService   = cardNotificationService;
            _userContext                    = userContext;
            _checkListProcessService        = checkListProcessService;
            _customerDecisionProcessService = customerDecisionProcessService;
            _proposalStatusProcessService   = proposalStatusProcessService;
            _newOpportunityProcessService   = newOpportunityProcessService;
            _startProcessService            = startProcessService;
            _dashboardService               = dashboardService;
            _authorizationService           = authorizationService;
            _permissionRepository           = permissionRepository;
            _graphTeamsAppService           = graphTeamsAppService;
            _dashboardAnalysis              = dashboardAnalysis;
            _addInHelper                    = addInHelper;
            _graphTeamsOnBehalfService      = graphTeamsOnBeahalfService;
            _azureKeyVaultService           = azureKeyVaultService;
        }