UWUVCI-AIO-WPF/UWUVCI AIO WPF/UI/Frames/InjectFrame.xaml.cs

121 lines
3.7 KiB
C#
Raw Normal View History

using GameBaseClassLibrary;
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;
namespace UWUVCI_AIO_WPF.UI.Frames
{
/// <summary>
/// Interaktionslogik für NDSFrame.xaml
/// </summary>
public partial class INJECTFRAME : Page, IDisposable
{
MainViewModel mvm;
GameConsoles console;
public INJECTFRAME(GameConsoles console)
{
mvm = FindResource("mvm") as MainViewModel;
InitializeComponent();
this.console = console;
if(console == GameConsoles.N64)
{
fLoadConfig.Content = new InjectFrames.Configurations.N64Config();
2020-04-07 03:55:44 +00:00
} else if (console == GameConsoles.TG16)
{
fLoadConfig.Content = new InjectFrames.Configurations.TurboGrafX();
}
2020-04-21 02:05:19 +00:00
else if (console == GameConsoles.GBA)
{
fLoadConfig.Content = new InjectFrames.Configurations.GBA();
}
2020-04-16 04:41:25 +00:00
else if (console == GameConsoles.WII)
{
fLoadConfig.Content = new InjectFrames.Configurations.WiiConfig();
}
else if (console == GameConsoles.GCN)
{
fLoadConfig.Content = new InjectFrames.Configurations.GCConfig();
}
else
{
fLoadConfig.Content = new InjectFrames.Configurations.OtherConfigs();
}
fBaseFrame.Content = new InjectFrames.Bases.BaseContainerFrame(console);
}
2020-04-21 02:05:19 +00:00
public INJECTFRAME(GameConsoles console, GameConfig c)
{
mvm = FindResource("mvm") as MainViewModel;
InitializeComponent();
this.console = console;
if (console == GameConsoles.N64)
{
fLoadConfig.Content = new InjectFrames.Configurations.N64Config(c);
}
else if (console == GameConsoles.TG16)
{
fLoadConfig.Content = new InjectFrames.Configurations.TurboGrafX(c);
}
else if (console == GameConsoles.GBA)
{
fLoadConfig.Content = new InjectFrames.Configurations.GBA(c);
}
else if (console == GameConsoles.WII)
{
fLoadConfig.Content = new InjectFrames.Configurations.WiiConfig(c);
}
else if (console == GameConsoles.GCN)
{
fLoadConfig.Content = new InjectFrames.Configurations.GCConfig(c);
}
else
{
fLoadConfig.Content = new InjectFrames.Configurations.OtherConfigs(c);
}
fBaseFrame.Content = new InjectFrames.Bases.BaseContainerFrame(console);
}
public void Dispose()
{
}
2020-03-01 16:15:54 +00:00
private void Button_Click(object sender, RoutedEventArgs e)
{
//import config
mvm.selectConfig(console);
2020-04-06 19:30:31 +00:00
2020-04-06 19:30:31 +00:00
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
//Export config
2020-04-06 19:30:31 +00:00
mvm.ExportFile();
2020-03-01 16:15:54 +00:00
}
private void Button_Click_2(object sender, RoutedEventArgs e)
{
mvm.Pack(true);
mvm.resetCBASE();
}
private void Button_Click_3(object sender, RoutedEventArgs e)
{
mvm.Pack(false);
mvm.resetCBASE();
}
}
}