From d7dca66360e0262775f094eefbdc26a3161c1eeb Mon Sep 17 00:00:00 2001 From: WesternGamer Date: Wed, 9 Nov 2022 19:30:14 -0500 Subject: [PATCH] Fixes --- Tools/TextureTool/Program.cs | 4 +++ Tools/TextureTool/Properties/AssemblyInfo.cs | 6 ++-- Tools/TextureTool/Views/AboutView.xaml | 2 +- Tools/TextureTool/Views/SettingsView.xaml.cs | 34 +++++++++----------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Tools/TextureTool/Program.cs b/Tools/TextureTool/Program.cs index 36cc77e5..f6ca2895 100644 --- a/Tools/TextureTool/Program.cs +++ b/Tools/TextureTool/Program.cs @@ -19,6 +19,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ using System; +using System.Windows.Forms; using TextureTool; using TextureTool.Utill; using TextureTool.Utill.Config; @@ -31,6 +32,9 @@ public class Program [STAThread] static void Main(string[] args) { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + FileSystem.Init(); XMLWriter.Init(); XMLReader.Init(); diff --git a/Tools/TextureTool/Properties/AssemblyInfo.cs b/Tools/TextureTool/Properties/AssemblyInfo.cs index 1f54a549..3275f24f 100644 --- a/Tools/TextureTool/Properties/AssemblyInfo.cs +++ b/Tools/TextureTool/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("RDR2TextureTool")] -[assembly: AssemblyCopyright("Copyright © WesternGamer 2021")] +[assembly: AssemblyCopyright("Copyright © WesternGamer 2022")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -28,5 +28,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.2.0")] -[assembly: AssemblyFileVersion("1.1.2.0")] +[assembly: AssemblyVersion("1.1.3.0")] +[assembly: AssemblyFileVersion("1.1.3.0")] diff --git a/Tools/TextureTool/Views/AboutView.xaml b/Tools/TextureTool/Views/AboutView.xaml index 2d5440a0..873c69bd 100644 --- a/Tools/TextureTool/Views/AboutView.xaml +++ b/Tools/TextureTool/Views/AboutView.xaml @@ -31,7 +31,7 @@ SOFTWARE.--> Neodymium146 - + WesternGamer diff --git a/Tools/TextureTool/Views/SettingsView.xaml.cs b/Tools/TextureTool/Views/SettingsView.xaml.cs index a7b7bcd0..f797ba19 100644 --- a/Tools/TextureTool/Views/SettingsView.xaml.cs +++ b/Tools/TextureTool/Views/SettingsView.xaml.cs @@ -46,7 +46,6 @@ public SettingsView() { InitializeComponent(); RedMInstallationFolderTextBox.Text = XMLReader.ConverterDirectory; - IsSettingsChanged = false; } private void ApplyClick(object sender, RoutedEventArgs e) @@ -58,8 +57,8 @@ private void ApplyClick(object sender, RoutedEventArgs e) RedMInstallationFolderTextBox.Text += @"\"; } XMLWriter.WriteXMLEntry("false", RedMInstallationFolderTextBox.Text); + XMLReader.ConverterDirectory = RedMInstallationFolderTextBox.Text; ApplyButton.IsEnabled = false; - IsSettingsChanged = true; } else { @@ -88,31 +87,28 @@ private void OpenFileExplorer(object sender, RoutedEventArgs e) private void OKClick(object sender, RoutedEventArgs e) { - if (IsSettingsChanged == false) + if (Directory.Exists(RedMInstallationFolderTextBox.Text)) + { + if (!RedMInstallationFolderTextBox.Text.EndsWith(@"\")) + { + RedMInstallationFolderTextBox.Text += @"\"; + } + XMLWriter.WriteXMLEntry("false", RedMInstallationFolderTextBox.Text); + XMLReader.ConverterDirectory = RedMInstallationFolderTextBox.Text; + } + else { - if (Directory.Exists(RedMInstallationFolderTextBox.Text)) + if (RedMInstallationFolderTextBox.Text == "") { - XMLWriter.WriteXMLEntry("false", RedMInstallationFolderTextBox.Text); - ApplyButton.IsEnabled = false; - IsSettingsChanged = true; - this.Close(); + MessageBox.Show("No path has been selected. Please select a path to continue.", "An Error has Occurred.", MessageBoxButton.OK, MessageBoxImage.Error); } else { - if (RedMInstallationFolderTextBox.Text == "") - { - MessageBox.Show("No path has been selected. Please select a path to continue.", "An Error has Occurred.", MessageBoxButton.OK, MessageBoxImage.Error); - } - else - { - MessageBox.Show(RedMInstallationFolderTextBox.Text + " is not a valid path. Please select a vaild path.", "An Error has Occurred.", MessageBoxButton.OK, MessageBoxImage.Error); - } + MessageBox.Show(RedMInstallationFolderTextBox.Text + " is not a valid path. Please select a vaild path.", "An Error has Occurred.", MessageBoxButton.OK, MessageBoxImage.Error); } } - else - { + this.Close(); - } } } }