You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(animate&parentDictionary[entryName]!=null&GetPowerState().ACLineStatus==ACLineStatus.Online)//Fade animation is enabled and value is not null.
162
+
if(animate&parentDictionary[entryName]!=null&GetPowerState().ACLineStatus==ACLineStatus.Online&parentDictionary[entryName]asSolidColorBrush!=null)//Fade animation is enabled , type is solidcolorbrush and value is not null.
163
163
{
164
-
try
164
+
ColorAnimationanimation=newColorAnimation()
165
165
{
166
-
ColorAnimationanimation=newColorAnimation()
167
-
{
168
-
From=((SolidColorBrush)parentDictionary[entryName]).Color,//The old color
169
-
To=((SolidColorBrush)newValue).Color,//The new color
170
-
Duration=newDuration(newTimeSpan(0,0,0,0,DURATION_MS))//Set the duration
171
-
};
172
-
(parentDictionary[entryName]asSolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty,animation);//Begin the animation
173
-
}
174
-
catch
175
-
{
176
-
System.Diagnostics.Debug.WriteLine(@"The argument :"+nameof(newValue)+" is not a brush.");
177
-
parentDictionary[entryName]=newValue;//Set the value normally if type is incorrect
178
-
}
166
+
From=((SolidColorBrush)parentDictionary[entryName]).Color,//The old color
167
+
To=((SolidColorBrush)newValue).Color,//The new color
168
+
Duration=newDuration(newTimeSpan(0,0,0,0,DURATION_MS))//Set the duration
169
+
};
170
+
(parentDictionary[entryName]asSolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty,animation);//Begin the animation
179
171
}
180
172
else
181
173
parentDictionary[entryName]=newValue;//Set value normally
0 commit comments