2020-03-01 13:12:17 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
using System.Windows.Navigation;
|
|
|
|
|
using System.Windows.Shapes;
|
2020-03-08 22:25:34 +00:00
|
|
|
|
using UWUVCI_AIO_WPF.UI.Frames;
|
2020-03-13 22:35:20 +00:00
|
|
|
|
|
|
|
|
|
using GameBaseClassLibrary;
|
2020-04-02 19:45:24 +00:00
|
|
|
|
using UWUVCI_AIO_WPF.UI.Frames.Path;
|
2020-03-01 13:12:17 +00:00
|
|
|
|
|
|
|
|
|
namespace UWUVCI_AIO_WPF
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaktionslogik für MainWindow.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class MainWindow : Window
|
|
|
|
|
{
|
|
|
|
|
public MainWindow()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2020-03-08 22:25:34 +00:00
|
|
|
|
load_frame.Content = new StartFrame();
|
2020-03-01 13:12:17 +00:00
|
|
|
|
}
|
|
|
|
|
private void ButtonCloseMenu_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ButtonOpenMenu.Visibility = Visibility.Visible;
|
|
|
|
|
ButtonCloseMenu.Visibility = Visibility.Collapsed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ButtonOpenMenu_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ButtonOpenMenu.Visibility = Visibility.Collapsed;
|
|
|
|
|
ButtonCloseMenu.Visibility = Visibility.Visible;
|
|
|
|
|
}
|
|
|
|
|
private void MoveWindow(object sender, MouseButtonEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (e.ChangedButton == MouseButton.Left)
|
|
|
|
|
this.DragMove();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-03-08 22:25:34 +00:00
|
|
|
|
private void DestroyFrame()
|
|
|
|
|
{
|
|
|
|
|
//(load_frame.Content as IDisposable).Dispose();
|
|
|
|
|
load_frame.Content = null;
|
|
|
|
|
load_frame.NavigationService.RemoveBackEntry();
|
|
|
|
|
}
|
2020-03-01 13:12:17 +00:00
|
|
|
|
private void ListView_Click(object sender, MouseButtonEventArgs e)
|
|
|
|
|
{
|
2020-04-02 23:45:12 +00:00
|
|
|
|
MainViewModel mvm = FindResource("mvm") as MainViewModel;
|
|
|
|
|
mvm.CanInject = false;
|
|
|
|
|
mvm.BaseDownloaded = false;
|
2020-03-08 22:25:34 +00:00
|
|
|
|
switch ((sender as ListView).SelectedIndex)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
2020-03-13 22:35:20 +00:00
|
|
|
|
DestroyFrame();
|
2020-03-08 22:25:34 +00:00
|
|
|
|
tbTitleBar.Text = "UWUVCI AIO - NDS VC INJECT";
|
2020-03-13 22:35:20 +00:00
|
|
|
|
load_frame.Content = new INJECTFRAME(GameConsoles.NDS);
|
2020-03-08 22:25:34 +00:00
|
|
|
|
break;
|
|
|
|
|
case 1:
|
2020-03-13 22:35:20 +00:00
|
|
|
|
DestroyFrame();
|
2020-03-08 22:25:34 +00:00
|
|
|
|
tbTitleBar.Text = "UWUVCI AIO - GBA VC INJECT";
|
2020-03-13 22:35:20 +00:00
|
|
|
|
load_frame.Content = new INJECTFRAME(GameConsoles.GBA);
|
2020-03-08 22:25:34 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2:
|
2020-03-13 22:35:20 +00:00
|
|
|
|
DestroyFrame();
|
2020-03-08 22:25:34 +00:00
|
|
|
|
tbTitleBar.Text = "UWUVCI AIO - N64 VC INJECT";
|
2020-03-13 22:35:20 +00:00
|
|
|
|
load_frame.Content = new INJECTFRAME(GameConsoles.N64);
|
2020-03-08 22:25:34 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3:
|
2020-03-13 22:35:20 +00:00
|
|
|
|
DestroyFrame();
|
2020-03-08 22:25:34 +00:00
|
|
|
|
tbTitleBar.Text = "UWUVCI AIO - NES VC INJECT";
|
2020-03-13 22:35:20 +00:00
|
|
|
|
load_frame.Content = new INJECTFRAME(GameConsoles.NES);
|
2020-03-08 22:25:34 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4:
|
2020-03-13 22:35:20 +00:00
|
|
|
|
DestroyFrame();
|
2020-03-08 22:25:34 +00:00
|
|
|
|
tbTitleBar.Text = "UWUVCI AIO - SNES VC INJECT";
|
2020-03-13 22:35:20 +00:00
|
|
|
|
load_frame.Content = new INJECTFRAME(GameConsoles.SNES);
|
2020-03-08 22:25:34 +00:00
|
|
|
|
break;
|
|
|
|
|
case 5:
|
2020-03-13 22:35:20 +00:00
|
|
|
|
DestroyFrame();
|
2020-03-08 22:25:34 +00:00
|
|
|
|
tbTitleBar.Text = "UWUVCI AIO - SETTINGS";
|
2020-04-02 19:45:24 +00:00
|
|
|
|
load_frame.Content = new SettingsFrame(this);
|
2020-03-08 22:25:34 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2020-03-01 13:12:17 +00:00
|
|
|
|
}
|
2020-04-02 19:45:24 +00:00
|
|
|
|
|
|
|
|
|
public void paths(bool remove)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
load_frame.Content = null;
|
|
|
|
|
if (remove)
|
|
|
|
|
{
|
|
|
|
|
load_frame.Content = new SettingsFrame(this);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
load_frame.Content = new Paths(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-01 13:12:17 +00:00
|
|
|
|
private void Window_Close(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Window_Minimize(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.WindowState = WindowState.Minimized;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|