示例#1
0
 public RewardController(
     IRewardRepository rewardRepository,
     IKidRepository kidRepository)
 {
     _rewardRepository = rewardRepository;
     _kidRepository    = kidRepository;
 }
示例#2
0
 public RewardController(ITransactionScopeProvider transactionScopeProvider, IRewardRepository rewardRepository,
                         IRewardService rewardService)
 {
     this.transactionScopeProvider = transactionScopeProvider;
     this.rewardRepository         = rewardRepository;
     this.rewardService            = rewardService;
 }
示例#3
0
    public void LoadAward()
    {
        awards.Clear();
        ApplicationContext context = Context.GetApplicationContext();

        IRewardRepository rewardRepository = context.GetService <IRewardRepository>();

        IAsyncResult <List <Award> > result = rewardRepository.GetAwards();
        List <Award> awardList = result.Synchronized().WaitForResult();

        foreach (Award award in awardList)
        {
            AwardItemViewModel awardItemViewModel = new AwardItemViewModel();
            if (award.Quality == (int)QualityType.Orange)
            {
                awardItemViewModel.Name = $"<color=#FF7F00>{award.Name}  {award.Count}</color>";
            }
            else if (award.Quality == (int)QualityType.Purple)
            {
                awardItemViewModel.Name = $"<color=#8B00FF>{award.Name}  {award.Count}</color>";
            }
            else
            {
                awardItemViewModel.Name = $"<color=#00FF00>{award.Name}  {award.Count}</color>";
            }

            this.awards.Add(awardItemViewModel);
        }
    }
示例#4
0
 public RewardDomain(ILogger <RewardDomain> logger, IRewardRepository rewardRepository,
                     IPlayerRepository playerRepository)
 {
     this.logger           = logger;
     this.rewardRepository = rewardRepository;
     this.playerRepository = playerRepository;
 }
示例#5
0
 public EventRepository(
     ContextMap contextMap,
     IEventConditionRepository eventConditionRepository,
     IEventContentsRepository eventContentsRepository,
     IRewardRepository rewardRepository) : base(contextMap.EventEntrys)
 {
     this.eventConditionRepository = eventConditionRepository;
     this.eventContentsRepository  = eventContentsRepository;
     this.rewardRepository         = rewardRepository;
 }
示例#6
0
 public ProjectService(IProjectRepository projectRepository
                       , IProjectCategoryRepository projectCategoryRepository
                       , IMemberRepository memberRepository
                       , IDonationRepository donationRepository
                       , IFilterRepository filterRepository
                       , IRewardRepository rewardRepository)
 {
     _projectRepository         = projectRepository;
     _projectCategoryRepository = projectCategoryRepository;
     _memberRepository          = memberRepository;
     _donationRepository        = donationRepository;
     _filterRepository          = filterRepository;
     _rewardRepository          = rewardRepository;
 }
示例#7
0
 public RewardService(
     IRewardRepository rewardRepository,
     IMemberLevelRepository memberLevelRepository,
     IRewardRedemptionRepository rewardRedemptionRepository,
     IConsumerUserRepository consumerUserRepository,
     IBackgroundTaskQueue backgroundTaskQueue,
     IMockBackgroundTaskFactory mockBackgroundTaskFactory)
 {
     _rewardRepository           = rewardRepository;
     _memberLevelRepository      = memberLevelRepository;
     _rewardRedemptionRepository = rewardRedemptionRepository;
     _consumerUserRepository     = consumerUserRepository;
     _backgroundTaskQueue        = backgroundTaskQueue;
     _mockBackgroundTaskFactory  = mockBackgroundTaskFactory;
 }
示例#8
0
 public DataAccess(IBuisenessBookRepository buisenessBooks, ICommandRepository commands,
                   IEducationRepository educations, IEmployeeRepository employees,
                   ILastWorkRepository lastWorks, IPrivateBusinessRepository privateBusinesses,
                   IRegionRepository regions, IRewardRepository rewards,
                   ISubdivisionRepository subdivision, IUserRepository users,
                   IWorkPostRepository workPosts)
 {
     BuisenessBooks    = buisenessBooks;
     Commands          = commands;
     Educations        = educations;
     Employees         = employees;
     LastWorks         = lastWorks;
     PrivateBusinesses = privateBusinesses;
     Regions           = regions;
     Rewards           = rewards;
     Subdivisions      = subdivision;
     Users             = users;
     WorkPosts         = workPosts;
 }
示例#9
0
 public KidController(
     IKidRepository kidRepository,
     IVTaskRepository vTaskRepository,
     IRewardRepository rewardRepository,
     AppDbContext appDbContext,
     IHttpContextAccessor httpContextAccessor,
     UserManager <ApplicationUser> userMananger,
     IWebHostEnvironment hostinEnvironment,
     IStatistic statistic)
 {
     _kidRepository       = kidRepository;
     _vTaskRepository     = vTaskRepository;
     _rewardRepository    = rewardRepository;
     _appDbContext        = appDbContext;
     _httpContextAccessor = httpContextAccessor;
     _userMananger        = userMananger;
     _hostinEnvironment   = hostinEnvironment;
     _statistic           = statistic;
 }
示例#10
0
    public DrawDialogViewModel(int countDown, Action <int> afterHideCallback) : base()
    {
        this.countDown = countDown;
        this.Click     = afterHideCallback;

        ApplicationContext context = Context.GetApplicationContext();

        rewardRepository = context.GetService <IRewardRepository>();

        this.dismissRequest = new InteractionRequest(this);

        confirmCommand = new SimpleCommand(() => {
            this.OnClick(DrawDialog.BUTTON_POSITIVE);
        });
        cancelCommand = new SimpleCommand(() => {
            this.OnClick(DrawDialog.BUTTON_NEGATIVE);
        });

        this.DrawCount = rewardRepository.GetDrawCount();
        this.Money     = rewardRepository.GetMoney();
    }
示例#11
0
 public PayrollServices(IPayrollRepository payrollRepository, ILookupRepository lookupRepository, IEmployeeRepository employeeRepository,
                        IPayrollViewModelFactory payrollViewModelFactory, ILevelGradeRepository levelGradeRepository, ICompanyRepository companyRepository,
                        IEmployeeDeductionRepository employeeDeductionRepository, IRewardRepository rewardRepository, ILoanRepository loanRepository,
                        IEmployeeOnBoardRepository employeeOnBoardRepository, IUsersRepository usersRepository, ILevelRepository levelRepository,
                        IGradeRepository gradeRepository, IBenefitRepository benefitRepository, IDigitalFileRepository digitalFileRepository, ISessionStateService session)
 {
     this.lookupRepository            = lookupRepository;
     this.payrollRepository           = payrollRepository;
     this.payrollViewModelFactory     = payrollViewModelFactory;
     this.levelGradeRepository        = levelGradeRepository;
     this.employeeRepository          = employeeRepository;
     this.employeeDeductionRepository = employeeDeductionRepository;
     this.companyRepository           = companyRepository;
     this.rewardRepository            = rewardRepository;
     this.loanRepository            = loanRepository;
     this.usersRepository           = usersRepository;
     this.levelRepository           = levelRepository;
     this.gradeRepository           = gradeRepository;
     this.benefitRepository         = benefitRepository;
     this.employeeOnBoardRepository = employeeOnBoardRepository;
     this.digitalFileRepository     = digitalFileRepository;
     this.session = session;
 }
示例#12
0
 public RewardService(IUnitOfWork unitOfWork, IRepository <Reward, long> repository) : base(unitOfWork,
                                                                                            repository)
 {
     _rewardRepository = Repository <IRewardRepository>();
     _userRepository   = Repository <IUserRepository>();
 }
示例#13
0
 public GiveRewardConsoleCommand(IRewardRepository rewardRepository, CharacterManager characterManager)
 {
     this.rewardRepository = rewardRepository;
     this.characterManager = characterManager;
 }
示例#14
0
 public RewardCollection(RewardCollectionData data, IRewardRepository rewardRepository)
 {
     this.data             = data;
     this.rewardRepository = rewardRepository;
 }
示例#15
0
 public RewardManager(IRewardRepository rewardRepository)
 {
     _repository = rewardRepository;
 }
示例#16
0
 public RewardService(IRewardRepository rewardRepo)
 {
     _rewardRepo = rewardRepo;
 }
示例#17
0
 public LevelupRewardManager(IRewardRepository rewardRepository)
 {
     this.rewardRepository = rewardRepository;
 }
示例#18
0
 public DumpsterController(IRewardRepository rewardRepository)
 {
     _rewardRepository = rewardRepository;
 }
示例#19
0
 public LevelupReward(LevelupRewardData data, IRewardRepository rewardRepository) : base(data, rewardRepository)
 {
     Level = data.Level;
 }
示例#20
0
 public RewardEffect(RewardEffectData data, List <Validator> validators,
                     IRewardRepository rewardRepository) : base(data, validators)
 {
     this.data             = data;
     this.rewardRepository = rewardRepository;
 }
示例#21
0
    public WheelViewModel()
    {
        WheelItemViewModel itemModel1 = new WheelItemViewModel();

        itemModel1.NormalIcon   = "shengxiao_shu1";
        itemModel1.DisabledIcon = "shengxiao_shu0";
        WheelItemViewModel itemModel2 = new WheelItemViewModel();

        itemModel2.NormalIcon   = "shengxiao_niu1";
        itemModel2.DisabledIcon = "shengxiao_niu0";
        WheelItemViewModel itemModel3 = new WheelItemViewModel();

        itemModel3.NormalIcon   = "shengxiao_hu1";
        itemModel3.DisabledIcon = "shengxiao_hu0";
        WheelItemViewModel itemModel4 = new WheelItemViewModel();

        itemModel4.NormalIcon   = "shengxiao_tu1";
        itemModel4.DisabledIcon = "shengxiao_tu0";
        WheelItemViewModel itemModel5 = new WheelItemViewModel();

        itemModel5.NormalIcon   = "shengxiao_long1";
        itemModel5.DisabledIcon = "shengxiao_long0";
        WheelItemViewModel itemModel6 = new WheelItemViewModel();

        itemModel6.NormalIcon   = "shengxiao_she1";
        itemModel6.DisabledIcon = "shengxiao_she0";
        WheelItemViewModel itemModel7 = new WheelItemViewModel();

        itemModel7.NormalIcon   = "shengxiao_ma1";
        itemModel7.DisabledIcon = "shengxiao_ma0";
        WheelItemViewModel itemModel8 = new WheelItemViewModel();

        itemModel8.NormalIcon   = "shengxiao_yang1";
        itemModel8.DisabledIcon = "shengxiao_yang0";
        WheelItemViewModel itemModel9 = new WheelItemViewModel();

        itemModel9.NormalIcon   = "shengxiao_hou1";
        itemModel9.DisabledIcon = "shengxiao_hou0";
        WheelItemViewModel itemModel10 = new WheelItemViewModel();

        itemModel10.NormalIcon   = "shengxiao_ji1";
        itemModel10.DisabledIcon = "shengxiao_ji0";
        WheelItemViewModel itemModel11 = new WheelItemViewModel();

        itemModel11.NormalIcon   = "shengxiao_gou1";
        itemModel11.DisabledIcon = "shengxiao_gou0";
        WheelItemViewModel itemModel12 = new WheelItemViewModel();

        itemModel12.NormalIcon   = "shengxiao_zhu1";
        itemModel12.DisabledIcon = "shengxiao_zhu0";
        items.Add(itemModel1);
        items.Add(itemModel2);
        items.Add(itemModel3);
        items.Add(itemModel4);
        items.Add(itemModel5);
        items.Add(itemModel6);
        items.Add(itemModel7);
        items.Add(itemModel8);
        items.Add(itemModel9);
        items.Add(itemModel10);
        items.Add(itemModel11);
        items.Add(itemModel12);

        wheelTurnRequest = new InteractionRequest <int>();

        this.cardBagRequest = new InteractionRequest <CardBagViewModel>(this);

        this.drawDialogRequest = new InteractionRequest <DrawDialogNotification>(this);

        this.dismissRequest = new InteractionRequest(this);

        this.payDialogRequest = new InteractionRequest <PayDialogNotification>(this);

        PayDialogNotification payDialogNotification = new PayDialogNotification();

        payDialogNotification.CountDown = 30;

        Action <PayDialogNotification> payCallback = n =>
        {
            if (PayDialog.BUTTON_POSITIVE == n.DialogResult)
            {
                this.drawCommand.Execute(null);
            }
            else if (PayDialog.BUTTON_NEGATIVE == n.DialogResult)
            {
                dismissRequest.Raise();
            }
        };



        this.drawCommand = new SimpleCommand(() => {
            drawCommand.Enabled = false;

            rewardRepository.AddDrawCount();
            awardViewModel.LoadAward();

            int idx = rewardRepository.GetDrawIndex();
            wheelTurnRequest.Raise(idx, (int index) => {
                drawCommand.Enabled = true;

                WheelItemViewModel wheelItemViewModel = items[idx];
                if (wheelIndex != idx)
                {
                    //probability = probability + 10;
                    //wheelItemViewModel.ChangeIcon();

                    //LoadAward();

                    DrawDialogNotification drawDialogNotification = new DrawDialogNotification();
                    drawDialogNotification.CountDown = 30;

                    Action <DrawDialogNotification> callback = n => {
                        if (DrawDialog.BUTTON_POSITIVE == n.DialogResult)
                        {
                            this.payDialogRequest.Raise(payDialogNotification, payCallback); wheelItemViewModel.ChangeIcon();
                        }
                        else if (DrawDialog.BUTTON_NEGATIVE == n.DialogResult)
                        {
                            dismissRequest.Raise();
                        }
                    };
                    this.drawDialogRequest.Raise(drawDialogNotification, callback);
                }
                else
                {
                    CardBagViewModel cardBagViewModel = new CardBagViewModel();

                    cardBagRequest.Raise(cardBagViewModel);
                }
            });
        });
        drawCommand.Enabled = false;

        this.DrawIcon = "suo";
        this.HintIcon = "tishiyu1";

        this.awardViewModel = new AwardViewModel();
        awardViewModel.LoadAward();

        ApplicationContext context = Context.GetApplicationContext();

        rewardRepository = context.GetService <IRewardRepository>();
    }
示例#22
0
 public RewardsController(IRewardRepository rewardRepository, IUserRepository userRepository)
 {
     _rewardRepository = rewardRepository;
     _userRepository   = userRepository;
 }
 public OneTreePlantedController(IRewardRepository rewardRepository)
 {
     _rewardRepository = rewardRepository;
 }
示例#24
0
 public Handler(IRewardRepository repository)
 {
     Repository = repository;
 }
示例#25
0
 public UsersController(IUserRepository userRepository, IRewardRepository rewardRepository)
 {
     _userRepository   = userRepository;
     _rewardRepository = rewardRepository;
 }
示例#26
0
 public RewardService(IRewardRepository rewardRepository, IUnitOfWork unitofwork)
 {
     this.rewardRepository = rewardRepository;
     _unitOfWork           = unitofwork;
 }
示例#27
0
 public RewardService(IRewardRepository rewardRepository)
 {
     _rewardRepository = rewardRepository;
 }
 public PlayerAppearCharacterReserveRepository(IAppearCharacterRepository appearCharacterRepository, IConversationRepository conversationRepository, IRewardRepository rewardRepository, PlayerContextMap playerContextMap) : base(playerContextMap.PlayerAppearCharacterReserveEntrys)
 {
     this.appearCharacterRepository = appearCharacterRepository;
     this.conversationRepository    = conversationRepository;
     this.rewardRepository          = rewardRepository;
 }
示例#29
0
 public RewardService(IRewardRepository rewardRepository, ITransactionScopeProvider transactionScopeProvider, IAchievementService achievementService)
 {
     this.rewardRepository         = rewardRepository;
     this.transactionScopeProvider = transactionScopeProvider;
     this.achievementService       = achievementService;
 }