Пример #1
0
Файл: BMI.cs Проект: gponick/bmi
            public static BMIObj FromMod(BMILib.Mod m)
            {
                BMIObj ret = new BMIObj();

                ret.Installed        = m.ModFullDirectory != null ? true : m.IsInstalled();
                ret.NeedsUpdate      = ret.Installed ? m.NeedsUpdate() : false;
                ret.Name             = m.Name;
                ret.Author           = m.Author;
                ret.InstalledVersion = m.Version ?? "-";
                ret.LatestVersion    = m.LatestRelease?.TagName ?? "-";
                ret.MinBTVersion     = "-";
                ret.MaxBTVersion     = "-";
                ret.Download         = "- Mb";
                ret.Description      = m.Website ?? "-";
                ret.InstallOrUpdate  = ret.Installed ? m.NeedsUpdate() ? "Update" : "Uninstall" : "Install";

                return(ret);
            }