private static string ApplyTitle(ITitled item) { var subItem = item as ISubTitled; return(string.IsNullOrEmpty(subItem?.SubTitle) ? item.Title : $"{item.Title}{Environment.NewLine}{subItem.SubTitle}"); }
/// <summary> /// Displays properties of specified object in ID Editor using Wrappers /// </summary> /// <param name="o">Object which properties should be displayed</param> private void DisplayProperties([CanBeNull] ITitled o) { if (o is OrganizationType) { o = Course.Manifest; } var it = o as ItemType; Forms.PropertyEditor.SetContext(NodesWrappers.Wrap(o), it != null && it.PageType == PageType.Question ? _pageEditor.GetScope() : null, _pageEditor.PropertyEditorSelectedObjectChanged); }
public static ITitled Wrap(ITitled node) { if (node != null) { var item = node as ItemType; if (item != null && item.PageType == PageType.Question) { return(ExaminationWrapper.Wrap(item)); } return(Wraper <ITitled> .Wrap(node)); } return(null); }
public static void AddTitledItem([NotNull] this ComboBox.ObjectCollection items, [NotNull] ITitled value) { items.Add(new ComboBoxItem(value)); }
public ComboBoxItem([NotNull] ITitled value) { Value = value; }