Removed unused code. Minor code changes.
This commit is contained in:
parent
1602937be3
commit
950844a14b
@ -24,7 +24,7 @@ namespace GoldbergGUI.Core.Models
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_name = value;
|
_name = value;
|
||||||
_comparableName = Regex.Replace(value, Misc.SpecialCharsRegex, "").ToLower();
|
_comparableName = Regex.Replace(value, Misc.AlphaNumOnlyRegex, "").ToLower();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ namespace GoldbergGUI.Core.Services
|
|||||||
public SteamApp GetAppByName(string name)
|
public SteamApp GetAppByName(string name)
|
||||||
{
|
{
|
||||||
_log.Info($"Trying to get app {name}");
|
_log.Info($"Trying to get app {name}");
|
||||||
var comparableName = Regex.Replace(name, Misc.SpecialCharsRegex, "").ToLower();
|
var comparableName = Regex.Replace(name, Misc.AlphaNumOnlyRegex, "").ToLower();
|
||||||
var app = _caches[AppType.Game].Cache.FirstOrDefault(x => x.CompareName(comparableName));
|
var app = _caches[AppType.Game].Cache.FirstOrDefault(x => x.CompareName(comparableName));
|
||||||
if (app != null) _log.Info($"Successfully got app {app}");
|
if (app != null) _log.Info($"Successfully got app {app}");
|
||||||
return app;
|
return app;
|
||||||
|
@ -1,42 +1,25 @@
|
|||||||
using System.Collections.ObjectModel;
|
|
||||||
|
|
||||||
namespace GoldbergGUI.Core.Utils
|
namespace GoldbergGUI.Core.Utils
|
||||||
{
|
{
|
||||||
public class Misc
|
public static class Misc
|
||||||
{
|
{
|
||||||
public const string SpecialCharsRegex = "[^0-9a-zA-Z]+";
|
public const string AlphaNumOnlyRegex = "[^0-9a-zA-Z]+";
|
||||||
public const string DefaultLanguageSelection = "english";
|
}
|
||||||
public static readonly ObservableCollection<string> DefaultLanguages = new ObservableCollection<string>(new[]
|
|
||||||
|
public class GlobalHelp
|
||||||
{
|
{
|
||||||
"arabic",
|
public static string Header =>
|
||||||
"bulgarian",
|
"Information\n";
|
||||||
"schinese",
|
|
||||||
"tchinese",
|
public static string TextPreLink =>
|
||||||
"czech",
|
"Usually these settings are saved under";
|
||||||
"danish",
|
|
||||||
"dutch",
|
public static string Link => "%APPDATA%\\Goldberg SteamEmu Saves\\settings";
|
||||||
"english",
|
|
||||||
"finnish",
|
public static string TextPostLink =>
|
||||||
"french",
|
", which makes these " +
|
||||||
"german",
|
"available for every game that uses the Goldberg Emulator. However, if you want to set specific settings " +
|
||||||
"greek",
|
"for certain games (e.g. different language), you can remove the \"Global\" checkmark next to the option " +
|
||||||
"hungarian",
|
"and then change it. If you want to remove that setting, just empty the field while \"Global\" is " +
|
||||||
"italian",
|
"unchecked. (Not implemented yet!)";
|
||||||
"japanese",
|
|
||||||
"koreana",
|
|
||||||
"norwegian",
|
|
||||||
"polish",
|
|
||||||
"portuguese",
|
|
||||||
"brazilian",
|
|
||||||
"romanian",
|
|
||||||
"russian",
|
|
||||||
"spanish",
|
|
||||||
"latam",
|
|
||||||
"swedish",
|
|
||||||
"thai",
|
|
||||||
"turkish",
|
|
||||||
"ukrainian",
|
|
||||||
"vietnamese"
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,6 +11,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using GoldbergGUI.Core.Models;
|
using GoldbergGUI.Core.Models;
|
||||||
using GoldbergGUI.Core.Services;
|
using GoldbergGUI.Core.Services;
|
||||||
|
using GoldbergGUI.Core.Utils;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using MvvmCross.Commands;
|
using MvvmCross.Commands;
|
||||||
using MvvmCross.Logging;
|
using MvvmCross.Logging;
|
||||||
@ -251,9 +252,6 @@ namespace GoldbergGUI.Core.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string AboutVersionText =>
|
|
||||||
FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
|
|
||||||
|
|
||||||
public string StatusText
|
public string StatusText
|
||||||
{
|
{
|
||||||
get => _statusText;
|
get => _statusText;
|
||||||
@ -264,23 +262,8 @@ namespace GoldbergGUI.Core.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GlobalHelp
|
public static string AboutVersionText =>
|
||||||
{
|
FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
|
||||||
public static string Header =>
|
|
||||||
"Information\n";
|
|
||||||
|
|
||||||
public static string TextPreLink =>
|
|
||||||
"Usually these settings are saved under";
|
|
||||||
|
|
||||||
public static string Link => "%APPDATA%\\Goldberg SteamEmu Saves\\settings";
|
|
||||||
|
|
||||||
public static string TextPostLink =>
|
|
||||||
", which makes these " +
|
|
||||||
"available for every game that uses the Goldberg Emulator. However, if you want to set specific settings " +
|
|
||||||
"for certain games (e.g. different language), you can remove the \"Global\" checkmark next to the option " +
|
|
||||||
"and then change it. If you want to remove that setting, just empty the field while \"Global\" is " +
|
|
||||||
"unchecked. (Not implemented yet!)";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GlobalHelp G => new GlobalHelp();
|
public static GlobalHelp G => new GlobalHelp();
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="About" HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Width="54">
|
<TabItem Header="About" HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Width="54">
|
||||||
<StackPanel Margin="10,20,10,10">
|
<StackPanel Margin="10,20,10,10">
|
||||||
<Label VerticalAlignment="Stretch" Content="{Binding AboutVersionText}">
|
<Label VerticalAlignment="Stretch" Content="{Binding AboutVersionText, Mode=OneTime}">
|
||||||
<Label.ContentTemplate>
|
<Label.ContentTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using MvvmCross.Platforms.Wpf.Presenters.Attributes;
|
using MvvmCross.Platforms.Wpf.Presenters.Attributes;
|
||||||
using MvvmCross.Platforms.Wpf.Views;
|
|
||||||
|
|
||||||
|
// ReSharper disable UnusedType.Global
|
||||||
namespace GoldbergGUI.WPF.Views
|
namespace GoldbergGUI.WPF.Views
|
||||||
{
|
{
|
||||||
[MvxWindowPresentation(Identifier = nameof(SearchResultView), Modal = false)]
|
[MvxWindowPresentation(Identifier = nameof(SearchResultView), Modal = false)]
|
||||||
|
Loading…
Reference in New Issue
Block a user