Ejemplo n.º 1
0
 public void ResetCalculator()
 {
     _calculator.Reset();
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TotalTxt"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TipTxt"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TipPercentTxt"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TipPercent"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("GrandTotalTxt"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("NumberOfPersons"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TotalPerPersonTxt"));
 }
        public void ResetCalculator()
        {
            _calculator.Reset();
            TotalTxt = _calculator.Total.ToString();

            RaisePropertyChanged(() => TotalTxt);
            RaisePropertyChanged(() => TipTxt);
            RaisePropertyChanged(() => TipPercentTxt);
            RaisePropertyChanged(() => TipPercent);
            RaisePropertyChanged(() => GrandTotalTxt);
            RaisePropertyChanged(() => NumberOfPersons);
            RaisePropertyChanged(() => TotalPerPersonTxt);
        }