public void CopyFrom(Variable variable) { Value = variable.Value; Label = variable.Label; IsVisible = variable.IsVisible; IsSelectable = variable.IsSelectable; IsSelected = variable.IsSelected; }
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]); }
private void OnSelectedVariableChanged(Variable variable) { _selectedVariable = variable; if (variable != null && variable.IsSelected) SetComputeButtonText(variable.Label); }