Hi, I'm making an Application with a Login and a Main Windows. First of all I couldn't make the Login Window modal but I make a temporal patch and I starting the Login Window as the principal and then calling the Main Window:
 

LoginWindow.cs

public void Show(){

Application.Init();

XML gxml = new XML(null, "CoolMessenger.glade_widgets.cool-messenger.glade", "W_LoginWindow", null);

gxml.Autoconnect(this);

Application.Run();

}

 

private void whenFinished(IAsyncResult ar){

//Do login verifications....

_UserData = new UserData(Tb_Alias.Text, Tb_Password.Text);

W_LoginWindow.Destroy();

new MainWindow(_UserData);

}

 

 

MainWindow.cs

public MainWindow(UserData userData){

XML gxml = new XML(null, "CoolMessenger.glade_widgets.cool-messenger.glade", "W_MainWindow", null);

gxml.Autoconnect(this);

....Some user data stuff

}

But the MainWindow, also designed in glade, doesn't wake up and the application freeze. I try inserting Application.Init and Application.Run in the MainWindow also and the Window is shown nothing works.
 
Any help?
 
 
                         Thanks, Ajadex.

Reply via email to