void IBitmapConsumer.Process() { if (provider != null) { if (provider is IUpdatableObject) { IUpdatableObject up = provider as IUpdatableObject; if (up.Update != null) { up.Update(); } } pBmp = provider.Bitmap; if (pBmp != null) { draw(); } } }
private void buttonUpdate_Click(object sender, System.EventArgs e) { try { if (component is IObjectLabel) { IObjectLabel lab = component as IObjectLabel; ICategoryObject obj = lab.Object; if (obj is IUpdatableObject) { IUpdatableObject updatable = obj as IUpdatableObject; if (updatable.Update != null) { updatable.Update(); } } } else if (component is IArrowLabel) { IArrowLabel lab = component as IArrowLabel; ICategoryArrow arrow = lab.Arrow; if (arrow is IUpdatableObject) { IUpdatableObject updatable = arrow as IUpdatableObject; if (updatable.Update != null) { updatable.Update(); } } } } catch (Exception ex) { ex.ShowError(10); } }