gui stuff

This commit is contained in:
NicoAICP 2020-04-30 17:01:41 +02:00
parent ab9837ab31
commit cf8f5c3ca7
33 changed files with 809 additions and 116 deletions

View file

@ -25,6 +25,9 @@ using System.Diagnostics;
using Microsoft.WindowsAPICodePack.Dialogs;
using System.Text.RegularExpressions;
using MaterialDesignThemes.Wpf;
using NAudio.Wave;
using System.Timers;
using NAudio.Utils;
namespace UWUVCI_AIO_WPF
{
@ -772,7 +775,7 @@ namespace UWUVCI_AIO_WPF
DownloadWait dw = new DownloadWait("Packing Inject - Please Wait", "", this);
try
{
dw.Owner = mw;
dw.changeOwner(mw);
}
catch (Exception) { }
dw.ShowDialog();
@ -814,7 +817,7 @@ namespace UWUVCI_AIO_WPF
try
{
Injectwait.Owner = mw;
Injectwait.changeOwner(mw);
}
catch (Exception) { }
Injectwait.Topmost = true;
@ -841,8 +844,9 @@ namespace UWUVCI_AIO_WPF
DownloadWait dw = new DownloadWait("Injecting Game - Please Wait", "", this);
try
{
dw.Owner = mw;
}catch(Exception e) { }
dw.changeOwner(mw);
}
catch(Exception e) { }
dw.ShowDialog();
Progress = 0;
if (Injected)
@ -880,7 +884,7 @@ namespace UWUVCI_AIO_WPF
DownloadWait dw = new DownloadWait("Downloading needed Data - Please Wait", "", this);
try
{
dw.Owner = mw;
dw.changeOwner(mw);
}
catch (Exception) { }
dw.ShowDialog();
@ -923,7 +927,7 @@ namespace UWUVCI_AIO_WPF
DownloadWait dw = new DownloadWait("Downloading needed Data - Please Wait", "", this);
try
{
dw.Owner = mw;
dw.changeOwner(mw);
}
catch (Exception) { }
dw.ShowDialog();
@ -967,7 +971,7 @@ namespace UWUVCI_AIO_WPF
DownloadWait dw = new DownloadWait("Updating Tools - Please Wait", "", this);
try
{
dw.Owner = mw;
dw.changeOwner(mw);
}
catch (Exception)
{
@ -1051,7 +1055,7 @@ namespace UWUVCI_AIO_WPF
DownloadWait dw = new DownloadWait("Updating Base Files - Please Wait", "", this);
try
{
dw.Owner = mw;
dw.changeOwner(mw);
}
catch (Exception)
{
@ -1119,6 +1123,7 @@ namespace UWUVCI_AIO_WPF
string ret = string.Empty;
using (var dialog = new System.Windows.Forms.OpenFileDialog())
{
dialog.InitialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "configs");
dialog.Filter = "UWUVCI Config (*.uwuvci) | *.uwuvci";
DialogResult res = dialog.ShowDialog();
if (res == DialogResult.OK)
@ -1495,7 +1500,16 @@ namespace UWUVCI_AIO_WPF
if (CheckForInternetConnection())
{
Task.Run(() => ThreadDownload(missingTools));
new DownloadWait("Downloading Tools - Please Wait", "", this).ShowDialog();
DownloadWait dw = new DownloadWait("Downloading Tools - Please Wait", "", this);
try
{
dw.changeOwner(mw);
}
catch (Exception)
{
}
dw.ShowDialog();
Thread.Sleep(200);
//Download Tools
Progress = 0;
@ -1904,7 +1918,7 @@ namespace UWUVCI_AIO_WPF
DownloadWait dw = new DownloadWait("Downloading Base - Please Wait", "", this);
try
{
dw.Owner = mw;
dw.changeOwner(mw);
}
catch (Exception) { }
dw.ShowDialog();
@ -2697,5 +2711,81 @@ namespace UWUVCI_AIO_WPF
return responseFromServer;
}
}
WaveOutEvent waveOutEvent = new WaveOutEvent();
AudioFileReader audioFileReader;
public System.Timers.Timer t;
public void PlaySound()
{
Task ts = new Task(() =>
{
try
{
t = new System.Timers.Timer(200);
t.Elapsed += isDone;
audioFileReader = new AudioFileReader(BootSound);
waveOutEvent.Init(audioFileReader);
t.Start();
Console.WriteLine("Playing file..");
waveOutEvent.Play();
}
catch (Exception)
{
}
});
ts.Start();
}
public void isDoneMW()
{
try
{
if(waveOutEvent != null && audioFileReader != null)
{
waveOutEvent.Stop();
waveOutEvent.Dispose();
audioFileReader.Dispose();
t.Stop();
}
}
catch (Exception)
{
}
}
public void isDone(Object source, ElapsedEventArgs e)
{
try
{
if(waveOutEvent.PlaybackState == PlaybackState.Stopped)
{
waveOutEvent.Dispose();
audioFileReader.Dispose();
t.Stop();
}
if (waveOutEvent.GetPositionTimeSpan() > TimeSpan.FromSeconds(6))
{
waveOutEvent.Stop();
waveOutEvent.Dispose();
audioFileReader.Dispose();
t.Stop();
}
}
catch (Exception)
{
}
}
}
}

View file

@ -12,9 +12,9 @@
<TextBlock Text="Choose a Base from the dropdown menu" Margin="10,5,10,381" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" FontSize="15" Width="383"></TextBlock>
<ComboBox x:Name="cbCombo" HorizontalAlignment="Left" Margin="10,27,0,0" VerticalAlignment="Top" Width="383" Background="#FFCFCFCF" BorderBrush="#FF008BFF" ItemsSource="{Binding LGameBasesString}" SelectionChanged="ComboBox_SelectionChanged" SelectedItem="{Binding SelectedBaseAsString}">
</ComboBox>
<Frame Name="fLoadFrame" HorizontalAlignment="Left" Height="239" Margin="10,116,0,0" VerticalAlignment="Top" Width="383"/>
<Button Content="Copy ID" HorizontalAlignment="Left" Margin="298,61,0,0" VerticalAlignment="Top" Width="94" Height="31" Name="id" Click="id_Click" Visibility="Hidden" />
<Label Content="" HorizontalAlignment="Left" Margin="179,64,0,0" VerticalAlignment="Top" Width="114" Name="idtxt" Visibility="Hidden" Foreground="Black"/>
<Frame Name="fLoadFrame" HorizontalAlignment="Left" Height="290" Margin="10,116,0,0" VerticalAlignment="Top" Width="383"/>
<Button Content="Copy ID" HorizontalAlignment="Left" Margin="298,64,0,0" VerticalAlignment="Top" Width="94" Height="31" Name="id" Click="id_Click" Visibility="Hidden" />
<Label Content="" HorizontalAlignment="Left" Margin="179,67,0,0" VerticalAlignment="Top" Width="114" Name="idtxt" Visibility="Hidden" Foreground="Black"/>
</Grid>
</Page>

View file

@ -6,14 +6,14 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" d:DesignWidth="383"
Title="CustomBaseFrame" Height="239">
Title="CustomBaseFrame" Height="290">
<Grid DataContext="{StaticResource mvm}">
<TextBox materialDesign:HintAssist.Hint="BASE PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="0,5,108,191" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding CBasePath}" IsReadOnly="True" Focusable="False" Name="bar" />
<TextBox materialDesign:HintAssist.Hint="BASE PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="0,5,108,243" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding CBasePath}" IsReadOnly="True" Focusable="False" Name="bar" />
<Button Content="Set Path" HorizontalAlignment="Left" Margin="280,21,0,0" VerticalAlignment="Top" Width="103" Height="26" Click="Button_Click" IsEnabled="{Binding Ckeys}" Name="path"/>
<TextBlock x:Name="tbCode" HorizontalAlignment="Center" Margin="10,67,10,0" TextWrapping="Wrap" Text="Code folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbContent" HorizontalAlignment="Center" Margin="10,102,10,0" TextWrapping="Wrap" Text="Content folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbMeta" HorizontalAlignment="Center" Margin="10,137,10,0" TextWrapping="Wrap" Text="Meta folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<Button x:Name="CK" Content="Enter CKey" HorizontalAlignment="Left" Margin="280,178,0,0" VerticalAlignment="Top" Width="102" Click="CK_Click" />
<Button x:Name="CK" Content="Enter CKey" HorizontalAlignment="Left" Margin="280,252,0,0" VerticalAlignment="Top" Width="102" Click="CK_Click" />
</Grid>
</Page>

View file

@ -66,7 +66,15 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
mvm.BaseDownloaded = false;
mvm.CBasePath = null;
//warning if using custom bases program may crash
new Custom_Message("Information", "If using Custom Bases there will be a chance that the program crashes if adding a wrong base (example: a normal wiiu game instead of a nds vc game).\nA custom base is containing either the code/content/meta folders or Installable files (*.h3, *.app, ...)\nIf you add a wrong base, we will not assist you fixing it, other than telling you to use another base.\nIf you agree to this please hit continue").ShowDialog();
Custom_Message cm = new Custom_Message("Information", "If using Custom Bases there will be a chance that the program crashes if adding a wrong base (example: a normal wiiu game instead of a nds vc game).\nA custom base is containing either the code/content/meta folders or Installable files (*.h3, *.app, ...)\nIf you add a wrong base, we will not assist you fixing it, other than telling you to use another base.\nIf you agree to this please hit continue");
try {
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
if(mvm.choosefolder)
{

View file

@ -6,16 +6,16 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
d:DesignHeight="239" d:DesignWidth="383"
d:DesignHeight="290" d:DesignWidth="383"
Title="NonCustomBaseFrame">
<Grid>
<TextBlock x:Name="tbDWNL" HorizontalAlignment="Center" Margin="10,58,10,0" TextWrapping="Wrap" Text="Base not downloaded" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbTK" HorizontalAlignment="Center" Margin="10,93,10,0" TextWrapping="Wrap" Text="TitleKey missing" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbCK" HorizontalAlignment="Center" Margin="10,128,10,0" TextWrapping="Wrap" Text="CommonKey missing" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<Button x:Name="btnDwnlnd" Content="Download" HorizontalAlignment="Left" Margin="272,184,0,0" VerticalAlignment="Top" Width="111" IsEnabled="False" Click="btnDwnlnd_Click"/>
<Button x:Name="TK" Content="Enter TKey" HorizontalAlignment="Left" Margin="159,184,0,0" VerticalAlignment="Top" Width="102" Click="btnDwnlnd_Copy_Click" Visibility="Hidden" />
<Button x:Name="CK" Content="Enter CKey" HorizontalAlignment="Left" Margin="44,184,0,0" VerticalAlignment="Top" Width="102" Click="btnDwnlnd_Copy1_Click" Visibility="Hidden" />
<Button x:Name="btnDwnlnd" Content="Download" HorizontalAlignment="Left" Margin="258,252,0,0" VerticalAlignment="Top" Width="125" IsEnabled="False" Click="btnDwnlnd_Click"/>
<Button x:Name="TK" Content="Enter TKey" HorizontalAlignment="Left" Margin="129,252,0,0" VerticalAlignment="Top" Width="115" Click="btnDwnlnd_Copy_Click" />
<Button x:Name="CK" Content="Enter CKey" HorizontalAlignment="Left" Margin="0,252,0,0" VerticalAlignment="Top" Width="115" Click="btnDwnlnd_Copy1_Click" />
</Grid>
</Page>

View file

@ -27,15 +27,16 @@
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" >
<Label Content="DarkFilter:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<RadioButton Content="Keep" Width="78" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" IsChecked="True" Click="RadioButton_Click"/>
<RadioButton Content="Enabled" Width="78" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" IsChecked="True" Click="RadioButton_Click"/>
<RadioButton x:Name="rbRDF" Width="111" Content="Remove" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="rbRDF_Click"/>
<RadioButton x:Name="rbRDF" Width="111" Content="Disabled" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="rbRDF_Click"/>
</StackPanel>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" TextChanged="sound_TextChanged"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,376,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="SoundImg" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="SoundImg_MouseLeftButtonDown" Visibility="Hidden"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>

View file

@ -35,6 +35,34 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.setThing(this);
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
}
private void SoundImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
mvm.PlaySound();
}
private void sound_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (File.Exists(mvm.BootSound))
{
if (!new FileInfo(mvm.BootSound).Extension.Contains("btsnd"))
{
SoundImg.Visibility = Visibility.Visible;
}
else
{
SoundImg.Visibility = Visibility.Hidden;
}
}
}
catch (Exception)
{
}
}
public N64Config(GameConfig c)
{
@ -277,22 +305,59 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
ICOSHOW ics = new ICOSHOW(ic.Text);
try
{
ics.Owner = mvm.mw;
}
catch (Exception)
{
}
ics.ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text, false).ShowDialog();
TDRSHOW t = new TDRSHOW(tv.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text, true).ShowDialog();
TDRSHOW t = new TDRSHOW(drc.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
LOGSHOW t = new LOGSHOW(log.Text);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
@ -332,9 +397,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
try
{
string url = mvm.GetURL("n64");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url, "UWUVCI AIO - N64 Help");
TitleKeys webbrowser = new TitleKeys("n64", "UWUVCI AIO - N64 Help");
try
{
webbrowser.Owner = mvm.mw;
@ -343,7 +406,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
}
webbrowser.ShowDialog();
webbrowser.Show();
mvm.mw.Hide();
}
catch (Exception)
{

View file

@ -25,15 +25,16 @@
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" ToolTip="Patches Pokemon GBA games to work with GBA VC">
<Label Content="PokePatch:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<RadioButton Content="Yes" Width="78" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="RadioButton_Click"/>
<RadioButton Content="Enabled" Width="78" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="RadioButton_Click"/>
<RadioButton x:Name="rbRDF" Width="111" Content="No" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="rbRDF_Click" IsChecked="True"/>
<RadioButton x:Name="rbRDF" Width="111" Content="Disabled" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="rbRDF_Click" IsChecked="True"/>
</StackPanel>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" TextChanged="sound_TextChanged"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,376,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="SoundImg" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="SoundImg_MouseLeftButtonDown" Visibility="Hidden"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>

View file

@ -34,6 +34,34 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.setThing(this);
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
}
private void SoundImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
mvm.PlaySound();
}
private void sound_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (File.Exists(mvm.BootSound))
{
if (!new FileInfo(mvm.BootSound).Extension.Contains("btsnd"))
{
SoundImg.Visibility = Visibility.Visible;
}
else
{
SoundImg.Visibility = Visibility.Hidden;
}
}
}
catch (Exception)
{
}
}
public GBA(GameConfig c)
{
@ -253,12 +281,59 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
ICOSHOW ics = new ICOSHOW(ic.Text);
try
{
ics.Owner = mvm.mw;
}
catch (Exception)
{
}
ics.ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text,false).ShowDialog();
TDRSHOW t = new TDRSHOW(tv.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
TDRSHOW t = new TDRSHOW(drc.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
LOGSHOW t = new LOGSHOW(log.Text);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
public void imgpath(string icon, string tv)
{
@ -267,15 +342,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
icoIMG.Visibility = Visibility.Visible;
this.tv.Visibility = Visibility.Visible;
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text,true).ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
@ -314,9 +381,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
try
{
string url = mvm.GetURL("gba");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url, "UWUVCI AIO - GBA Help");
TitleKeys webbrowser = new TitleKeys("gba", "UWUVCI AIO - GBA Help");
try
{
webbrowser.Owner = mvm.mw;
@ -325,7 +391,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
}
webbrowser.ShowDialog();
webbrowser.Show();
mvm.mw.Hide();
}
catch (Exception)
{

View file

@ -29,13 +29,14 @@
<Label Content="Configuration:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<CheckBox Content="Force 4:3" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click" ToolTip="If checked Games will run in 4:3 instead of 16:9"/>
<CheckBox Content="Use GamePad" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click_1" ToolTip="If checked the GamePad will be used as a controller" Name="gp"/>
<CheckBox Content="Disable GamePad" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="129" Click="CheckBox_Click_1" ToolTip="If checked the GamePad will not be used as a controller" Name="gp"/>
</StackPanel>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" TextChanged="sound_TextChanged"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,376,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="SoundImg" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="SoundImg_MouseLeftButtonDown" Visibility="Hidden"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click_1"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>

View file

@ -35,6 +35,35 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.setThing(this);
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
mvm.test = GameConsoles.GCN;
mvm.Index = 1;
}
private void SoundImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
mvm.PlaySound();
}
private void sound_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (File.Exists(mvm.BootSound))
{
if (!new FileInfo(mvm.BootSound).Extension.Contains("btsnd"))
{
SoundImg.Visibility = Visibility.Visible;
}
else
{
SoundImg.Visibility = Visibility.Hidden;
}
}
}
catch (Exception)
{
}
}
public GCConfig(GameConfig c)
{
@ -44,6 +73,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.setThing(this);
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
mvm.test = GameConsoles.GCN;
mvm.Index = 1;
}
public void Dispose()
{
@ -153,7 +183,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
mvm.GC = true;
mvm.Inject(cd);
mvm.Index = -1;
mvm.Index = 1;
gp.IsChecked = false;
}
@ -285,13 +315,13 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void CheckBox_Click_1(object sender, RoutedEventArgs e)
{
if (mvm.Index == 1)
if (mvm.Index == -1)
{
mvm.Index = -1;
mvm.Index = 1;
}
else
{
mvm.Index = 1;
mvm.Index = -1;
}
}
@ -317,22 +347,59 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
ICOSHOW ics = new ICOSHOW(ic.Text);
try
{
ics.Owner = mvm.mw;
}
catch (Exception)
{
}
ics.ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text,false).ShowDialog();
TDRSHOW t = new TDRSHOW(tv.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text,true).ShowDialog();
TDRSHOW t = new TDRSHOW(drc.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
LOGSHOW t = new LOGSHOW(log.Text);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void ic_TextChanged(object sender, TextChangedEventArgs e)
@ -421,9 +488,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
try
{
string url = mvm.GetURL("gcn");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url, "UWUVCI AIO - GCN Help");
TitleKeys webbrowser = new TitleKeys("gcn", "UWUVCI AIO - GCN Help");
try
{
webbrowser.Owner = mvm.mw;
@ -432,7 +498,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
}
webbrowser.ShowDialog();
webbrowser.Show();
mvm.mw.Hide();
}
catch (Exception)
{

View file

@ -27,12 +27,13 @@
<Label Content="ROM Type:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<CheckBox Content="TurboGrafxCD" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click" />
</StackPanel>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" TextChanged="sound_TextChanged"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,376,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="SoundImg" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="SoundImg_MouseLeftButtonDown" Visibility="Hidden"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
</Grid>

View file

@ -43,6 +43,34 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration = c.Clone(); getInfoFromConfig();
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
}
private void SoundImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
mvm.PlaySound();
}
private void sound_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (File.Exists(mvm.BootSound))
{
if (!new FileInfo(mvm.BootSound).Extension.Contains("btsnd"))
{
SoundImg.Visibility = Visibility.Visible;
}
else
{
SoundImg.Visibility = Visibility.Hidden;
}
}
}
catch (Exception)
{
}
}
public void Dispose()
{
@ -268,22 +296,59 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
ICOSHOW ics = new ICOSHOW(ic.Text);
try
{
ics.Owner = mvm.mw;
}
catch (Exception)
{
}
ics.ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text,false).ShowDialog();
TDRSHOW t = new TDRSHOW(tv.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text,true).ShowDialog();
TDRSHOW t = new TDRSHOW(drc.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
LOGSHOW t = new LOGSHOW(log.Text);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
@ -325,9 +390,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
try
{
string url = mvm.GetURL("tgcd");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url, "UWUVCIO AIO - TGxCD Help");
TitleKeys webbrowser = new TitleKeys("tgcd", "UWUVCIO AIO - TGxCD Help");
try
{
webbrowser.Owner = mvm.mw;
@ -336,7 +400,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
}
webbrowser.ShowDialog();
webbrowser.Show();
mvm.mw.Hide();
}
catch (Exception)
{
@ -356,9 +421,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
try
{
string url = mvm.GetURL("tg16");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url, "UWUVCI AIO - TGx16 Help");
TitleKeys webbrowser = new TitleKeys("tg16", "UWUVCI AIO - TGx16 Help");
try
{
webbrowser.Owner = mvm.mw;
@ -367,7 +431,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
}
webbrowser.ShowDialog();
webbrowser.Show();
mvm.mw.Hide();
}
catch (Exception)
{

View file

@ -22,11 +22,12 @@
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" TextChanged="sound_TextChanged"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="WAV needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Text="{Binding BootSound}" Focusable="False" Cursor="Help"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,376,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="SoundImg" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="SoundImg_MouseLeftButtonDown" Visibility="Hidden"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>

View file

@ -70,7 +70,34 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
private void SoundImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
mvm.PlaySound();
}
private void sound_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (File.Exists(mvm.BootSound))
{
if (!new FileInfo(mvm.BootSound).Extension.Contains("btsnd"))
{
SoundImg.Visibility = Visibility.Visible;
}
else
{
SoundImg.Visibility = Visibility.Hidden;
}
}
}
catch (Exception)
{
}
}
private void InjectGame(object sender, RoutedEventArgs e)
{
if (File.Exists(tv.Text))
@ -246,22 +273,59 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
ICOSHOW ics = new ICOSHOW(ic.Text);
try
{
ics.Owner = mvm.mw;
}
catch (Exception)
{
}
ics.ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text,false).ShowDialog();
TDRSHOW t = new TDRSHOW(tv.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text,true).ShowDialog();
TDRSHOW t = new TDRSHOW(drc.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
LOGSHOW t = new LOGSHOW(log.Text);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
@ -302,9 +366,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
try
{
string url = mvm.GetURL(mvm.GameConfiguration.Console.ToString().ToLower());
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url, $"UWUVCIO AIO - {mvm.GameConfiguration.Console.ToString()} Help");
TitleKeys webbrowser = new TitleKeys(mvm.GameConfiguration.Console.ToString().ToLower(), $"UWUVCIO AIO - {mvm.GameConfiguration.Console.ToString()} Help");
try
{
webbrowser.Owner = mvm.mw;
@ -313,7 +376,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
}
webbrowser.ShowDialog();
webbrowser.Show();
mvm.mw.Hide();
}
catch (Exception)
{

View file

@ -30,11 +30,13 @@
<RadioButton Content="NTSC TO PAL" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click" Width="111"/>
<RadioButton Content="PAL TO NTSC" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click_1"/>
</StackPanel>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" TextChanged="sound_TextChanged"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,376,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="SoundImg" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="SoundImg_MouseLeftButtonDown" Visibility="Hidden"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>

View file

@ -354,24 +354,59 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
ICOSHOW ics = new ICOSHOW(ic.Text);
try
{
ics.Owner = mvm.mw;
}
catch (Exception)
{
}
ics.ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text,false).ShowDialog();
TDRSHOW t = new TDRSHOW(tv.Text, true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
TDRSHOW t = new TDRSHOW(drc.Text,true);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
LOGSHOW t = new LOGSHOW(log.Text);
try
{
t.Owner = mvm.mw;
}
catch (Exception)
{
}
t.ShowDialog();
}
private void ic_TextChanged(object sender, TextChangedEventArgs e)
@ -468,9 +503,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
try
{
string url = mvm.GetURL("wii");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url, "UWUVCI AIO - Wii Help");
TitleKeys webbrowser = new TitleKeys("wii", "UWUVCI AIO - Wii Help");
try
{
webbrowser.Owner = mvm.mw;
@ -479,7 +512,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
}
webbrowser.ShowDialog();
webbrowser.Show();
mvm.mw.Hide();
}
catch (Exception)
{
@ -495,5 +529,34 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
cm.Show();
}
}
private void SoundImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
mvm.PlaySound();
}
private void sound_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (File.Exists(mvm.BootSound))
{
if (!new FileInfo(mvm.BootSound).Extension.Contains("btsnd"))
{
SoundImg.Visibility = Visibility.Visible;
}
else
{
SoundImg.Visibility = Visibility.Hidden;
}
}
}
catch (Exception)
{
}
}
}
}

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="223.859" Width="717.416" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" SizeToContent="WidthAndHeight" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False">
Title="MAIN" Height="223.859" Width="717.416" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" SizeToContent="WidthAndHeight" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False">
<Grid Name="grid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="496*"/>

View file

@ -26,6 +26,17 @@ namespace UWUVCI_AIO_WPF.UI.Windows
bool add = false;
public Custom_Message(string title, string message)
{
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
InitializeComponent();
@ -55,6 +66,17 @@ namespace UWUVCI_AIO_WPF.UI.Windows
}
public Custom_Message(string title, string message, string Path)
{
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
InitializeComponent();
dont.Visibility = Visibility.Hidden;
Title.Text = title;

View file

@ -25,16 +25,38 @@ namespace UWUVCI_AIO_WPF.UI.Windows
DispatcherTimer timer = new DispatcherTimer();
public DownloadWait(string doing, string msg, MainViewModel mvm)
{
try
{
if (this.Owner.GetType() == typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
this.mvm = mvm;
InitializeComponent();
Key.Text = doing;
timer.Interval = TimeSpan.FromSeconds(1);
timer.Tick += timer_Tick;
timer.Start();
}
public DownloadWait(string doing, string msg, MainViewModel mvm, bool t)
{
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
this.mvm = mvm;
InitializeComponent();
Key.Text = doing;
@ -62,7 +84,21 @@ namespace UWUVCI_AIO_WPF.UI.Windows
}
}
public void changeOwner(MainWindow ow)
{
this.Owner = ow;
try
{
if (this.Owner.GetType() == typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
}
}

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="151.156" Width="493.5" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" GotFocus="Window_GotFocus">
Title="MAIN" Height="151.156" Width="493.5" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" GotFocus="Window_GotFocus">
<Grid DataContext="{StaticResource mvm}">
<Button Content="Check" HorizontalAlignment="Left" Margin="308,103,0,0" VerticalAlignment="Top" Width="74" Click="Button_Click_1"/>
<Button Content="Cancel" HorizontalAlignment="Left" Margin="400,103,0,0" VerticalAlignment="Top" Width="76" Click="Button_Click"/>

View file

@ -24,6 +24,17 @@ namespace UWUVCI_AIO_WPF.UI.Windows
Custom_Message cm;
public EnterKey(bool ckey)
{
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
InitializeComponent();
this.ckey = ckey;
@ -43,6 +54,10 @@ namespace UWUVCI_AIO_WPF.UI.Windows
public EnterKey(int i)
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
InitializeComponent();
region.Visibility = Visibility.Hidden;

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="98.501" Width="187.44" MinHeight="98.501" MinWidth="187.44" MaxHeight="98.501" MaxWidth="187.44" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
Title="MAIN" Height="98.501" Width="187.44" MinHeight="98.501" MinWidth="187.44" MaxHeight="98.501" MaxWidth="187.44" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
<Grid Margin="0,0,-4,0">
<Grid.RowDefinitions>

View file

@ -30,7 +30,17 @@ namespace UWUVCI_AIO_WPF.UI.Windows
BitmapImage bitmap = new BitmapImage();
public LOGSHOW(string path)
{
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
pat = String.Copy(path);
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"), true);

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="186" Width="145" MinHeight="186" MinWidth="145" MaxHeight="186" MaxWidth="145" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
Title="MAIN" Height="186" Width="145" MinHeight="186" MinWidth="145" MaxHeight="186" MaxWidth="145" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
<Grid Margin="0,0,-4,0">
<Grid.RowDefinitions>

View file

@ -30,7 +30,17 @@ namespace UWUVCI_AIO_WPF.UI.Windows
BitmapImage bitmap = new BitmapImage();
public ICOSHOW(string path)
{
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
pat = String.Copy(path);
InitializeComponent();

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="250" Width="340" MinHeight="250" MinWidth="340" MaxHeight="250" MaxWidth="340" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
Title="MAIN" Height="250" Width="340" MinHeight="250" MinWidth="340" MaxHeight="250" MaxWidth="340" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
<Grid Margin="0,0,-4,0">
<Grid.RowDefinitions>

View file

@ -30,7 +30,17 @@ namespace UWUVCI_AIO_WPF.UI.Windows
BitmapImage bitmap = new BitmapImage();
public TDRSHOW(string path, bool drc)
{
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
pat = String.Copy(path);
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"),true);

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="250" Width="490" MinHeight="250" MinWidth="490" MaxHeight="250" MaxWidth="490" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" SizeToContent="WidthAndHeight" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False">
Title="MAIN" Height="250" Width="490" MinHeight="250" MinWidth="490" MaxHeight="250" MaxWidth="490" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" SizeToContent="WidthAndHeight" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False">
<Grid>
<Grid.RowDefinitions>

View file

@ -31,9 +31,19 @@ namespace UWUVCI_AIO_WPF.UI.Windows
string tvback = "";
public IMG_Message(string icon, string tv, string repoid)
{
InitializeComponent();
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
InitializeComponent();
ic = icon;
tvs = tv;

View file

@ -87,6 +87,9 @@ namespace UWUVCI_AIO_WPF
mvm.bcf = null;
mvm.BootSound = null;
mvm.setThing(null);
mvm.gc2rom = null;
mvm.Index = -1;
mvm.isDoneMW();
switch ((sender as ListView).SelectedIndex)
{
case 0:

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Width="1194.525" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" MouseDown="MoveWindow" Background="LightGray" ResizeMode="NoResize" Height="670" ShowInTaskbar="False">
Title="MAIN" Width="1194.525" WindowStyle="None" WindowStartupLocation="CenterOwner" Foreground="White" Background="LightGray" MouseDown="MoveWindow" ResizeMode="NoResize" Height="670" ShowInTaskbar="False">
@ -16,7 +16,10 @@
<TextBlock x:Name="tb" Margin="572,174,563,70" TextWrapping="Wrap" FontSize="20" Height="142" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Foreground="Black" />
<WebBrowser HorizontalAlignment="Left" Height="600" VerticalAlignment="Top" Width="1190" Name="wb" Margin="5,0,0,0"/>
<Label Content="Loading Help... Please Wait" HorizontalAlignment="Left" Margin="430,281,0,0" VerticalAlignment="Top" FontSize="25" FontWeight="Bold" Name="load"/>
</Grid>
<Grid Height="70" VerticalAlignment="Top">
<Grid.Background>

View file

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@ -25,20 +26,85 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
public TitleKeys(string url)
{
MainViewModel mvm = FindResource("mvm") as MainViewModel;
try
{
if (this.Owner.GetType() != typeof(MainWindow))
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
}
catch (Exception)
{
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
InitializeComponent();
wb.Source = new Uri(url, UriKind.Absolute);
/*dynamic activeX = this.wb.GetType().InvokeMember("ActiveXInstance",
BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
null, this.wb, new object[] { });
string fullurl = "";
try
{
fullurl = mvm.GetURL(url);
if(fullurl == "" || fullurl == null)
{
throw new Exception();
}
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", $"The Helppage for {url.ToUpper()} is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
activeX.Silent = true;*/
}
cm.ShowDialog();
this.Close();
mvm.mw.Show();
}
load.Visibility = Visibility.Hidden;
wb.Source = new Uri(fullurl, UriKind.Absolute);
wb.Refresh(true);
clsWebbrowser_Errors.SuppressscriptErrors(wb, true);
}
public TitleKeys(string url, string title)
{
InitializeComponent();
wb.Source = new Uri(url, UriKind.Absolute);
MainViewModel mvm = FindResource("mvm") as MainViewModel;
string fullurl = "";
try
{
fullurl = mvm.GetURL(url);
if (fullurl == "" || fullurl == null)
{
throw new Exception();
}
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", $"The Helppage for {url.ToUpper()} is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
this.Close();
mvm.mw.Show();
}
load.Visibility = Visibility.Hidden;
wb.Source = new Uri(fullurl, UriKind.Absolute);
/*dynamic activeX = this.wb.GetType().InvokeMember("ActiveXInstance",
BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
null, this.wb, new object[] { });
@ -52,7 +118,15 @@ namespace UWUVCI_AIO_WPF.UI.Windows
try
{
if (e.ChangedButton == MouseButton.Left)
{
this.Owner.PointToScreen(new Point(this.Left, this.Top));
this.DragMove();
// this.Owner.PointFromScreen(new Point(this.Left, this.Top));
//(FindResource("mvm") as MainViewModel).mw.PointFromScreen(new Point(this.Left, this.Top));
}
//PointFromScreen(new Point(this.Left, this.Top));
}
catch (Exception)
{
@ -63,6 +137,9 @@ namespace UWUVCI_AIO_WPF.UI.Windows
private void Window_Close(object sender, RoutedEventArgs e)
{
this.Owner.Left = this.Left;
this.Owner.Top = this.Top;
this.Owner.Show();
this.Close();
}
@ -70,6 +147,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
this.WindowState = WindowState.Minimized;
}
}
public static class clsWebbrowser_Errors
@ -102,6 +180,6 @@ namespace UWUVCI_AIO_WPF.UI.Windows
objComWebBrowser.GetType().InvokeMember("Silent", BindingFlags.SetProperty, null, objComWebBrowser, new object[] { hide });
}
}
}