File tree 2 files changed +11
-14
lines changed
2 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -149,19 +149,6 @@ private async Task Connect()
149
149
150
150
while ( ( DateTime . Now - startTime ) . TotalSeconds < 10 )
151
151
{
152
- // Fix for netcore3.1 https://stackoverflow.com/questions/60342879/process-mainwindowhandle-is-non-zero-in-net-framework-but-zero-in-net-core-unl
153
- /*
154
- try
155
- {
156
- _process = Process.GetProcessById(_process.Id);
157
- }
158
- catch
159
- {
160
- break; // Process has exited
161
- }
162
- */
163
-
164
-
165
152
_process . Refresh ( ) ;
166
153
167
154
if ( _process . HasExited )
@@ -200,7 +187,10 @@ private async Task Connect()
200
187
201
188
IsConnected = true ;
202
189
203
- // Resize embedded application & refresh
190
+ // Resize embedded application & refresh
191
+ // Requires a short delay because it'S not applied immediately
192
+ await Task . Delay ( 500 ) ;
193
+
204
194
ResizeEmbeddedWindow ( ) ;
205
195
}
206
196
}
Original file line number Diff line number Diff line change 13
13
using NETworkManager . Settings ;
14
14
using System . Threading . Tasks ;
15
15
using System . Windows ;
16
+ using System . Diagnostics ;
16
17
17
18
namespace NETworkManager . ViewModels
18
19
{
@@ -396,6 +397,12 @@ private void StopDelayedSearch()
396
397
397
398
public void RefreshProfiles ( )
398
399
{
400
+ if ( Profiles == null )
401
+ {
402
+ Debug . WriteLine ( "Profiles is null" ) ;
403
+ return ;
404
+ }
405
+
399
406
Profiles . Refresh ( ) ;
400
407
}
401
408
#endregion
You can’t perform that action at this time.
0 commit comments