public override void Refresh() { string s = String.Empty; DateTime dt = Gazprom.ReconcilationRecentTime; if (dt == DateTime.MinValue) { s = "-"; } else { TimeSpan ts = dt - DataContract.DefaultDateTime; TimeSpan tsNow = DateTime.Now - DataContract.DefaultDateTime; if ((tsNow.TotalDays - ts.TotalDays) < 1) { s = DataFormatter.FormatTimeHM(dt.TimeOfDay); } else { s = dt.Date.ToString("dd.MM.yyyy"); } } Value = String.Format("{0}/{1}", Gazprom.ReconcilationCount, s); }