Properly show name for GOW Ultimate Edition and Sea of Thieves

This commit is contained in:
Brian Lima 2018-05-24 14:28:04 -03:00
parent 976576761d
commit 3144c49dc4
3 changed files with 33 additions and 4 deletions

View File

@ -106,6 +106,19 @@ public string widestSquareIcon()
return result;
}
public string isKnownApp()
{
if (_aumid.Contains("Microsoft.SeaofThieves"))
{
return "Sea of Thieves";
}
else if (_aumid.Contains("Microsoft.DeltaPC"))
{
return "Gears of War: Ultimate Edition";
}
return "Name not found, double click here to edit";
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)

View File

@ -29,6 +29,11 @@ public FullScreenLauncher()
pallet.SetLightDark(true);
}
private void Chip2_Click(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9YPV3FHEFRAUQ");
}
string GetLauncherText()
{
int n = DateTime.Now.Second;

View File

@ -248,16 +248,27 @@ private void Bwr_DoWork(object sender, DoWorkEventArgs e)
{
//Remove end lines from the String and split both values, I split the appname and the AUMID using |
//I hope no apps have that in their name. Ever.
var valor = app.Replace("\r\n", "").Split('|');
if (!String.IsNullOrWhiteSpace(valor[0]))
var values = app.Replace("\r\n", "").Split('|');
if (!String.IsNullOrWhiteSpace(values[0]))
{
//We get the default square tile to find where the app stores it's icons, then we resolve which one is the widest
string logosPath = Path.GetDirectoryName(valor[1]);
string logosPath = Path.GetDirectoryName(values[1]);
Application.Current.Dispatcher.BeginInvoke((Action)delegate ()
{
Apps.Entries.Add(new AppEntry() { Name = valor[0], IconPath = logosPath, Aumid = valor[2], Selected = false });
Apps.Entries.Add(new AppEntry() { Name = values[0], IconPath = logosPath, Aumid = values[2], Selected = false });
});
}
if (values.Length > 2)
{
if (values[2].Contains("Microsoft.SeaofThieves"))
{
values[2] = "Sea of Thieves";
}
else if (values[2].Contains("Microsoft.DeltaPC"))
{
values[2] = "Gears of War: Ultimate Edition";
}
}
}
}
catch (Exception ex)