public void Init(int r, int c, int weight, TABLE_T st, ORDER_T t, HighLightCross f1, DispTips f2) { if (r * c != 0 && (r > 3 || c > 3)) { int i; w = weight; rc[0] = r; rc[1] = c; style = st; type = 0; fun1 = f1; fun2 = f2; Controls.Clear(); SuspendLayout(); this.Size = new Size(w * rc[1], h * rc[0]); if (style != TABLE_T.CONTROLS) { for (i = 0; i < r * c; i++) { AddTextBox(""); } type = t; } ResumeLayout(false); } else { MessageBox.Show("行、列数需均不为0,且不全小于4"); } }
public void Init(int r, int c, int width, ORDER_T t, DispTips fun1) { if ((t & ORDER_T.TYPE_MASK) == ORDER_T.VARS) { Init(r, c, width / c, TABLE_T.BORDER, t, null, fun1); } else { Init(r, c, width / c, TABLE_T.BORDER, t, HighLight, fun1); } }