diff --git a/LarkatorGUI/MainWindow.xaml.cs b/LarkatorGUI/MainWindow.xaml.cs index 7bc52f6..6a7916e 100644 --- a/LarkatorGUI/MainWindow.xaml.cs +++ b/LarkatorGUI/MainWindow.xaml.cs @@ -321,13 +321,9 @@ private async Task FetchArkData(string targetFile) using (var response = await client.GetAsync(Properties.Resources.ArkDataURL)) { - Debug.WriteLine("Response status = ", response.StatusCode); - // Throw exception on failure response.EnsureSuccessStatusCode(); - Debug.WriteLine("Response was successful"); - // Don't do anything if the file hasn't changed if (response.StatusCode == HttpStatusCode.NotModified) return true; @@ -583,19 +579,15 @@ private void AdjustableGender_MouseWheel(object sender, MouseWheelEventArgs e) private void Result_MouseEnter(object sender, MouseEventArgs e) { - var fe = sender as FrameworkElement; - if (fe == null) return; - var dino = fe.DataContext as DinoViewModel; - if (dino == null) return; + if (!(sender is FrameworkElement fe)) return; + if (!(fe.DataContext is DinoViewModel dino)) return; //dino.Highlight = true; } private void Result_MouseLeave(object sender, MouseEventArgs e) { - var fe = sender as FrameworkElement; - if (fe == null) return; - var dino = fe.DataContext as DinoViewModel; - if (dino == null) return; + if (!(sender is FrameworkElement fe)) return; + if (!(fe.DataContext is DinoViewModel dino)) return; //dino.ClearValue(DinoViewModel.HighlightProperty); } diff --git a/LarkatorGUI/Properties/Settings.Designer.cs b/LarkatorGUI/Properties/Settings.Designer.cs index fc8c1f8..d85afa9 100644 --- a/LarkatorGUI/Properties/Settings.Designer.cs +++ b/LarkatorGUI/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace LarkatorGUI.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -179,7 +179,7 @@ public int ConvertDelay { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("15")] + [global::System.Configuration.DefaultSettingValueAttribute("14")] public int ListFontSize { get { return ((int)(this["ListFontSize"])); diff --git a/LarkatorGUI/Properties/Settings.settings b/LarkatorGUI/Properties/Settings.settings index 0607085..d6e47ff 100644 --- a/LarkatorGUI/Properties/Settings.settings +++ b/LarkatorGUI/Properties/Settings.settings @@ -36,7 +36,7 @@ 2000 - 15 + 14 0.9 diff --git a/LarkatorGUI/SettingsWindow.xaml b/LarkatorGUI/SettingsWindow.xaml index 407a282..eb9e117 100644 --- a/LarkatorGUI/SettingsWindow.xaml +++ b/LarkatorGUI/SettingsWindow.xaml @@ -34,14 +34,6 @@ - - ARK Tools (ark-tools.exe) - - - - - Save file (.ark) diff --git a/LarkatorGUI/Welcome.xaml b/LarkatorGUI/Welcome.xaml index 1bbb56e..be8fb54 100644 --- a/LarkatorGUI/Welcome.xaml +++ b/LarkatorGUI/Welcome.xaml @@ -111,47 +111,17 @@ - To get started we need to configure a few items... - + + e.g. SteamLibrary\steamapps\common\ARK\Shooter Game\Saved\SavedArksLocal\TheIsland.ark + - + - - - - - - 1) - - ARKTools is used to read from the saved ARK. - Please locate ark-tools.exe: - Or download it from here: https://survivetheark.com/index.php?/forums/topic/80750... - - - - - - - - - - - 2) - - Locate the ARK you wish to search within: - e.g. SteamLibrary\steamapps\common\ARK\Shooter Game\Saved\SavedArksLocal\TheIsland.ark - - - - - - - - - + + - + diff --git a/LarkatorGUI/Welcome.xaml.cs b/LarkatorGUI/Welcome.xaml.cs index 7a84108..69525cd 100644 --- a/LarkatorGUI/Welcome.xaml.cs +++ b/LarkatorGUI/Welcome.xaml.cs @@ -1,10 +1,8 @@ using Microsoft.Win32; using System; using System.ComponentModel; -using System.Diagnostics; using System.IO; using System.Windows; -using System.Windows.Documents; namespace LarkatorGUI { @@ -13,23 +11,12 @@ namespace LarkatorGUI /// public partial class Welcome : Window { - public string ArkToolsPath - { - get { return (string)GetValue(ArkToolsPathProperty); } - set { SetValue(ArkToolsPathProperty, value); } - } - - // Using a DependencyProperty as the backing store for ArkToolsPath. This enables animation, styling, binding, etc... - public static readonly DependencyProperty ArkToolsPathProperty = - DependencyProperty.Register("ArkToolsPath", typeof(string), typeof(Welcome), new PropertyMetadata("")); - public string SaveFilePath { get { return (string)GetValue(SaveFilePathProperty); } set { SetValue(SaveFilePathProperty, value); } } - // Using a DependencyProperty as the backing store for SaveFilePath. This enables animation, styling, binding, etc... public static readonly DependencyProperty SaveFilePathProperty = DependencyProperty.Register("SaveFilePath", typeof(string), typeof(Welcome), new PropertyMetadata("")); @@ -37,10 +24,8 @@ public Welcome() { InitializeComponent(); - DependencyPropertyDescriptor.FromProperty(ArkToolsPathProperty, GetType()).AddValueChanged(this, (_, __) => UpdateValidation()); DependencyPropertyDescriptor.FromProperty(SaveFilePathProperty, GetType()).AddValueChanged(this, (_, __) => UpdateValidation()); - ArkToolsPath = Properties.Settings.Default.ArkTools; SaveFilePath = Properties.Settings.Default.SaveFile; // Skip the Welcome window if we're already configured @@ -50,10 +35,9 @@ public Welcome() private void UpdateValidation() { - var toolsGood = File.Exists(ArkToolsPath); var saveGood = File.Exists(SaveFilePath) && SaveFilePath.EndsWith(".ark"); - LetsGoButton.IsEnabled = toolsGood && saveGood; + LetsGoButton.IsEnabled = saveGood; } private string CheckFile(string fullpath) @@ -64,29 +48,6 @@ private string CheckFile(string fullpath) return Path.GetDirectoryName(fullpath); } - private void BrowseArkTools_Click(object sender, RoutedEventArgs e) - { - var dialog = new OpenFileDialog() - { - AddExtension = true, - CheckFileExists = true, - CheckPathExists = true, - DereferenceLinks = false, - Multiselect = false, - DefaultExt = "ark-tools.exe", - Filter = "ARK Tools Executable|ark-tools.exe", - Title = "Locate ark-tools.exe...", - FileName = ArkToolsPath, - InitialDirectory = CheckFile(ArkToolsPath), - }; - - var result = dialog.ShowDialog(this); - if (result == true) - { - ArkToolsPath = dialog.FileName; - } - } - private void BrowseSaveFile_Click(object sender, RoutedEventArgs e) { var dialog = new OpenFileDialog() @@ -112,9 +73,7 @@ private void BrowseSaveFile_Click(object sender, RoutedEventArgs e) private void LetsGoButton_Click(object sender, RoutedEventArgs e) { - Properties.Settings.Default.ArkTools = ArkToolsPath; Properties.Settings.Default.SaveFile = SaveFilePath; - Properties.Settings.Default.Save(); SwitchToMainWindow(); @@ -126,10 +85,5 @@ private void SwitchToMainWindow() Close(); } - - private void LaunchHyperlink_Click(object sender, RoutedEventArgs e) - { - Process.Start((sender as Hyperlink).NavigateUri.ToString()); - } } } diff --git a/LarkatorGUI/app.config b/LarkatorGUI/app.config index 7f30ec8..74c3af5 100644 --- a/LarkatorGUI/app.config +++ b/LarkatorGUI/app.config @@ -41,7 +41,7 @@ 2000 - 15 + 14 0.9