Skip to main content
Code Review

Return to Revisions

3 of 4
Corrected spelling

In my eyes it is an appropriated way to build up your form that way. The *.Designer file is for designer generated code - but if you need to add custom logic to modify your GUI the *.cs file is the correct location.

Just a few points:

  • There are some numbers (115, 70, 35, ...) that seems to have a special meening (e.g. row height, margin, whatever). IMHO it makes sense to store that numbers as constants with a meaningful name and use that constants instead.

  • I am not sure if the MouseUp event is the right place to trigger that kind of logic. If there is another event (CheckBoxChanged, SelectedItemChanged, ...) I would suggest to use that.

  • There is some repeating logic for creating the ComboBox / Label and so on. That logic could be extracted to a separted method. For instance:

private static ComboBox CreateComboBox()
{ 
 return new ComboBox()
 {
 Font = new Font("Arial", 12F, FontStyle.Regular)
 Size = new Size(200, 22)
 DropDownStyle = ComboBoxStyle.DropDownList
 }
}
JanDotNet
  • 8.6k
  • 2
  • 21
  • 48
default

AltStyle によって変換されたページ (->オリジナル) /