Ejemplo n.º 1
0
        private void InitializeData(SettingsRakeBackViewModelInfo <BonusModel> info)
        {
            infoViewModel = info;
            settingsModel = infoViewModel?.Model;

            BonusName = settingsModel?.BonusName ?? string.Empty;
            Player    = StorageModel.PlayerCollection.OfType <PlayerCollectionItem>().FirstOrDefault(pl => pl.DecodedName == (settingsModel?.Player ?? string.Empty));
            Date      = settingsModel?.Date ?? DateTime.Now;
            Amount    = settingsModel?.Amount ?? 0m;
        }
Ejemplo n.º 2
0
        private void InitializeData(SettingsRakeBackViewModelInfo <RakeBackModel> info)
        {
            infoViewModel = info;
            settingsModel = infoViewModel?.Model;

            RakeBackName = settingsModel?.RakeBackName ?? string.Empty;
            Player       = StorageModel.PlayerCollection.OfType <PlayerCollectionItem>()
                           .FirstOrDefault(pl => pl.PlayerId == settingsModel?.PlayerId);

            DateBegan  = settingsModel?.DateBegan ?? DateTime.Now;
            Percentage = settingsModel?.Percentage ?? 0m;
        }
        private void EditBonus(object obj)
        {
            var viewModelInfo = new SettingsRakeBackViewModelInfo <BonusModel>
            {
                Model = (obj as BonusModel),
                Close = PopupModel.ClosePopup,
                Add   = AddBonus
            };

            var viewModel = new SettingsBonusesAddEditViewModel(viewModelInfo);

            PopupModel.OpenPopup(viewModel);
        }
        private void EditRakeBack(object obj)
        {
            var viewModelInfo = new SettingsRakeBackViewModelInfo <RakeBackModel>
            {
                Model = (obj as RakeBackModel),
                Close = PopupModel.ClosePopup,
                Add   = AddRakeBack
            };

            var viewModel = new SettingsRakeBackAddEditViewModel(viewModelInfo);

            PopupModel.OpenPopup(viewModel);
        }
Ejemplo n.º 5
0
 internal SettingsBonusesAddEditViewModel(SettingsRakeBackViewModelInfo <BonusModel> info)
 {
     InitializeBindings();
     InitializeData(info);
 }