public UnderliningStyle(AppearanceDescription description, Brush brush)
     : base(description)
 {
     BackgroundBrush.Dispose();
     BackgroundBrush = null;
     _pen = new Pen(brush, 1.5F);
 }
 public DynamicTextStyle(AppearanceDescription description)
     : base(CreateBrush(description.ForeColor), CreateBrush(description.BackColor), description.FontStyle)
 {
     Description = description;
     description.ForeColorChanged += description_ForeColorChanged;
     description.BackColorChanged += description_BackColorChanged;
     description.FontStyleChanged += description_FontStyleChanged;
 }
Ejemplo n.º 3
0
 public void CopyTo(AppearanceDescription destination)
 {
     destination.ID              = ID;
     destination.Text            = Text;
     destination.BackColorSystem = BackColorSystem;
     destination.BackColor       = BackColor;
     destination.ForeColorSystem = ForeColorSystem;
     destination.ForeColor       = ForeColor;
     destination.FontStyle       = FontStyle;
 }
Ejemplo n.º 4
0
        public void CopyTo(AppearanceMap destination)
        {
            destination.Descriptions.Clear();

            for (int i = 0; i < Descriptions.Count; i++)
            {
                var description = new AppearanceDescription();
                this.Descriptions[i].CopyTo(description);
                destination.Descriptions.Add(description);
            }
        }
Ejemplo n.º 5
0
        public void CopyTo(AppearanceMap destination)
        {
            for (int i = 0; i < Descriptions.Count; i++)
            {
                var source = Descriptions[i];
                var target = destination.GetDescriptionById(source.ID);

                if (target == null)
                {
                    target = new AppearanceDescription();
                    destination.Descriptions.Add(target);
                }

                source.CopyTo(target);
            }
        }
Ejemplo n.º 6
0
        public object Clone()
        {
            var newMap = new AppearanceMap()
            {
                Name = this.Name
            };

            foreach (var description in Descriptions)
            {
                var newDescription = new AppearanceDescription();
                description.CopyTo(newDescription);
                newMap.Descriptions.Add(newDescription);
            }

            return(newMap);
        }
Ejemplo n.º 7
0
 public void CopyTo(AppearanceDescription destination)
 {
     destination.ID = ID;
     destination.Text = Text;
     destination.BackColorSystem = BackColorSystem;
     destination.BackColor = BackColor;
     destination.ForeColorSystem = ForeColorSystem;
     destination.ForeColor = ForeColor;
     destination.FontStyle = FontStyle;
 }
Ejemplo n.º 8
0
        public void CopyTo(AppearanceMap destination)
        {
            destination.Descriptions.Clear();

            for (int i = 0; i < Descriptions.Count; i++)
            {
                var description = new AppearanceDescription();
                this.Descriptions[i].CopyTo(description);
                destination.Descriptions.Add(description);
            }
        }
Ejemplo n.º 9
0
        public object Clone()
        {
            var newMap = new AppearanceMap()
            {
                Name = this.Name
            };

            foreach (var description in Descriptions)
            {
                var newDescription = new AppearanceDescription();
                description.CopyTo(newDescription);
                newMap.Descriptions.Add(newDescription);
            }

            return newMap;
        }
 public void CopyTo(AppearanceMap destination)
 {            
     for (int i = 0; i < Descriptions.Count; i++)
     {
         var source = Descriptions[i];
         var target = destination.GetDescriptionById(source.ID);
         
         if (target == null)
         {
             target = new AppearanceDescription();
             destination.Descriptions.Add(target);
         }
         
         source.CopyTo(target);
     }
 }
 public WarningStyle(AppearanceDescription description)
     : base(description, Brushes.Green)
 {
 }
 public ErrorStyle(AppearanceDescription description)
     : base(description, Brushes.Red)
 {
 }