Пример #1
0
        DragList.ItemDescriptor CreateListItem(ReleaseInfo info)
        {
            string caption;

            if (_model.IsReleaseInstalled(info))
            {
                caption = ImguiUtil.WrapWithColor(
                    info.Name, _pmSettings.View.Theme.DraggableItemAlreadyAddedColor);
            }
            else
            {
                caption = info.Name;
            }

            caption = string.IsNullOrEmpty(info.Version) ? caption : "{0} {1}"
                      .Fmt(caption, ImguiUtil.WrapWithColor("v" + info.Version, _pmSettings.View.Theme.VersionColor));

            return(new DragList.ItemDescriptor()
            {
                Caption = caption,
                Model = info,
            });
        }