예제 #1
0
        public bool Equals(IDataFormat format)
        {
            if (!(format is UnderEdit that))
            {
                return(false);
            }

            if (!OriginalFormat.Equals(that.OriginalFormat))
            {
                return(false);
            }
            if (EditWidth != that.EditWidth)
            {
                return(false);
            }
            if (AutocompleteOptions != null ^ that.AutocompleteOptions != null)
            {
                return(false);                                                             // if only one is null, not equal
            }
            if (AutocompleteOptions != null && that.AutocompleteOptions != null && AutocompleteOptions.SequenceEqual(that.AutocompleteOptions))
            {
                return(false);
            }
            return(CurrentText == that.CurrentText);
        }
예제 #2
0
 public override string ToString()
 {
     return("[Shape " + OriginalFormat.ToString() + ":" + OriginalBytes.Length + " bytes]");
 }