public void Clear(WaterLevelType waterLevelType) { using (Graphics g = Graphics.FromImage(this.Sprite)) { using (SolidBrush b = new SolidBrush(Color.Black)) { g.FillRectangle(b, 0, 0, SquareSize.Width, SquareSize.Height); } if (waterLevelType != WaterLevelType.AboveWater) { using (SolidBrush b = new SolidBrush(Color.FromArgb(0x80, Color.Blue))) { var top = (waterLevelType == WaterLevelType.OnWaterLine) ? 3 : 0; g.FillRectangle(b, 0, top, SquareSize.Width, SquareSize.Height); } } if (waterLevelType == WaterLevelType.OnWaterLine) { using (SolidBrush b = new SolidBrush(Color.FromArgb(0x80, Color.Cyan))) { g.FillRectangle(b, 0, 2, SquareSize.Width, 1); } } } }
public override int GetHashCode() { unchecked { int hashCode = WaterLevelType.GetHashCode(); hashCode = (hashCode * 397) ^ HydraulicBoundaryLocationCalculations.GetHashCode(); hashCode = (hashCode * 397) ^ TargetProbability.GetHashCode(); hashCode = (hashCode * 397) ^ assessmentSection.GetHashCode(); return(hashCode); } }