File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11using System . IO ;
22using System . Windows ;
33using System . Windows . Controls ;
4+ using _1RM . Utils ;
45using _1RM . Utils . KiTTY ;
56using _1RM . Utils . KiTTY . Model ;
67using Shawn . Utils . Wpf . FileSystem ;
@@ -16,18 +17,18 @@ public SerialFormView()
1617
1718 private void ButtonSelectSessionConfigFile_OnClick ( object sender , RoutedEventArgs e )
1819 {
19- if ( DataContext is IKittyConnectable pc )
20+ if ( DataContext is SerialFormViewModel vm )
2021 {
2122 var path = SelectFileHelper . OpenFile ( filter : "KiTTY Session|*.*" ) ;
2223 if ( path == null ) return ;
23- if ( File . Exists ( path )
24- && KittyConfig . Read ( path ) ? . Count > 0 )
24+ if ( File . Exists ( path ) && KittyConfig . Read ( path ) ? . Count > 0 )
2525 {
26- pc . ExternalKittySessionConfigPath = path ;
26+ vm . New . ExternalKittySessionConfigPath = path ;
2727 }
2828 else
2929 {
30- pc . ExternalKittySessionConfigPath = "" ;
30+ vm . New . ExternalKittySessionConfigPath = "" ;
31+ MessageBoxHelper . Warning ( "Invalid KiTTY session config file." ) ;
3132 }
3233 }
3334 }
You can’t perform that action at this time.
0 commit comments