You are on page 1of 2

Hi Bruce_Qin,

Let's say you have 2 classes:


- GUI (your Winform)
- NXDiag (your UI Block Styler dialog)
What you can do is using 'show' and 'hide' methods:
Class GUI
...
...
void showUIBlockStyler(){
NXDiag myNewDialog = new NXDiag(this);
this.hide();
myNewDialog.show();
}
Now your Winform will hide and the NXDialog will pop up.

Class NXDiag
...
private GUI myReferenceToWinForm
void NXDiag(GUI myCaller){
myReferenceToWinForm = myCaller
}
public int apply_cb(){
// do something
myReferenceToWinForm.show()
}
In the constructor you have to set a reference to the GUI.

In the method apply_cb you have to do whatever you want to do with your
BlockStyler and after

doing that just say 'show' to the GUI.

Hope that helps!

You might also like