protected override void _setName(string name) { base._setName(name); if (String.IsNullOrEmpty(name)) { return; } var cs = this.Color; if (cs == null) { this._func = null; this.Tokens = null; return; } if (this.ParsedFunction != null) { this.Tokens = new MultiSet<Function>(this.ParsedFunction); foreach (var token in this.Tokens) { Token t = new Token(token.Key, cs); if (!t.IsLegal()) { this._func = null; this.Tokens = null; break; } } } }