private void Init() { if (seven != null) { for (int i = 0; i < seven.Length; i++) { seven[i].Dispose(); } } seven = new Seven[maxLen + (symbol ? 1 : 0) + (point ? 1 : 0)]; for (int i = 0; i < seven.Length; i++) { seven[i] = new Seven(); seven[i].Width = this.Width / seven.Length - 8; seven[i].Height = this.Height; seven[i].Left = this.Width / seven.Length * i; seven[i].FontSize = this.Height / 10; seven[i].FontSpace = this.Height / 30; seven[i].Top = 0; seven[i].Shardow = this.shadow; seven[i].BackColor = this.BackColor; seven[i].ForeColor = this.ForeColor; this.Controls.Add(seven[i]); } flush(); }
private void init() { if (seven != null) { for (int i = 0; i < seven.Length; i++) { seven[i].Dispose(); } } seven = new Seven[formatValue.Length]; for (int i = 0; i < seven.Length; i++) { seven[i] = new Seven(); seven[i].Width = this.Width / seven.Length - 5; seven[i].Height = this.Height; seven[i].Left = this.Width / seven.Length * i; seven[i].FontSize = this.Height / 10; seven[i].FontSpace = this.Height / 30; seven[i].Top = 0; seven[i].Shardow = false; switch (formatValue.Substring(i, 1)) { case "y": case "M": case "d": case "H": case "m": case "s": seven[i].Simplor = Seven.simplorList.Value; break; case "-": seven[i].Simplor = Seven.simplorList.Del; break; case ":": seven[i].Simplor = Seven.simplorList.DoublePoint; break; default: seven[i].Simplor = Seven.simplorList.Null; break; } this.Controls.Add(seven[i]); } this.BackColor = All.Class.Style.BackColor; SetValue(now); }