Move Resize event handler use to later in main form init

This commit is contained in:
Travis Nickles 2018-12-06 02:57:30 -06:00
parent 323bde6513
commit 145ddb01ba
3 changed files with 36 additions and 36 deletions

View File

@ -1374,7 +1374,6 @@
this.Controls.Add(this.pnlButton);
this.Name = "DS4Form";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScpForm_Closing);
this.Resize += new System.EventHandler(this.Form_Resize);
this.pnlButton.ResumeLayout(false);
this.pnlButton.PerformLayout();
this.cMTaskbar.ResumeLayout(false);

View File

@ -396,6 +396,7 @@ namespace DS4Windows
}
instance = this;
this.Resize += Form_Resize;
Form_Resize(null, null);
if (btnStartStop.Enabled && start)
TaskRunner.Delay(50).ContinueWith((t) => this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked())));

View File

@ -445,10 +445,10 @@
<value>NoControl</value>
</data>
<data name="bnLight3.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 89</value>
<value>746, 89</value>
</data>
<data name="bnLight3.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value>
<value>147, 22</value>
</data>
<data name="bnLight3.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
@ -472,7 +472,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus1.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 34</value>
<value>347, 34</value>
</data>
<data name="pBStatus1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -574,7 +574,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC3.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 89</value>
<value>706, 89</value>
</data>
<data name="bnEditC3.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value>
@ -604,7 +604,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC4.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 117</value>
<value>706, 117</value>
</data>
<data name="bnEditC4.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value>
@ -703,7 +703,7 @@
<value>None</value>
</data>
<data name="cBController1.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 33</value>
<value>589, 33</value>
</data>
<data name="cBController1.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -730,7 +730,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC2.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 61</value>
<value>706, 61</value>
</data>
<data name="bnEditC2.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value>
@ -757,7 +757,7 @@
<value>None</value>
</data>
<data name="cBController2.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 61</value>
<value>589, 61</value>
</data>
<data name="cBController2.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -781,7 +781,7 @@
<value>None</value>
</data>
<data name="cBController3.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 89</value>
<value>589, 89</value>
</data>
<data name="cBController3.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -808,7 +808,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC1.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 33</value>
<value>706, 33</value>
</data>
<data name="bnEditC1.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value>
@ -835,7 +835,7 @@
<value>None</value>
</data>
<data name="cBController4.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 117</value>
<value>589, 117</value>
</data>
<data name="cBController4.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -868,7 +868,7 @@
<value>NoControl</value>
</data>
<data name="lbSelectedProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>592, 7</value>
<value>590, 7</value>
</data>
<data name="lbSelectedProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 15</value>
@ -940,7 +940,7 @@
<value>NoControl</value>
</data>
<data name="lbStatus.Location" type="System.Drawing.Point, System.Drawing">
<value>344, 7</value>
<value>343, 7</value>
</data>
<data name="lbStatus.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 15</value>
@ -976,7 +976,7 @@
<value>NoControl</value>
</data>
<data name="lbBattery.Location" type="System.Drawing.Point, System.Drawing">
<value>437, 7</value>
<value>436, 7</value>
</data>
<data name="lbBattery.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 15</value>
@ -1012,7 +1012,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt1.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 36</value>
<value>442, 36</value>
</data>
<data name="lbBatt1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1048,7 +1048,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt2.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 64</value>
<value>442, 64</value>
</data>
<data name="lbBatt2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1084,7 +1084,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt3.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 92</value>
<value>442, 92</value>
</data>
<data name="lbBatt3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1120,7 +1120,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt4.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 120</value>
<value>442, 120</value>
</data>
<data name="lbBatt4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1150,7 +1150,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus2.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 62</value>
<value>347, 62</value>
</data>
<data name="pBStatus2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1180,7 +1180,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus3.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 90</value>
<value>347, 90</value>
</data>
<data name="pBStatus3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1210,7 +1210,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus4.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 118</value>
<value>347, 118</value>
</data>
<data name="pBStatus4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1243,10 +1243,10 @@
<value>NoControl</value>
</data>
<data name="bnLight1.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 33</value>
<value>746, 33</value>
</data>
<data name="bnLight1.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value>
<value>147, 22</value>
</data>
<data name="bnLight1.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
@ -1273,10 +1273,10 @@
<value>NoControl</value>
</data>
<data name="bnLight2.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 61</value>
<value>746, 61</value>
</data>
<data name="bnLight2.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value>
<value>147, 22</value>
</data>
<data name="bnLight2.TabIndex" type="System.Int32, mscorlib">
<value>51</value>
@ -1303,10 +1303,10 @@
<value>NoControl</value>
</data>
<data name="bnLight4.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 117</value>
<value>746, 117</value>
</data>
<data name="bnLight4.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value>
<value>147, 22</value>
</data>
<data name="bnLight4.TabIndex" type="System.Int32, mscorlib">
<value>52</value>
@ -1336,7 +1336,7 @@
<value>NoControl</value>
</data>
<data name="lbLinkProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>514, 0</value>
<value>512, 0</value>
</data>
<data name="lbLinkProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>67, 30</value>
@ -1375,7 +1375,7 @@
<value>NoControl</value>
</data>
<data name="linkCB1.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 37</value>
<value>538, 37</value>
</data>
<data name="linkCB1.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
@ -1408,7 +1408,7 @@
<value>NoControl</value>
</data>
<data name="linkCB2.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 65</value>
<value>538, 65</value>
</data>
<data name="linkCB2.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
@ -1441,7 +1441,7 @@
<value>NoControl</value>
</data>
<data name="linkCB3.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 93</value>
<value>538, 93</value>
</data>
<data name="linkCB3.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
@ -1474,7 +1474,7 @@
<value>NoControl</value>
</data>
<data name="linkCB4.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 121</value>
<value>538, 121</value>
</data>
<data name="linkCB4.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
@ -1522,7 +1522,7 @@
<value>0</value>
</data>
<data name="tLPControllers.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,150" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,151" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="lbNoControllers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -2935,7 +2935,7 @@
<value>languagePackComboBox1</value>
</data>
<data name="&gt;&gt;languagePackComboBox1.Type" xml:space="preserve">
<value>DS4Windows.DS4Forms.LanguagePackComboBox, DS4Windows, Version=1.5.15.0, Culture=neutral, PublicKeyToken=null</value>
<value>DS4Windows.DS4Forms.LanguagePackComboBox, DS4Windows, Version=1.5.17.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;languagePackComboBox1.Parent" xml:space="preserve">
<value>fLPSettings</value>
@ -3652,7 +3652,7 @@
<value>advColorDialog</value>
</data>
<data name="&gt;&gt;advColorDialog.Type" xml:space="preserve">
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.5.15.0, Culture=neutral, PublicKeyToken=null</value>
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.5.17.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DS4Form</value>