public override int GetHashCode() { unchecked { var hashCode = (Author != null ? Author.GetHashCode() : 0); hashCode = (hashCode * 397) ^ TimeCreated.GetHashCode(); hashCode = (hashCode * 397) ^ TimeEdited.GetHashCode(); return(hashCode); } }
public void EditTime() { using (var editTimeForm = new EditTimeForm(WatchTimer.TimeElapsed)) { if (editTimeForm.ShowDialog(this) == DialogResult.OK) { WatchTimer.TimeElapsed = editTimeForm.Time; UpdateOutput(); TimeEdited?.Invoke(this, new EventArgs()); } } }
public bool Equals(ChatMessage other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(Author, other.Author) && TimeCreated.Equals(other.TimeCreated) && TimeEdited.Equals(other.TimeEdited)); }