示例#1
0
 public bool Equals(LanguageForm other)
 {
     if (other == null)
     {
         return(false);
     }
     if (!IsStarred.Equals(other.IsStarred))
     {
         return(false);
     }
     if ((WritingSystemId != null && !WritingSystemId.Equals(other.WritingSystemId)) || (other.WritingSystemId != null && !other.WritingSystemId.Equals(WritingSystemId)))
     {
         return(false);
     }
     if ((Form != null && !Form.Equals(other.Form)) || (other.Form != null && !other.Form.Equals(Form)))
     {
         return(false);
     }
     if ((_annotation != null && !_annotation.Equals(other._annotation)) || (other._annotation != null && !other._annotation.Equals(_annotation)))
     {
         return(false);
     }
     if (_spans != other.Spans)
     {
         if (_spans == null || other.Spans == null || _spans.Count != other.Spans.Count)
         {
             return(false);
         }
         for (int i = 0; i < _spans.Count; ++i)
         {
             if (!_spans[i].Equals(other.Spans[i]))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
示例#2
0
 /*       private string SetIntLength(string shortInt, int length)
  *     {
  *         int difference = length - shortInt.Length;
  *         if (difference > 0)
  *         {
  *             for (int i = 0; i < difference; i++)
  *                 shortInt = "0" + shortInt;
  *         }
  *         return shortInt;
  *     }
  */
 public override string ToString()
 {
     return(Details + Utility.FILE_SEPARATER + Deadline.ToString(Utility.SHORT_DATE_FORMAT) + Utility.FILE_SEPARATER + Labels + Utility.FILE_SEPARATER + IsStarred.ToString() + Utility.FILE_SEPARATER + IsArchived.ToString() + Utility.FILE_SEPARATER + Interval.ToString());
 }