예제 #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);
 }
        public void AddTextLayout(TextLayoutData td)
        {
            var found = TextLayouts.FirstOrDefault(t => t.Equals(td)) ?? td;

            TextLayouts.Add(found);
        }
예제 #3
0
파일: TextLayout.cs 프로젝트: Sinien/xwt
 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;
 }
예제 #4
0
파일: VectorImage.cs 프로젝트: nite2006/xwt
 public void AddTextLayout(TextLayoutData td)
 {
     var found = TextLayouts.FirstOrDefault (t => t.Equals (td)) ?? td;
     TextLayouts.Add (found);
 }