File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -108,24 +108,9 @@ public static void LogException(Exception ex)
108
108
#region Utility Functions
109
109
public static void ShowWindow ( object data , bool showAsDialog )
110
110
{
111
- var impl = ( Views . ChromelessWindow target , bool isDialog ) =>
112
- {
113
- if ( Current ? . ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow : { } owner } )
114
- {
115
- if ( isDialog )
116
- target . ShowDialog ( owner ) ;
117
- else
118
- target . Show ( owner ) ;
119
- }
120
- else
121
- {
122
- target . Show ( ) ;
123
- }
124
- } ;
125
-
126
111
if ( data is Views . ChromelessWindow window )
127
112
{
128
- impl ( window , showAsDialog ) ;
113
+ Show ( window , showAsDialog ) ;
129
114
return ;
130
115
}
131
116
@@ -142,7 +127,22 @@ public static void ShowWindow(object data, bool showAsDialog)
142
127
if ( window != null )
143
128
{
144
129
window . DataContext = data ;
145
- impl ( window , showAsDialog ) ;
130
+ Show ( window , showAsDialog ) ;
131
+ }
132
+ }
133
+
134
+ private static void Show ( Views . ChromelessWindow target , bool showAsDialog )
135
+ {
136
+ if ( Current ? . ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow : { } owner } )
137
+ {
138
+ if ( showAsDialog )
139
+ target . ShowDialog ( owner ) ;
140
+ else
141
+ target . Show ( owner ) ;
142
+ }
143
+ else
144
+ {
145
+ target . Show ( ) ;
146
146
}
147
147
}
148
148
You can’t perform that action at this time.
0 commit comments