public void SetValue(IDuration d) { durationType_.Value = d; if (d != null) { if (durationUI_ == null || durationUI_.DurationType != d.GetFactoryTypeName()) { durationUI_ = CreateDurationUI(d); } } if (durationUI_ != null) { durationUI_.SetValue(d); } }
public List <IWidget> GetWidgets(IDuration d) { duration_ = d; if (duration_ != null) { if (ui_ == null || ui_.DurationType != d.GetFactoryTypeName()) { ui_ = MonitorUI.CreateDurationMonitor( name_, duration_, flags_); } } if (ui_ == null) { return(new List <IWidget>()); } return(ui_.GetWidgets(d)); }