|
|
@@ -33,7 +33,7 @@ namespace GCMM |
|
|
|
var an = AssemblyName.GetAssemblyName(modPath); |
|
|
|
if (an.Name == "0Harmony") continue; |
|
|
|
//Use filename to avoid differences between repository & assembly name casing |
|
|
|
var mod = new ModInfo { Name = Path.GetFileNameWithoutExtension(modPath), Version = an.Version, LastUpdated = File.GetLastWriteTime(modPath) }; |
|
|
|
var mod = new ModInfo { Name = Path.GetFileNameWithoutExtension(modPath), Version = an.Version }; |
|
|
|
AddUpdateModInList(mod); |
|
|
|
installed.Add(mod.Name); |
|
|
|
} |
|
|
@@ -48,7 +48,6 @@ namespace GCMM |
|
|
|
{ |
|
|
|
var an = AssemblyName.GetAssemblyName(ipath); |
|
|
|
gcipa.Version = an.Version; |
|
|
|
gcipa.LastUpdated = File.GetLastWriteTime(ipath); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (BadImageFormatException) |
|
|
@@ -61,7 +60,6 @@ namespace GCMM |
|
|
|
{ |
|
|
|
var an = AssemblyName.GetAssemblyName(mmpath); |
|
|
|
gcmm.Version = an.Version; |
|
|
|
gcmm.LastUpdated = File.GetLastWriteTime(mmpath); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (BadImageFormatException) |
|
|
@@ -178,7 +176,7 @@ namespace GCMM |
|
|
|
omod.UpdateDetails = mod.UpdateDetails ?? omod.UpdateDetails; |
|
|
|
items[1].Text = omod.Author ?? ""; |
|
|
|
items[2].Text = (omod.Version ?? omod.LatestVersion)?.ToString(); |
|
|
|
items[3].Text = omod.LastUpdated.ToString(); |
|
|
|
items[3].Text = omod.LatestVersion != null ? omod.LastUpdated.ToString() : ""; |
|
|
|
item.Group = omod.Installed ? modlist.Groups["installed"] : modlist.Groups["available"]; |
|
|
|
modlist.Sort(); |
|
|
|
mod = omod; |
|
|
@@ -186,12 +184,14 @@ namespace GCMM |
|
|
|
else |
|
|
|
{ |
|
|
|
mods.Add(mod.Name, mod); |
|
|
|
item = new ListViewItem(new[] { mod.Name, mod.Author ?? "", (mod.Version ?? mod.LatestVersion)?.ToString() ?? "", mod.LastUpdated.ToString() }, modlist.Groups[mod.Installed ? "installed" : "available"]); |
|
|
|
item = new ListViewItem(new[] { mod.Name, mod.Author ?? "", (mod.Version ?? mod.LatestVersion)?.ToString() ?? "", mod.LatestVersion != null ? mod.LastUpdated.ToString() : "" }, modlist.Groups[mod.Installed ? "installed" : "available"]); |
|
|
|
item.Name = mod.Name; |
|
|
|
modlist.Items.Add(item); |
|
|
|
} |
|
|
|
if (mod.LatestVersion != null && mod.Version != null && mod.Version < mod.LatestVersion) |
|
|
|
item.ForeColor = Color.Blue; |
|
|
|
else if (mod.LastUpdated < lastGameUpdateTime) |
|
|
|
item.ForeColor = Color.DarkOrange; |
|
|
|
else |
|
|
|
item.ForeColor = modlist.ForeColor; |
|
|
|
} |
|
|
|