Exemplo n.º 1
0
        ///<summary>
        ///Creates a new object that is a copy of the current instance.
        ///</summary>
        ///
        ///<returns>
        ///A new object that is a copy of this instance.
        ///</returns>
        ///<filterpriority>2</filterpriority>
        public object Clone()
        {
            var pair = new ColorPair {
                backColor1 = backColor1, backColor2 = backColor2, gradient = gradient
            };

            return(pair);
        }
Exemplo n.º 2
0
 public void Start(object val)
 {
     value = val as ColorPair;
     if (value == null)
     {
         return;
     }
     pnlOldBack1.BackColor = value.BackColor1;
     pnlOldBack2.BackColor = value.BackColor2;
     pnlNewBack1.BackColor = value.BackColor1;
     pnlNewBack2.BackColor = value.BackColor2;
     lblOldGrad.Text       = value.Gradient.ToString();
     gradUI.Value          = value.Gradient;
     pnlPreview.Refresh();
 }
Exemplo n.º 3
0
 public void End()
 {
     value = null;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Assigns Values of supplied <see cref="ColorPair"/> to current object.
 /// </summary>
 /// <param name="color"><see cref="ColorPair"/> object whose value is to be assigned.</param>
 public void Assign(ColorPair color)
 {
     backColor1 = color.backColor1;
     backColor2 = color.backColor2;
     gradient   = color.gradient;
 }
Exemplo n.º 5
0
 public void Start(object val)
 {
     value = val as ColorPair;
     if (value == null)
         return;
     pnlOldBack1.BackColor = value.BackColor1;
     pnlOldBack2.BackColor = value.BackColor2;
     pnlNewBack1.BackColor = value.BackColor1;
     pnlNewBack2.BackColor = value.BackColor2;
     lblOldGrad.Text = value.Gradient.ToString();
     gradUI.Value = value.Gradient;
     pnlPreview.Refresh();
 }
Exemplo n.º 6
0
 public void End()
 {
     value = null;
 }
Exemplo n.º 7
0
 ///<summary>
 ///Creates a new object that is a copy of the current instance.
 ///</summary>
 ///
 ///<returns>
 ///A new object that is a copy of this instance.
 ///</returns>
 ///<filterpriority>2</filterpriority>
 public object Clone()
 {
     var pair = new ColorPair {backColor1 = backColor1, backColor2 = backColor2, gradient = gradient};
     return pair;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Assigns Values of supplied <see cref="ColorPair"/> to current object.
 /// </summary>
 /// <param name="color"><see cref="ColorPair"/> object whose value is to be assigned.</param>
 public void Assign(ColorPair color)
 {
     backColor1 = color.backColor1;
     backColor2 = color.backColor2;
     gradient = color.gradient;
 }