internal CSmsItem(CItem parent, ISMS medSms) : base(parent) { if (!(parent is CSmsItems)) { throw new Exception("Internal error"); } this.MedSms = medSms; this.Text = medSms.Text; this.Type = (CSmsItem.EType)medSms.Type; this.State = (CSmsItem.EState)medSms.State; this.Number = ""; if (this.Type == CSmsItem.EType.StatusReport || this.Type == CSmsItem.EType.Submit) { this.Number = medSms.ToNumber; } if (this.Type == CSmsItem.EType.Deliver) { this.Number = medSms.FromNumber; } this.ServiceCenter = medSms.ServiceCenter; if (this.Type == CSmsItem.EType.StatusReport) { this.Status = medSms.Status; } this.ReceivedTimezone = medSms.ReceivedTimezone; this.ReceivedTime = DateTime.MinValue; try { int num; this.ReceivedTime = medSms.GetReceivedTimestamp(out num); if (num == 0) { this.ReceivedTime = DateTime.MinValue; } } catch { } this.SentTime = DateTime.MinValue; try { int num; this.SentTime = medSms.GetSentTimestamp(out num); if (num == 0) { this.SentTime = DateTime.MinValue; } } catch { } }