Esempio n. 1
0
		public void CopyFrom(Variable variable)
		{
			Value = variable.Value;
			Label = variable.Label;
			IsVisible = variable.IsVisible;
			IsSelectable = variable.IsSelectable;
			IsSelected = variable.IsSelected;
		}
Esempio n. 2
0
		public CalculatorViewModel()
		{
			Scenarios = _staticScenarios;

			Rate = new Variable(OnSelectedVariableChanged);
			PresentValue = new Variable(OnSelectedVariableChanged);
			FutureValue = new Variable(OnSelectedVariableChanged);
			Payment = new Variable(OnSelectedVariableChanged);
			Periods = new Variable(OnSelectedVariableChanged);

			SelectScenario(Scenarios[0]);
		}
Esempio n. 3
0
		private void OnSelectedVariableChanged(Variable variable)
		{
			_selectedVariable = variable;
			if (variable != null && variable.IsSelected)
				SetComputeButtonText(variable.Label);
		}