|
|
@@ -43,7 +43,6 @@ namespace UAS_DLLTest
|
|
|
//动态的计算方法框的高度
|
|
|
//显示的控件才需要计数
|
|
|
int ControlHeight = 0;
|
|
|
- Console.WriteLine(ShowMethods.Count);
|
|
|
for (int i = 0; i < ShowMethods.Count; i++)
|
|
|
{
|
|
|
RadioButton btn = new RadioButton();
|
|
|
@@ -57,14 +56,14 @@ namespace UAS_DLLTest
|
|
|
btn.Location = new Point((Methods.Width / 6 - btn.Width) / 2 + (i % RowItemCount) * (Methods.Width / RowItemCount), 25 + (i / RowItemCount) * (btn.Height));
|
|
|
Methods.Controls.Add(btn);
|
|
|
btn.CheckedChanged += new EventHandler(radioButton_checkChanged);
|
|
|
- if (i==0)
|
|
|
+ if (i == 0)
|
|
|
{
|
|
|
btn.Checked = true;
|
|
|
}
|
|
|
}
|
|
|
//是否剩下一行没装满的
|
|
|
int LastRow = ShowMethods.Count % RowItemCount == 0 ? 0 : 1;
|
|
|
- Methods.Size = new Size(Methods.Width, ControlHeight * (ShowMethods.Count / RowItemCount + ShowMethods.Count % RowItemCount+2));
|
|
|
+ Methods.Size = new Size(Methods.Width, ControlHeight * (ShowMethods.Count / RowItemCount + ShowMethods.Count % RowItemCount + 2));
|
|
|
Parameters.Location = new Point(Methods.Location.X, Methods.Location.Y + Methods.Size.Height);
|
|
|
Result.Location = new Point(Parameters.Location.X, Parameters.Location.Y + Parameters.Size.Height);
|
|
|
Height = Methods.Height + Parameters.Height + Result.Height + 50;
|