public double? A
{
get { return A_; }
set
{
//Raising property changing before it gets changed to backup the old value
this.MultiPropertyChanging("A");
A_ = value;
this.MultiPropertyChanged("A");
this.UpdateProperty("D", "E", "F", "G", "H", "I", "J", "K");
//this.MultiPropertyChanging("D", "E", "F", "G", "H", "I", "J", "K");
//this.MultiPropertyChanged("D", "E", "F", "G", "H", "I", "J", "K");
if (Table1 != null)
{
Table1.OnPropertyChanged("A");
Table1.OnPropertyChanging("A");
}
}
} |
internal void UpdateProperty(params string[] Prop)
{
foreach (var propertyName in Prop)
{
if(propertyName == "D")
D = A + B;
if (propertyName == "E")
E = A + C;
if (propertyName == "F")
F = D + E;
if (propertyName == "G")
G = F + C;
if (propertyName == "H")
H = F + G;
if (propertyName == "I")
I = G + H;
if (propertyName == "J")
J = E + I;
if (propertyName == "K")
K = I + J;
}
}
private double? D_;
public double? D
{
get { return D_; }
set
{
OnPropertyChanging("D");
D_ = value;
OnPropertyChanged("D");
}
//get { return A + B; }
} |