@@ -34,10 +34,7 @@ public ConnectionDialog(IConnectionInfo cxInfo)
3434 InitializeComponent ( ) ;
3535 }
3636
37- void btnOK_Click ( object sender , RoutedEventArgs e )
38- {
39- DialogResult = true ;
40- }
37+ private void btnOK_Click ( object sender , RoutedEventArgs e ) => DialogResult = true ;
4138
4239 void BrowseAssembly ( object sender , RoutedEventArgs e )
4340 {
@@ -48,21 +45,23 @@ void BrowseAssembly(object sender, RoutedEventArgs e)
4845 } ;
4946
5047 if ( dialog . ShowDialog ( ) == true )
48+ {
5149 cxInfo . CustomTypeInfo . CustomAssemblyPath = dialog . FileName ;
50+ }
5251 }
5352
54- void ChooseType ( object sender , RoutedEventArgs e )
53+ private void ChooseType ( object sender , RoutedEventArgs e )
5554 {
56- string assemPath = cxInfo . CustomTypeInfo . CustomAssemblyPath ;
57- if ( assemPath . Length == 0 )
55+ string assemblyPath = cxInfo . CustomTypeInfo . CustomAssemblyPath ;
56+ if ( assemblyPath . Length == 0 )
5857 {
5958 MessageBox . Show ( "First enter a path to an assembly." ) ;
6059 return ;
6160 }
6261
63- if ( ! File . Exists ( assemPath ) )
62+ if ( ! File . Exists ( assemblyPath ) )
6463 {
65- MessageBox . Show ( "File '" + assemPath + "' does not exist." ) ;
64+ MessageBox . Show ( "File '" + assemblyPath + "' does not exist." ) ;
6665 return ;
6766 }
6867
@@ -82,8 +81,11 @@ void ChooseType(object sender, RoutedEventArgs e)
8281 return ;
8382 }
8483
85- string result = ( string ) LINQPad . Extensibility . DataContext . UI . Dialogs . PickFromList ( "Choose Custom Type" , customTypes ) ;
86- if ( result != null ) cxInfo . CustomTypeInfo . CustomTypeName = result ;
84+ var result = ( string ) LINQPad . Extensibility . DataContext . UI . Dialogs . PickFromList ( "Choose Custom Type" , customTypes ) ;
85+ if ( result != null )
86+ {
87+ cxInfo . CustomTypeInfo . CustomTypeName = result ;
88+ }
8789 }
8890 }
8991}
0 commit comments