Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WesternGamer committed Nov 10, 2022
1 parent a889a2d commit d7dca66
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
4 changes: 4 additions & 0 deletions Tools/TextureTool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,6 +32,9 @@ public class Program
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

FileSystem.Init();
XMLWriter.Init();
XMLReader.Init();
Expand Down
6 changes: 3 additions & 3 deletions Tools/TextureTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("")]

Expand All @@ -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")]
2 changes: 1 addition & 1 deletion Tools/TextureTool/Views/AboutView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SOFTWARE.-->
<TextBlock x:Name="OriginalProgrammerLabel" HorizontalAlignment="Center" Margin="0,105,0,0" TextWrapping="Wrap" Text="Original Programmer: " VerticalAlignment="Top" FontSize="16" Foreground="White">
<Hyperlink NavigateUri="https://github.com/Neodymium146" RequestNavigate="Hyperlink_RequestNavigate">Neodymium146</Hyperlink>
</TextBlock>
<TextBlock x:Name="ReprogrammedByLabel" HorizontalAlignment="Center" Margin="0,130,0,0" TextWrapping="Wrap" Text="Reprogrammed by: " VerticalAlignment="Top" FontSize="16" Foreground="White">
<TextBlock x:Name="ReprogrammedByLabel" HorizontalAlignment="Center" Margin="0,130,0,0" TextWrapping="Wrap" Text="This version by: " VerticalAlignment="Top" FontSize="16" Foreground="White">
<Hyperlink NavigateUri="https://github.com/WesternGamer" RequestNavigate="Hyperlink_RequestNavigate">WesternGamer</Hyperlink>
</TextBlock>
<TextBlock x:Name="OriginalSourceCodeLabel" HorizontalAlignment="Center" Margin="0,155,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="16" Foreground="White">
Expand Down
34 changes: 15 additions & 19 deletions Tools/TextureTool/Views/SettingsView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public SettingsView()
{
InitializeComponent();
RedMInstallationFolderTextBox.Text = XMLReader.ConverterDirectory;
IsSettingsChanged = false;
}

private void ApplyClick(object sender, RoutedEventArgs e)
Expand All @@ -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
{
Expand Down Expand Up @@ -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();
}
}
}
}

0 comments on commit d7dca66

Please sign in to comment.