private void Subtract()
        {
            if (Int32.TryParse(_amount, out int amount))
            {
                _result = _initialValue - amount;
            }

            AcceptSelected?.Invoke(this, EventArgs.Empty);
        }
 private void OnAccept()
 {
     if (String.IsNullOrWhiteSpace(_encounterCreatureModel.Name))
     {
         _dialogService.ShowConfirmationDialog("Required Field", "Name is required.", "OK", null, null);
     }
     else
     {
         AcceptSelected?.Invoke(this, EventArgs.Empty);
     }
 }
 private void OnAccept()
 {
     if (_monsters.Any())
     {
         if (_dialogService.ShowConfirmationDialog("Replace Monsters", "Replace all monsters in the encounter with the randomly generated monsters?", "Yes", "No", null) == true)
         {
             AcceptSelected?.Invoke(this, EventArgs.Empty);
         }
     }
     else
     {
         RejectSelected?.Invoke(this, EventArgs.Empty);
     }
 }
Exemplo n.º 4
0
        private void Accept()
        {
            foreach (EncounterCreatureViewModel character in _characters)
            {
                EncounterCreatureViewModel viewModel = _creatures.FirstOrDefault(x => x.EncounterCreatureModel.ID == character.EncounterCreatureModel.ID);
                if (viewModel != null)
                {
                    viewModel.Initiative = character.Initiative;
                }
            }

            foreach (EncounterCreatureViewModel monster in _monsters)
            {
                EncounterCreatureViewModel viewModel = _creatures.FirstOrDefault(x => x.EncounterCreatureModel.ID == monster.EncounterCreatureModel.ID);
                if (viewModel != null)
                {
                    viewModel.Initiative = monster.Initiative;
                }
            }

            AcceptSelected?.Invoke(this, EventArgs.Empty);
        }
 private void OnAccept()
 {
     AcceptSelected?.Invoke(this, EventArgs.Empty);
 }
Exemplo n.º 6
0
 protected virtual void OnAccept()
 {
     AcceptSelected?.Invoke(this, EventArgs.Empty);
 }
Exemplo n.º 7
0
 protected void Accept()
 {
     AcceptSelected?.Invoke(this, EventArgs.Empty);
 }