@@ -40,14 +40,16 @@ protected void InitializePatcher()
4040 TableLayout formPanel = this . FormPanel ;
4141 formPanel . Spacing = new Size ( 5 , 5 ) ;
4242 formPanel . Padding = new Padding ( 0 , 0 , 0 , 10 ) ;
43+
44+ StackLayout layout ;
4345
4446 this . Content = new Splitter
4547 {
4648 Orientation = Orientation . Vertical ,
4749 Panel1 = formPanel ,
4850
4951 // ReSharper disable once RedundantExplicitParamsArrayCreation
50- Panel2 = new StackLayout ( new StackLayoutItem [ ]
52+ Panel2 = layout = new StackLayout ( new StackLayoutItem [ ]
5153 {
5254 this . _messages ,
5355 new Button ( this . Guide ) { Text = "View guide" } ,
@@ -62,6 +64,9 @@ protected void InitializePatcher()
6264 } ,
6365 } ;
6466
67+ foreach ( Button button in this . AddExtraButtons ( ) )
68+ layout . Items . Add ( button ) ;
69+
6570 this . UrlField . TextChanged += this . Reverify ;
6671 this . UrlField . PlaceholderText = "http://localhost:10061/lbp" ;
6772 }
@@ -75,10 +80,7 @@ protected void InitializePatcher()
7580 } ;
7681
7782 control = new TControl ( ) ;
78- if ( forceHeight != - 1 )
79- {
80- control . Height = forceHeight ;
81- }
83+ if ( forceHeight != - 1 ) control . Height = forceHeight ;
8284
8385 if ( button != null )
8486 {
@@ -97,6 +99,11 @@ public virtual void CompletePatch(object? sender, EventArgs e)
9799 // Not necessary for some patchers maybe
98100 }
99101
102+ public virtual IEnumerable < Button > AddExtraButtons ( )
103+ {
104+ return Array . Empty < Button > ( ) ;
105+ }
106+
100107 public virtual void Guide ( object ? sender , EventArgs e )
101108 {
102109 MessageBox . Show ( "No guide exists for this patch method yet, so stay tuned!" , MessageBoxType . Warning ) ;
@@ -120,10 +127,8 @@ private void Autodiscover(object? sender, EventArgs arg)
120127 {
121128 try
122129 {
123- using HttpClient client = new ( )
124- {
125- BaseAddress = new Uri ( this . UrlField . Text ) ,
126- } ;
130+ using HttpClient client = new ( ) ;
131+ client . BaseAddress = new Uri ( this . UrlField . Text ) ;
127132
128133 HttpResponseMessage response = client . GetAsync ( "/autodiscover" ) . Result ;
129134 response . EnsureSuccessStatusCode ( ) ;
0 commit comments