private void button1_Click(object sender, EventArgs e) //make sure { Edit_min = 0; //Int32.Parse(MinText.Text); Edit_max = 0; //Int32.Parse(MaxText.Text); if (float.TryParse(MinText.Text, out edit_min)) { if (float.TryParse(MaxText.Text, out edit_max)) { DensityRange temp_range = new DensityRange(Edit_min, Edit_max, Red, Green, Blue); Edit_range = temp_range; g.Dispose(); brush_picbox.Dispose(); } else { MaxText.Focus(); MaxText.SelectAll(); } } else { MinText.Focus(); MinText.SelectAll(); } }
public void WriteToErrorLog(string message)// new function for error logging, the old error logs are kinda a hack { ErrorLog = ("\n" + " " + (System.DateTime.Now).ToString() + " : " + message) + ErrorLog; // UniClipboard.SetText(UniClipboard.GetText() + "\n" + " " + System.DateTime.Now + " : " + message); Debug.Log(ErrorLog); MyText.text += ("\n" + " " + (System.DateTime.Now).ToString() + " : " + message); //write to old debug ErrorLog = MaxText.ClampText(ErrorLog, 2000); // clamp text to prevent too much in the error log }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ NullableId.GetHashCode(); hashCode = (hashCode * 397) ^ Byte.GetHashCode(); hashCode = (hashCode * 397) ^ Short.GetHashCode(); hashCode = (hashCode * 397) ^ Int; hashCode = (hashCode * 397) ^ Long.GetHashCode(); hashCode = (hashCode * 397) ^ UShort.GetHashCode(); hashCode = (hashCode * 397) ^ (int)UInt; hashCode = (hashCode * 397) ^ ULong.GetHashCode(); hashCode = (hashCode * 397) ^ Float.GetHashCode(); hashCode = (hashCode * 397) ^ Double.GetHashCode(); hashCode = (hashCode * 397) ^ Decimal.GetHashCode(); hashCode = (hashCode * 397) ^ (String != null ? String.GetHashCode() : 0); hashCode = (hashCode * 397) ^ DateTime.GetHashCode(); hashCode = (hashCode * 397) ^ TimeSpan.GetHashCode(); hashCode = (hashCode * 397) ^ DateTimeOffset.GetHashCode(); hashCode = (hashCode * 397) ^ Guid.GetHashCode(); hashCode = (hashCode * 397) ^ Bool.GetHashCode(); hashCode = (hashCode * 397) ^ Char.GetHashCode(); hashCode = (hashCode * 397) ^ NullableDateTime.GetHashCode(); hashCode = (hashCode * 397) ^ NullableTimeSpan.GetHashCode(); hashCode = (hashCode * 397) ^ (ByteArray != null ? ByteArray.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CharArray != null ? CharArray.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StringArray != null ? StringArray.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (IntArray != null ? IntArray.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LongArray != null ? LongArray.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StringList != null ? StringList.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StringMap != null ? StringMap.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (IntStringMap != null ? IntStringMap.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SubType != null ? SubType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SubTypes != null ? SubTypes.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CustomText != null ? CustomText.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (MaxText != null ? MaxText.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CustomDecimal.GetHashCode(); return(hashCode); } }