594 |
} |
} |
595 |
set |
set |
596 |
{ |
{ |
597 |
topLevel = value; |
// Brubbel recreate toolkitwindow, if exists |
598 |
|
if( value != topLevel ) { |
599 |
|
topLevel = value; |
600 |
|
if( null != toolkitWindow ) { |
601 |
|
Control [] copy = new Control[this.Controls.Count]; |
602 |
|
this.Controls.CopyTo( copy, 0 ); |
603 |
|
this.Controls.Clear();; |
604 |
|
toolkitWindow.Destroy(); |
605 |
|
toolkitWindow = null; |
606 |
|
this.CreateHandle(); |
607 |
|
this.Controls.AddRange( copy ); |
608 |
|
} |
609 |
|
} |
610 |
} |
} |
611 |
} |
} |
612 |
public bool TopMost |
public bool TopMost |
748 |
return ((mdiParent == null) && TopLevel); |
return ((mdiParent == null) && TopLevel); |
749 |
} |
} |
750 |
} |
} |
751 |
|
|
752 |
|
|
753 |
// Get the current state of a window decoration flag. |
// Get the current state of a window decoration flag. |
754 |
private bool GetWindowFlag(ToolkitWindowFlags flag) |
private bool GetWindowFlag(ToolkitWindowFlags flag) |
943 |
|
|
944 |
// Make the form visible. |
// Make the form visible. |
945 |
Visible = true; |
Visible = true; |
946 |
|
Activate(); |
947 |
|
|
948 |
// Enter a message loop until the dialog result is set. |
// Enter a message loop until the dialog result is set. |
949 |
Application.InnerMessageLoop(this); |
Application.InnerMessageLoop(this); |
952 |
{ |
{ |
953 |
// Make sure that the form is not visible. |
// Make sure that the form is not visible. |
954 |
Visible = false; |
Visible = false; |
|
|
|
955 |
// The form is no longer modal. |
// The form is no longer modal. |
956 |
SetWindowFlag(ToolkitWindowFlags.Modal, false); |
SetWindowFlag(ToolkitWindowFlags.Modal, false); |
957 |
} |
} |