public static void Update(Primitive chartName)
{
Type GraphicsWindowType = typeof(GraphicsWindow);
Dictionary<string, UIElement> _objectsMap;
UIElement obj;
try
{
_objectsMap = (Dictionary<string, UIElement>)GraphicsWindowType.GetField("_objectsMap", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.IgnoreCase).GetValue(null);
if (_objectsMap.TryGetValue((string)chartName, out obj))
{
InvokeHelper ret = new InvokeHelper(delegate
{
try
{
if (obj.GetType() == typeof(Chart))
{
Chart chart = (Chart)obj;
chart.Update();
}
}
catch (Exception ex)
{
Utilities.OnError(Utilities.GetCurrentMethod(), ex);
}
});
FastThread.Invoke(ret);
}
else
{
Utilities.OnShapeError(Utilities.GetCurrentMethod(), chartName);
}
}
catch (Exception ex)
{
Utilities.OnError(Utilities.GetCurrentMethod(), ex);
}
}