File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Windows ;
33
4- namespace SysadminsLV . Asn1Editor . API . Utils . WPF {
5- abstract class WindowFactoryBase {
6- protected Window hwnd ;
7- void setParent ( Boolean mainWindowAsParent = false ) {
8- WindowCollection windows = Application . Current . Windows ;
9- Window parent = null ;
10- if ( windows . Count > 0 )
11- {
12- parent = mainWindowAsParent
13- ? windows [ 0 ]
14- : windows [ windows . Count - 2 ] ;
15- }
4+ namespace SysadminsLV . Asn1Editor . API . Utils . WPF ;
5+ abstract class WindowFactoryBase {
6+ protected Window hwnd ;
7+ void setParent ( Boolean mainWindowAsParent = false ) {
8+ WindowCollection windows = Application . Current . Windows ;
9+ Window parent = null ;
10+ if ( windows . Count > 0 ) {
11+ parent = mainWindowAsParent
12+ ? windows [ 0 ]
13+ : windows [ windows . Count - 2 ] ;
1614 }
15+
1716 hwnd . Owner = parent ;
1817 }
18+
1919 protected void ShowAsWindow ( Boolean mainWindowAsParent = false ) {
2020 setParent ( mainWindowAsParent ) ;
2121 hwnd . Show ( ) ;
You can’t perform that action at this time.
0 commit comments