File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 452
452
Skip startup window
453
453
</CheckBox >
454
454
455
+ <Button VerticalAlignment =" Center"
456
+ Command =" {Binding OpenLogCommand}"
457
+ Margin =" 10" >
458
+ Open log...
459
+ </Button >
460
+
455
461
</StackPanel >
456
462
457
463
</Grid >
Original file line number Diff line number Diff line change 2
2
using Avalonia . Platform . Storage ;
3
3
using Avalonia . Styling ;
4
4
using Common . Client . Enums ;
5
+ using Common . Client . Helpers ;
5
6
using Common . Client . Interfaces ;
6
7
using Common . Common . Helpers ;
7
8
using Common . Enums ;
10
11
using CommunityToolkit . Mvvm . ComponentModel ;
11
12
using CommunityToolkit . Mvvm . Input ;
12
13
using Games . Providers ;
14
+ using System . Diagnostics ;
13
15
14
16
namespace Avalonia . Desktop . ViewModels ;
15
17
@@ -454,5 +456,22 @@ private async Task OpenFilePickerAsync()
454
456
OnPropertyChanged ( nameof ( PathToDuke64 ) ) ;
455
457
}
456
458
459
+
460
+ /// <summary>
461
+ /// Open log file
462
+ /// </summary>
463
+ [ RelayCommand ]
464
+ private void OpenLog ( )
465
+ {
466
+ if ( File . Exists ( ClientProperties . PathToLogFile ) )
467
+ {
468
+ using var _ = Process . Start ( new ProcessStartInfo
469
+ {
470
+ FileName = ClientProperties . PathToLogFile ,
471
+ UseShellExecute = true
472
+ } ) ;
473
+ }
474
+ }
475
+
457
476
#endregion
458
477
}
You can’t perform that action at this time.
0 commit comments