@@ -62,7 +62,6 @@ public AddBuildServer(ICruiseProjectManagerFactory cruiseProjectManagerFactory)
6262 LoadExtensions ( ) ;
6363 }
6464
65-
6665 /// <summary>
6766 /// Clean up any resources being used.
6867 /// </summary>
@@ -369,6 +368,7 @@ private void InitializeComponent()
369368 this . btnConfigureExtension . TabIndex = 20 ;
370369 this . btnConfigureExtension . Text = "Configure Extension" ;
371370 this . btnConfigureExtension . UseVisualStyleBackColor = true ;
371+ this . btnConfigureExtension . Click += new EventHandler ( btnConfigureExtension_Click ) ;
372372 //
373373 // cmbExtension
374374 //
@@ -381,6 +381,7 @@ private void InitializeComponent()
381381 this . cmbExtension . Size = new System . Drawing . Size ( 609 , 21 ) ;
382382 this . cmbExtension . Sorted = true ;
383383 this . cmbExtension . TabIndex = 18 ;
384+ this . cmbExtension . SelectedIndexChanged += new EventHandler ( cmbExtension_SelectedIndexChanged ) ;
384385 //
385386 // label6
386387 //
@@ -582,15 +583,36 @@ private BuildServer ConstructBuildServerFromSelectedOptions()
582583 return null ;
583584 }
584585
585-
586-
587586 private void LoadExtensions ( )
588587 {
589588 cmbExtension . Items . Clear ( ) ;
590589 string extensionsPath = Path . Combine ( Environment . CurrentDirectory , "Extensions" ) ;
591590 cmbExtension . Items . AddRange ( ExtensionHelpers . QueryAssembliesForTypes ( extensionsPath , "ITransportExtension" ) ) ;
592591 }
593592
593+ /// <summary>
594+ /// Call configure on the Transport extension, as defined in ITransportExtension
595+ /// </summary>
596+ void btnConfigureExtension_Click ( object sender , EventArgs e )
597+ {
598+ if ( transportExtension != null )
599+ {
600+ transportExtension . Configure ( this ) ;
601+ }
602+ }
603+
604+ /// <summary>
605+ /// Load the Transport extension, this method will throw if the extension cannot be loaded.
606+ /// </summary>
607+ void cmbExtension_SelectedIndexChanged ( object sender , EventArgs e )
608+ {
609+ if ( cmbExtension . SelectedIndex >= 0 )
610+ {
611+ // try loading the transport extension...
612+ transportExtension = ExtensionHelpers . RetrieveExtension ( cmbExtension . SelectedItem . ToString ( ) ) ;
613+ }
614+ }
615+
594616 private void panel4_Paint ( object sender , PaintEventArgs e )
595617 {
596618
0 commit comments