public bool Equals(Cmyk other) { return(Cyan.Equals(other.Cyan) && Magenta.Equals(other.Magenta) && Yellow.Equals(other.Yellow) && Key.Equals(other.Key)); }
public override bool Equals(object obj) { if (!(obj is CmykColor)) { return(false); } CmykColor c2 = (CmykColor)obj; return(Cyan.ApproxEquals(c2.Cyan) && Magenta.ApproxEquals(c2.Magenta) && Yellow.ApproxEquals(c2.Yellow) && Black.ApproxEquals(c2.Black)); }
public override string ToString() { return(String.Format("C={0}, M={1}, Y={2}, K={3}", new string[] { Cyan.ToString(), Magenta.ToString(), Yellow.ToString(), Black.ToString(), })); }
/// <summary> /// Prints all built-in styles for quick browsing. /// </summary> public static void PrintDemo() { NewPara(); Write("Standard: ") .Red.Write("Red").Default.Write(" ") .Green.Write("Green").Default.Write(" ") .Blue.Write("Blue").Default.Write(" ") .Cyan.Write("Cyan").Default.Write(" ") .Yellow.Write("Yellow").Default.Write(" ") .Gold.Write("Gold").Default.Write(" ") .Muted.Write("Muted").Default.Write(" ") .Bright.WriteLine("Bright"); Write("Messaging: ") .Error.Write("Error").Default.Write(" ") .OK.Write("OK").Default.Write(" ") .Warning.Write("Warning").Default.Write(" ") .Tag.Write("Tag").Default.Write(" ") .Note.Write("Note").Default.Write(" ") .Tip.Write("Tip").Default.Write(" ") .Label.Write("Label").Default.Write(" ") .Terminal.WriteLine("Terminal"); Write("Extended: ") .Graphite.Write("Graphite").Default.Write(" ") .Azure.Write("Azure").Default.Write(" ") .Eggplant.Write("Eggplant").Default.Write(" ") .Strawberry.Write("Strawberry").Default.Write(" ") .Watermelon.Write("Watermelon").Default.Write(" ") .Squash.Write("Squash").Default.Write(" ") .Lime.Write("Lime").Default.Write(" ") .Tomato.WriteLine("Tomato"); NewPara(); Console.WriteLine("Standard:\tMessaging:\tExtended:"); Red.Write("Red\t\t").Error.Write("Error\t\t").Graphite.WriteLine("Graphite"); Green.Write("Green\t\t").OK.Write("OK\t\t").Azure.WriteLine("Azure"); Blue.Write("Blue\t\t").Warning.Write("Warning\t\t").Eggplant.WriteLine("Eggplant"); Cyan.Write("Cyan\t\t").Tag.Write("Tag\t\t").Strawberry.WriteLine("Strawberry"); Yellow.Write("Yellow\t\t").Tip.Write("Tip\t\t").Squash.WriteLine("Squash"); Gold.Write("Gold\t\t").Note.Write("Note\t\t").Watermelon.WriteLine("Watermelon"); Muted.Write("Muted\t\t").Label.Write("Label\t\t").Lime.WriteLine("Lime"); Bright.Write("Bright\t\t").Terminal.Write("Terminal\t").Tomato.WriteLine("Tomato"); NewPara(); }
private void PrintResult(TimeSpan time, bool isSorted, string sortName, int elemCount) { Cyan.Write(sortName); Console.Write(" on "); DarkCyan.Write(elemCount.ToString("N0")); Console.Write(" elements finished in "); Blue.Write(time.ToString()); Console.Write(". Array is sorted: "); if (isSorted) { Green.WriteLine("✓"); } else { Red.WriteLine("×"); } Timer.Reset(); }
public override int GetHashCode() { return(Cyan.GetHashCode() ^ Magenta.GetHashCode() ^ Yellow.GetHashCode() ^ Black.GetHashCode()); }
private void CarregandoTema(Theme theme) { switch (theme) { case Theme.Principal: var principal = new Principal(); ColorPrimary = principal.ColorPrimary; ColorDark = principal.ColorDark; ColorLight = principal.ColorLight; ColorAccent = principal.ColorAccent; ColorTextIcons = principal.ColorTextIcons; ColorTextPrimary = principal.ColorTextPrimary; ColorTextSecondary = principal.ColorTextSecondary; ColorDivider = principal.ColorDivider; ColorButtonPrimary = principal.ColorButtonPrimary; ColorButtonSecondary = principal.ColorButtonSecondary; break; case Theme.Red: var red = new Red(); ColorPrimary = red.ColorPrimary; ColorDark = red.ColorDark; ColorLight = red.ColorLight; ColorAccent = red.ColorAccent; IconCart = red.IconCart; IconChat = red.IconChat; IconCatalogo = red.IconCatalogo; break; case Theme.Pink: var pink = new Pink(); ColorPrimary = pink.ColorPrimary; ColorDark = pink.ColorDark; ColorLight = pink.ColorLight; ColorAccent = pink.ColorAccent; IconCart = pink.IconCart; IconChat = pink.IconChat; IconCatalogo = pink.IconCatalogo; break; case Theme.Purple: var purple = new Purple(); ColorPrimary = purple.ColorPrimary; ColorDark = purple.ColorDark; ColorLight = purple.ColorLight; ColorAccent = purple.ColorAccent; IconCart = purple.IconCart; IconChat = purple.IconChat; IconCatalogo = purple.IconCatalogo; break; case Theme.DeepPurple: var deepPurple = new DeepPurple(); ColorPrimary = deepPurple.ColorPrimary; ColorDark = deepPurple.ColorDark; ColorLight = deepPurple.ColorLight; ColorAccent = deepPurple.ColorAccent; IconCart = deepPurple.IconCart; IconChat = deepPurple.IconChat; IconCatalogo = deepPurple.IconCatalogo; break; case Theme.Indigo: var indigo = new Indigo(); ColorPrimary = indigo.ColorPrimary; ColorDark = indigo.ColorDark; ColorLight = indigo.ColorLight; ColorAccent = indigo.ColorAccent; IconCart = indigo.IconCart; IconChat = indigo.IconChat; IconCatalogo = indigo.IconCatalogo; break; case Theme.Blue: var blue = new Blue(); ColorPrimary = blue.ColorPrimary; ColorDark = blue.ColorDark; ColorLight = blue.ColorLight; ColorAccent = blue.ColorAccent; IconCart = blue.IconCart; IconChat = blue.IconChat; IconCatalogo = blue.IconCatalogo; break; case Theme.LightBlue: var lightBlue = new LightBlue(); ColorPrimary = lightBlue.ColorPrimary; ColorDark = lightBlue.ColorDark; ColorLight = lightBlue.ColorLight; ColorAccent = lightBlue.ColorAccent; IconCart = lightBlue.IconCart; IconChat = lightBlue.IconChat; IconCatalogo = lightBlue.IconCatalogo; break; case Theme.Cyan: var cyan = new Cyan(); ColorPrimary = cyan.ColorPrimary; ColorDark = cyan.ColorDark; ColorLight = cyan.ColorLight; ColorAccent = cyan.ColorAccent; IconCart = cyan.IconCart; IconChat = cyan.IconChat; IconCatalogo = cyan.IconCatalogo; break; case Theme.Teal: var teal = new Teal(); ColorPrimary = teal.ColorPrimary; ColorDark = teal.ColorDark; ColorLight = teal.ColorLight; ColorAccent = teal.ColorAccent; IconCart = teal.IconCart; IconChat = teal.IconChat; IconCatalogo = teal.IconCatalogo; break; case Theme.Brown: var brown = new Brown(); ColorPrimary = brown.ColorPrimary; ColorDark = brown.ColorDark; ColorLight = brown.ColorLight; ColorAccent = brown.ColorAccent; IconCart = brown.IconCart; IconChat = brown.IconChat; IconCatalogo = brown.IconCatalogo; break; default: break; } }
/// <summary> /// Returns a System.String object that represents the current object. /// </summary> /// <returns>Text as a sequence of Unicode characters</returns> public override string ToString() { return(Cyan.ToString() + "\n" + Magenta.ToString() + "\n" + Yellow.ToString() + "\n" + Keycolor.ToString()); }
/// <summary> /// Plays the role of a hash function of a certain type. /// </summary> /// <returns>Integer number</returns> public override int GetHashCode() { return(Cyan.GetHashCode() ^ Magenta.GetHashCode() ^ Yellow.GetHashCode() ^ Keycolor.GetHashCode()); }