/// <summary> /// Returns a localized suitable for showing to humans string of a field component.<br> /// </summary> /// <param name="component"> number of the component to display </param> /// <param name="locale"> optional locale to format date and amounts, if null, the default locale is used </param> /// <returns> formatted component value or null if component number is invalid or not present </returns> /// <exception cref="IllegalArgumentException"> if component number is invalid for the field /// @since 7.8 </exception> public override string getValueDisplay(int component, Locale locale) { if (component < 1 || component > 2) { throw new System.ArgumentException("invalid component number " + component + " for field 129"); } if (component == 1) { //number, amount, rate java.text.NumberFormat f = java.text.NumberFormat.getNumberInstance(notNull(locale)); f.MaximumFractionDigits = 13; Number n = Component1AsNumber; if (n != null) { return(f.format(n)); } } if (component == 2) { //number, amount, rate java.text.NumberFormat f = java.text.NumberFormat.getNumberInstance(notNull(locale)); f.MaximumFractionDigits = 13; Number n = Component2AsNumber; if (n != null) { return(f.format(n)); } } return(null); }
/// <summary> /// Returns a localized suitable for showing to humans string of a field component.<br> /// </summary> /// <param name="component"> number of the component to display </param> /// <param name="locale"> optional locale to format date and amounts, if null, the default locale is used </param> /// <returns> formatted component value or null if component number is invalid or not present </returns> /// <exception cref="IllegalArgumentException"> if component number is invalid for the field /// @since 7.8 </exception> public override string getValueDisplay(int component, Locale locale) { if (component < 1 || component > 6) { throw new System.ArgumentException("invalid component number " + component + " for field 258"); } if (component == 1) { //default format (as is) return(getComponent(1)); } if (component == 2) { //number, amount, rate java.text.NumberFormat f = java.text.NumberFormat.getNumberInstance(notNull(locale)); f.MaximumFractionDigits = 13; Number n = Component2AsNumber; if (n != null) { return(f.format(n)); } } if (component == 3) { //default format (as is) return(getComponent(3)); } if (component == 4) { //date java.text.DateFormat f = java.text.DateFormat.getDateInstance(java.text.DateFormat.DEFAULT, notNull(locale)); DateTime cal = Component4AsCalendar; if (cal != null) { return(f.format(cal.Ticks)); } } if (component == 5) { //time java.text.DateFormat f = new java.text.SimpleDateFormat("HH:mm", notNull(locale)); DateTime cal = Component5AsCalendar; if (cal != null) { return(f.format(cal.Ticks)); } } if (component == 6) { //time java.text.DateFormat f = new java.text.SimpleDateFormat("HH:mm", notNull(locale)); DateTime cal = Component6AsCalendar; if (cal != null) { return(f.format(cal.Ticks)); } } return(null); }
public override void run() { NumberFormat nf = NumberFormat.getNumberInstance(); string str = nf.format(10); HolyDay_Property = 5; Process proc = new Process(); run_Field = proc.waitFor(); }
public virtual void setNumberFormat(java.text.NumberFormat arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::java.text.DateFormat._setNumberFormat15093, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::java.text.DateFormat.staticClass, global::java.text.DateFormat._setNumberFormat15093, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
private NumberFormatInfo(java.text.NumberFormat javaFormat) { this.javaFormat = javaFormat; this.readOnly = true; }
public virtual void setNumberFormat(java.text.NumberFormat format_1) { throw new System.NotImplementedException(); }
public virtual void setProgressPercentFormat(java.text.NumberFormat format) { throw new System.NotImplementedException(); }