Ejemplo n.º 1
0
 public bool Equals(TextLayoutData other)
 {
     if (Width != other.Width || Height != other.Height || Text != other.Text || Font != other.Font || TextTrimming != other.TextTrimming ||
         WrapMode != other.WrapMode)
     {
         return(false);
     }
     if (Attributes == null && other.Attributes == null)
     {
         return(true);
     }
     if (Attributes != null || other.Attributes != null)
     {
         return(false);
     }
     if (Attributes.Count != other.Attributes.Count)
     {
         return(false);
     }
     for (int n = 0; n < Attributes.Count; n++)
     {
         if (!Attributes [n].Equals(other.Attributes [n]))
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
        public void AddTextLayout(TextLayoutData td)
        {
            var found = TextLayouts.FirstOrDefault(t => t.Equals(td)) ?? td;

            TextLayouts.Add(found);
        }
Ejemplo n.º 3
0
 public bool Equals(TextLayoutData other)
 {
     if (Width != other.Width || Height != other.Height || Text != other.Text || Font != other.Font || TextTrimming != other.TextTrimming)
         return false;
     if (Attributes == null && other.Attributes == null)
         return true;
     if (Attributes != null || other.Attributes != null)
         return false;
     if (Attributes.Count != other.Attributes.Count)
         return false;
     for (int n=0; n<Attributes.Count; n++)
         if (!Attributes [n].Equals (other.Attributes [n]))
             return false;
     return true;
 }
Ejemplo n.º 4
0
 public void AddTextLayout(TextLayoutData td)
 {
     var found = TextLayouts.FirstOrDefault (t => t.Equals (td)) ?? td;
     TextLayouts.Add (found);
 }