VS整死了,属性惹的祸
1 /// <summary> 2 /// 隐藏除外径与壁厚之外的所有项 3 /// </summary> 4 protected bool zHideSelectItems = false; 5 /// <summary> 6 /// 隐藏除外径与壁厚之外的所有项 7 /// </summary> 8 public bool HideSelectItems 9 { 10 set 11 { 12 zHideSelectItems = value; 13 14 lblStandard.Visible = !value; 15 lblDn.Visible = !value; 16 lblSchdule.Visible = !value; 17 18 cbStandard.Visible = !value; 19 cbDn.Visible = !value; 20 cbSchedule.Visible = !value; 21 22 if (value) 23 { 24 tlpPipe.RowStyles[0].Height = 0f; 25 tlpPipe.RowStyles[1].Height = 0f; 26 tlpPipe.RowStyles[2].Height = 0f; 27 gbPipe.Height = 85; 28 } 29 else 30 { 31 tlpPipe.RowStyles[0].Height = 30f; 32 tlpPipe.RowStyles[1].Height = 30f; 33 tlpPipe.RowStyles[2].Height = 30f; 34 gbPipe.Height = 175; 35 } 36 } 37 get 38 { 39 return zHideSelectItems; 40 } 41 }
第12行在复制粘贴过程中忘记改成zHideSelectItems,导致程序在未开启时就死循环。