public ColorVariable(string name, ColorSet colorSet)
 {
     this.ColorSet = colorSet;
     this.Name = name;
 }
Exemple #2
0
 public Token(Function initFunc, ColorSet colorSet)
 {
     this._value = initFunc;
     this.ColorSet = colorSet;
 }
        private void refreshColors()
        {
            this.Colors.ClearColors();
            this.colorsListBox.Items.Clear();
            this.errors[this.colorsListBox].Clear();

            foreach (var item in this.ColorsDescriptions)
            {
                try
                {
                    var c = new ColorSet(String.Format("{0}={1}({2})", item.Item1, item.Item2, item.Item3), this.Colors);
                    this.errors[this.colorsListBox].Add(this.Colors.GetColorSet(c.Name) != null);
                    this.Colors.AddColorSet(c);
                }
                catch (InvalidColorSetAttributesException)
                {
                    this.errors[this.colorsListBox].Add(true);
                }
                this.colorsListBox.Items.Add(String.Format("{0}({1})", item.Item1, item.Item2));
            }

            if (this.Colors.Count() == 0)
            {
                this.addVarButton.Enabled = false;
            }
            else
            {
                this.addVarButton.Enabled = true;
            }
            this.refreshVars();
        }
Exemple #4
0
 public Token(string value, ColorSet colorSet)
 {
     this._value = new Function(value);
     this.ColorSet = colorSet;
 }