disallowing illegal chartacters, new version string

This commit is contained in:
NicoAICP 2020-04-11 21:20:16 +02:00
parent 97aafc5388
commit b5d6abb3fe
7 changed files with 35 additions and 5 deletions

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,175,157,188" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,220,157,143" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,265,157,98" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,46" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,46" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,357,0,0" VerticalAlignment="Top" Width="127" Click="InjectGame" IsEnabled="{Binding CanInject}"/>
<Button Content="Set Path" HorizontalAlignment="Left" Margin="506,277,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Set Path" HorizontalAlignment="Left" Margin="506,232,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@ -133,5 +134,13 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
ini.Text = path;
}
}
private void gn_KeyUp(object sender, KeyEventArgs e)
{
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
gn.Text = reg.Replace(gn.Text, string.Empty);
gn.CaretIndex = gn.Text.Length;
gn.ScrollToHorizontalOffset(double.MaxValue);
}
}
}

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,167,157,196" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,212,157,151" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,257,157,106" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,329,157,34" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,329,157,34" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,353,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Set Path" HorizontalAlignment="Left" Margin="506,270,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Set Path" HorizontalAlignment="Left" Margin="506,225,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@ -141,5 +142,13 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.mw.tbTitleBar.Text = "UWUVCI AIO - TurboGrafX-CD VC INJECT";
}
}
private void gn_KeyUp(object sender, KeyEventArgs e)
{
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
gn.Text = reg.Replace(gn.Text, string.Empty);
gn.CaretIndex = gn.Text.Length;
gn.ScrollToHorizontalOffset(double.MaxValue);
}
}
}

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,157,157,206" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,202,157,161" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,247,157,116" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,316,157,47" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,316,157,47" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,340,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame" />
<Button Content="Set Path" HorizontalAlignment="Left" Margin="506,260,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Set Path" HorizontalAlignment="Left" Margin="506,215,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@ -120,6 +121,17 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
return false;
}
private void gn_KeyUp(object sender, KeyEventArgs e)
{
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
gn.Text = reg.Replace(gn.Text, string.Empty);
gn.CaretIndex = gn.Text.Length;
gn.ScrollToHorizontalOffset(double.MaxValue);
}
private void gn_KeyUp_1(object sender, KeyEventArgs e)
{
}
}
}

View file

@ -23,7 +23,7 @@
<Button Content="Credits" HorizontalAlignment="Left" Margin="1040,438,0,0" VerticalAlignment="Top" Width="80" Click="Button_Click_5"/>
<Button Content="Update Tools" HorizontalAlignment="Left" Margin="483,292,0,0" VerticalAlignment="Top" Width="117" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_7"/>
<Button Content="Check For Updates" HorizontalAlignment="Left" Margin="465,372,0,0" VerticalAlignment="Top" Width="153" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_6"/>
<TextBlock HorizontalAlignment="Left" Margin="1040,10,0,0" TextWrapping="Wrap" Text="v2.0 Beta" VerticalAlignment="Top" FontSize="20"/>
<TextBlock HorizontalAlignment="Left" Margin="1084,10,0,0" TextWrapping="Wrap" Text="v2.0" VerticalAlignment="Top" FontSize="20" Width="36"/>
<Button Content="Reset TitleKeys" HorizontalAlignment="Left" Margin="325,292,0,0" VerticalAlignment="Top" Width="153" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_8"/>
</Grid>