c# - refresh panel content when modal child is shown -
c# - refresh panel content when modal child is shown -
i have main form panel drawn 3d scene. ok.
after create modal form go modify things in 3d scene, , wish see result straight without closing modal form, until close form, no changes in '3d' panel.
i tried this:
my3dpanel.invalidate();
with nil changes;
my3dpanel.refresh();
with panel take 'background' init color until close modal form.
how can this?
to refresh created static class this:
public static class editorhelper { public delegate void refreshbridgeeventhandler(); public static event refreshbridgeeventhandler refreshbridgeevent; public static void needtonotifyparent() { if (refreshbridgeevent != null) { refreshbridgeevent(); } } }
and main window:
public frmmain() { initializecomponent(); editorhelper.refreshbridgeevent += editorhelper_refreshbridgeevent; } void editorhelper_refreshbridgeevent() { my3dpanel.invalidate(); my3dpanel.refresh(); this.refresh(); }
c# winforms visual-studio-2010 modal-dialog
Comments
Post a Comment