public override string Text (TKGauge gauge, NSObject label) { if (gauge.IsKindOfClass(new ObjCRuntime.Class(typeof(TKRadialGauge)))){ return string.Format("{0} bar", ((NSNumber)label).NIntValue); } else { return string.Format("{0} degrees", ((NSNumber)label).NIntValue); } }
public override string Text(TKGauge gauge, NSObject label) { if (gauge.IsKindOfClass(new ObjCRuntime.Class(typeof(TKRadialGauge)))) { return(string.Format("{0} bar", ((NSNumber)label).NIntValue)); } else { return(string.Format("{0} degrees", ((NSNumber)label).NIntValue)); } }
public override void ValueChanged(TKGauge gauge, nfloat value, TKGaugeScale scale) { if (gauge == owner.radialGauge) { owner.radialGauge.LabelTitle.Text = string.Format("{0}˚C", (int)value); } else { owner.linearGauge.LabelTitle.Text = string.Format("{0} %", (int)value); } }