private void Init(TimeSpan timeSpan) { if (!initialised) { CurrentHour = new Integer(timeSpan.Hours); CurrentMinute = new Integer(timeSpan.Minutes); SetIs24HourView(Java.Lang.Boolean.True); SetOnTimeChangedListener(new EmiTimeChangedListener(this)); } }
public static byte[] shortToByte2(short number) { int tmp_num = number; byte[] byte2 = new byte[2]; for (int i = byte2.Length - 1; i > -1; i--) { byte2[i] = new Integer(tmp_num & 0xff).ByteValue(); tmp_num = tmp_num >> 8; } return byte2; }
protected virtual ushort FromInteger(Integer integer) { return integer == null ? (ushort)0 : (ushort)integer.IntValue(); }