@@ -54,7 +54,7 @@ private async void Operation_Load(object sender, EventArgs e)
54
54
55
55
byteTotal = FPM . SizeTracker . ToDownload ;
56
56
}
57
- else if ( FPM . OperateMode != 3 )
57
+ else
58
58
{
59
59
Text = "Modifying Flashpoint..." ;
60
60
CancelButton . Visible = false ;
@@ -93,15 +93,6 @@ private async void Operation_Load(object sender, EventArgs e)
93
93
94
94
byteTotal = removedComponents . Concat ( addedComponents ) . Sum ( item => item . Size ) ;
95
95
}
96
- else if ( FPM . OperateMode == 3 )
97
- {
98
- Text = "Removing Flashpoint..." ;
99
- CancelButton . Visible = false ;
100
-
101
- await Task . Run ( RemoveFlashpoint ) ;
102
-
103
- FinishOperation ( ) ;
104
- }
105
96
106
97
foreach ( var component in removedComponents )
107
98
{
@@ -154,6 +145,8 @@ await Task.Run(() =>
154
145
} ) ;
155
146
}
156
147
148
+ TaskbarManager . Instance . SetProgressState ( TaskbarProgressBarState . NoProgress , FPM . Main . Handle ) ;
149
+
157
150
FinishOperation ( ) ;
158
151
}
159
152
}
@@ -310,36 +303,6 @@ private void RemoveComponents()
310
303
FPM . DeleteFileAndDirectories ( infoFile ) ;
311
304
}
312
305
313
- private void RemoveFlashpoint ( )
314
- {
315
- string [ ] files = Directory . GetFiles ( FPM . SourcePath2 ) ;
316
-
317
- for ( int i = 0 ; i < files . Length ; i ++ )
318
- {
319
- double progress = ( i + 1 ) / files . Length ;
320
- string fileName = files [ i ] . Substring ( files [ i ] . LastIndexOf ( @"\" ) ) ;
321
-
322
- ProgressMeasure . Invoke ( ( MethodInvoker ) delegate
323
- {
324
- ProgressMeasure . Value = ( int ) ( ( double ) progress * ProgressMeasure . Maximum ) ;
325
- } ) ;
326
-
327
- ProgressLabel . Invoke ( ( MethodInvoker ) delegate
328
- {
329
- ProgressLabel . Text = $ "[{ ( int ) ( ( double ) progress * 100 ) } %] Removing \" { fileName } \" ... { i + 1 } of { files . Length } files";
330
- } ) ;
331
-
332
- File . Delete ( files [ i ] ) ;
333
- }
334
-
335
- ProgressLabel . Invoke ( ( MethodInvoker ) delegate
336
- {
337
- ProgressLabel . Text = $ "[100%] Removing directories...";
338
- } ) ;
339
-
340
- Directory . Delete ( FPM . SourcePath2 , true ) ;
341
- }
342
-
343
306
private async void FinishOperation ( )
344
307
{
345
308
if ( FPM . OperateMode == 0 )
@@ -373,25 +336,6 @@ await Task.Run(() =>
373
336
var finishWindow = new FinishOperation ( ) ;
374
337
finishWindow . ShowDialog ( ) ;
375
338
}
376
- else if ( FPM . OperateMode == 3 )
377
- {
378
- if ( FPM . Main . RemoveShortcuts . Checked )
379
- {
380
- var shortcutPaths = new List < string > ( )
381
- {
382
- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . StartMenu ) , "Flashpoint.lnk" ) ,
383
- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . Desktop ) , "Flashpoint.lnk" )
384
- } ;
385
-
386
- foreach ( string path in shortcutPaths ) if ( File . Exists ( path ) ) File . Delete ( path ) ;
387
- }
388
-
389
- Hide ( ) ;
390
- FPM . Main . Hide ( ) ;
391
-
392
- var finishWindow = new FinishOperation ( ) ;
393
- finishWindow . ShowDialog ( ) ;
394
- }
395
339
396
340
Close ( ) ;
397
341
}
0 commit comments