}
#endregion
+ public override int GetHashCode ()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hash = 17;
+ // Suitable nullity checks etc, of course :)
+ hash = hash * 23 + A.GetHashCode();
+ hash = hash * 23 + R.GetHashCode();
+ hash = hash * 23 + G.GetHashCode();
+ hash = hash * 23 + B.GetHashCode();
+ return hash;
+ }
+ }
+ public override bool Equals (object obj)
+ {
+ return (obj == null || obj.GetType() != typeof(Color)) ?
+ false :
+ this == (Color)obj;
+ }
public override string ToString()
{
if (!string.IsNullOrEmpty(Name))
{
base.OnChildLayoutChanges (sender, arg);
- GraphicObject g = sender as GraphicObject;
switch (arg.LayoutType) {
case LayoutingType.Width:
if (Orientation == Orientation.Horizontal) {
{
if (!reader.HasAttributes)
return;
- Type thisType = this.GetType ();
string stylePath = reader.GetAttribute ("Style");
}
public virtual void OnChildLayoutChanges (object sender, LayoutingEventArgs arg)
{
- GraphicObject g = sender as GraphicObject;
switch (arg.LayoutType) {
case LayoutingType.X:
break;
}
public override void RemoveChild (GraphicObject child)
{
- int idx = Children.IndexOf (child);
base.RemoveChild (child);
if (selectedTab > Children.Count - 1)
SelectedTab--;
/// <summary>
/// Gets the scancode which generated this event.
/// </summary>
- [CLSCompliant(false)]
public uint ScanCode
{
get { return (uint)Key; }
int.Parse(d[2]),
int.Parse(d[3]));
}
+ public override int GetHashCode ()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hash = 17;
+ // Suitable nullity checks etc, of course :)
+ hash = hash * 23 + _x.GetHashCode();
+ hash = hash * 23 + _y.GetHashCode();
+ hash = hash * 23 + _width.GetHashCode();
+ hash = hash * 23 + _height.GetHashCode();
+ return hash;
+ }
+ }
+ public override bool Equals (object obj)
+ {
+ return (obj == null || obj.GetType() != typeof(Rectangle)) ?
+ false :
+ this == (Rectangle)obj;
+ }
}
-
}
return new Size(s.Width + i, s.Height + i);
}
#endregion
-
+
+ public override int GetHashCode ()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hash = 17;
+ // Suitable nullity checks etc, of course :)
+ hash = hash * 23 + _width.GetHashCode();
+ hash = hash * 23 + _height.GetHashCode();
+ return hash;
+ }
+ }
+ public override bool Equals (object obj)
+ {
+ return (obj == null || obj.GetType() != typeof(Size)) ?
+ false :
+ this == (Size)obj;
+ }
public override string ToString()
{
return string.Format("{0},{1}", Width, Height);
return left.color == right.color ? false : true;
}
+ public override int GetHashCode ()
+ {
+ return color.GetHashCode();
+ }
public override bool Equals (object obj)
{
if (obj is Crow.Color)