mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-22 13:23:24 +12:00
Some cleanup
This commit is contained in:
parent
71c0bc0557
commit
104351a016
|
@ -11,6 +11,7 @@ namespace ModAssistant
|
|||
{
|
||||
public string name;
|
||||
public string version;
|
||||
public string gameVersion;
|
||||
public string _id;
|
||||
public string authorId;
|
||||
public string uploadedDate;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<GridViewColumn x:Name="InstalledColumn" Header="Installed">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding InstalledVersion}" Foreground="{Binding IsOutdated}" />
|
||||
<TextBlock Text="{Binding InstalledVersion}" Foreground="{Binding GetVersionColor}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
|
|
@ -393,40 +393,24 @@ namespace ModAssistant.Pages
|
|||
|
||||
public bool IsInstalled { get; set; }
|
||||
private string _installedVersion { get; set; }
|
||||
public string InstalledVersion {
|
||||
public string InstalledVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (String.IsNullOrEmpty(_installedVersion) || !IsInstalled)
|
||||
{
|
||||
return "-";
|
||||
}
|
||||
else
|
||||
{
|
||||
return _installedVersion;
|
||||
}
|
||||
return (String.IsNullOrEmpty(_installedVersion) || !IsInstalled) ? "-" : _installedVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
_installedVersion = value;
|
||||
}
|
||||
}
|
||||
public string IsOutdated {
|
||||
|
||||
public string GetVersionColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsInstalled)
|
||||
{
|
||||
if (InstalledVersion == ModVersion)
|
||||
{
|
||||
return "Green"; //green
|
||||
} else
|
||||
{
|
||||
return "Red"; //red
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Black"; //grey
|
||||
}
|
||||
if (!IsInstalled) return "Black";
|
||||
return InstalledVersion == ModVersion ? "Green" : "Red";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue