/// <summary> /// Create a new Item object and append it to a Category in the View Select return /// </summary> private static ViewSelect.Response.Item _addViewSelectObj(ViewSelect.Response.Category Cat, string Name, CswEnumNbtViewItemType Type, string Icon, string Id) { ViewSelect.Response.Item Ret = new ViewSelect.Response.Item(Type) { name = Name, itemid = Id, iconurl = Icon }; Cat.items.Add(Ret); return(Ret); }
} // _addCategory() /// <summary> /// Create a new Item object and append it to a Category in the View Select return /// </summary> private static ViewSelect.Response.Item _addViewSelectObj(ref ViewSelect.Response ViewSelectReturn, string Category, string Name, CswEnumNbtViewItemType Type, string Icon, string Id) { if (Category == string.Empty) { Category = "Uncategorized"; } ViewSelect.Response.Category Cat = _getCategory(ref ViewSelectReturn, Category); return(_addViewSelectObj(Cat, Name, Type, Icon, Id)); }