private void Final() { Console.WriteLine("Show all? y/n"); ConsoleKey response = Console.ReadKey(true).Key; if (response == ConsoleKey.Y) { Console.WriteLine("If started"); A1.ShowMatrix("A1"); A2.ShowMatrix("A2"); B2.ShowMatrix("B2"); C2.ShowMatrix("C2"); A.ShowMatrix("A"); b1.ShowMatrix("b1"); c1.ShowMatrix("c1"); b.ShowMatrix("b"); Y3.ShowMatrix("Y3"); y1.ShowMatrix("y1"); y2.ShowMatrix("y2"); result.ShowMatrix("result"); Console.WriteLine("If ended"); } Console.WriteLine("Press enter to exit"); while (Console.ReadKey().Key != ConsoleKey.Enter) { } }
private void ResultStage() { Console.WriteLine("Show matrices? y/n"); ConsoleKey answer = Console.ReadKey(true).Key; //A1, A2, B2, C2, A, b1, c1, bi, Y3, y1, y2, Y3squared, Y3cubed if (answer == ConsoleKey.Y) { Console.WriteLine("Matrices:"); A1.ShowMatrix("A1"); A2.ShowMatrix("A2"); B2.ShowMatrix("B2"); C2.ShowMatrix("C2"); A.ShowMatrix("A"); b1.ShowMatrix("b1"); c1.ShowMatrix("c1"); bi.ShowMatrix("bi"); Y3.ShowMatrix("Y3"); y1.ShowMatrix("y1"); y2.ShowMatrix("y2"); result.ShowMatrix("result"); } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); }
public override void WriteGroupCodes() { int flags; WriteGroupCodeValue(10, X0.ToString().Trim()); WriteGroupCodeValue(20, Y0.ToString().Trim()); WriteGroupCodeValue(30, Z0.ToString().Trim()); WriteGroupCodeValue(11, X1.ToString().Trim()); WriteGroupCodeValue(21, Y1.ToString().Trim()); WriteGroupCodeValue(31, Z1.ToString().Trim()); WriteGroupCodeValue(12, X2.ToString().Trim()); WriteGroupCodeValue(22, Y2.ToString().Trim()); WriteGroupCodeValue(32, Z2.ToString().Trim()); WriteGroupCodeValue(13, X3.ToString().Trim()); WriteGroupCodeValue(23, Y3.ToString().Trim()); WriteGroupCodeValue(33, Z3.ToString().Trim()); flags = 0; if(Edge1Invisible) flags += 1; if(Edge2Invisible) flags += 2; if(Edge3Invisible) flags += 4; if(Edge4Invisible) flags += 8; WriteGroupCodeValue(70, flags.ToString().Trim()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; hashCode = hashCode * 59 + Type.GetHashCode(); hashCode = hashCode * 59 + Barcode1DSymbology.GetHashCode(); if (Data != null) { hashCode = hashCode * 59 + Data.GetHashCode(); } hashCode = hashCode * 59 + X1.GetHashCode(); hashCode = hashCode * 59 + X2.GetHashCode(); hashCode = hashCode * 59 + X3.GetHashCode(); hashCode = hashCode * 59 + X4.GetHashCode(); hashCode = hashCode * 59 + Y1.GetHashCode(); hashCode = hashCode * 59 + Y2.GetHashCode(); hashCode = hashCode * 59 + Y3.GetHashCode(); hashCode = hashCode * 59 + Y4.GetHashCode(); hashCode = hashCode * 59 + BboxLeftInches.GetHashCode(); hashCode = hashCode * 59 + BboxTopInches.GetHashCode(); hashCode = hashCode * 59 + BboxWidthInches.GetHashCode(); hashCode = hashCode * 59 + BboxHeightInches.GetHashCode(); hashCode = hashCode * 59 + PageNumber.GetHashCode(); hashCode = hashCode * 59 + PagePixelWidth.GetHashCode(); hashCode = hashCode * 59 + PagePixelHeight.GetHashCode(); hashCode = hashCode * 59 + PageHorizontalResolution.GetHashCode(); hashCode = hashCode * 59 + PageVerticalResolution.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { int prime = 37; int hash = 1; hash = prime * hash + X1.GetHashCode(); hash = prime * hash + Y1.GetHashCode(); hash = prime * hash + X2.GetHashCode(); hash = prime * hash + Y2.GetHashCode(); hash = prime * hash + X3.GetHashCode(); hash = prime * hash + Y3.GetHashCode(); return(hash); }
public override void WriteGroupCodes() { WriteGroupCodeValue(10, X0.ToString().Trim()); WriteGroupCodeValue(20, Y0.ToString().Trim()); WriteGroupCodeValue(30, Z0.ToString().Trim()); WriteGroupCodeValue(11, X1.ToString().Trim()); WriteGroupCodeValue(21, Y1.ToString().Trim()); WriteGroupCodeValue(31, Z1.ToString().Trim()); WriteGroupCodeValue(12, X2.ToString().Trim()); WriteGroupCodeValue(22, Y2.ToString().Trim()); WriteGroupCodeValue(32, Z2.ToString().Trim()); WriteGroupCodeValue(13, X3.ToString().Trim()); WriteGroupCodeValue(23, Y3.ToString().Trim()); WriteGroupCodeValue(33, Z3.ToString().Trim()); }
/// <summary> /// Returns true if BarcodeInfo instances are equal /// </summary> /// <param name="input">Instance of BarcodeInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(BarcodeInfo input) { if (input == null) { return(false); } return (( Type == input.Type || Type.Equals(input.Type) ) && ( Barcode1DSymbology == input.Barcode1DSymbology || Barcode1DSymbology.Equals(input.Barcode1DSymbology) ) && ( Data == input.Data || (Data != null && Data.Equals(input.Data)) ) && ( X1 == input.X1 || X1.Equals(input.X1) ) && ( X2 == input.X2 || X2.Equals(input.X2) ) && ( X3 == input.X3 || X3.Equals(input.X3) ) && ( X4 == input.X4 || X4.Equals(input.X4) ) && ( Y1 == input.Y1 || Y1.Equals(input.Y1) ) && ( Y2 == input.Y2 || Y2.Equals(input.Y2) ) && ( Y3 == input.Y3 || Y3.Equals(input.Y3) ) && ( Y4 == input.Y4 || Y4.Equals(input.Y4) ) && ( BboxLeftInches == input.BboxLeftInches || BboxLeftInches.Equals(input.BboxLeftInches) ) && ( BboxTopInches == input.BboxTopInches || BboxTopInches.Equals(input.BboxTopInches) ) && ( BboxWidthInches == input.BboxWidthInches || BboxWidthInches.Equals(input.BboxWidthInches) ) && ( BboxHeightInches == input.BboxHeightInches || BboxHeightInches.Equals(input.BboxHeightInches) ) && ( PageNumber == input.PageNumber || PageNumber.Equals(input.PageNumber) ) && ( PagePixelWidth == input.PagePixelWidth || PagePixelWidth.Equals(input.PagePixelWidth) ) && ( PagePixelHeight == input.PagePixelHeight || PagePixelHeight.Equals(input.PagePixelHeight) ) && ( PageHorizontalResolution == input.PageHorizontalResolution || PageHorizontalResolution.Equals(input.PageHorizontalResolution) ) && ( PageVerticalResolution == input.PageVerticalResolution || PageVerticalResolution.Equals(input.PageVerticalResolution) )); }