2020-03-13 22:35:20 +00:00
|
|
|
|
using GameBaseClassLibrary;
|
|
|
|
|
using System;
|
2020-03-01 15:52:59 +00:00
|
|
|
|
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>
|
2020-03-02 17:44:01 +00:00
|
|
|
|
public partial class INJECTFRAME : Page, IDisposable
|
2020-03-01 15:52:59 +00:00
|
|
|
|
{
|
2020-04-04 22:16:55 +00:00
|
|
|
|
MainViewModel mvm;
|
2020-03-13 22:35:20 +00:00
|
|
|
|
public INJECTFRAME(GameConsoles console)
|
2020-03-01 15:52:59 +00:00
|
|
|
|
{
|
2020-04-04 22:16:55 +00:00
|
|
|
|
mvm = FindResource("mvm") as MainViewModel;
|
2020-03-01 15:52:59 +00:00
|
|
|
|
InitializeComponent();
|
2020-03-13 22:35:20 +00:00
|
|
|
|
if(console == GameConsoles.N64)
|
2020-03-08 22:25:34 +00:00
|
|
|
|
{
|
|
|
|
|
fLoadConfig.Content = new InjectFrames.Configurations.N64Config();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
fLoadConfig.Content = new InjectFrames.Configurations.OtherConfigs();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fBaseFrame.Content = new InjectFrames.Bases.BaseContainerFrame(console);
|
2020-03-01 15:52:59 +00:00
|
|
|
|
}
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2020-03-01 16:15:54 +00:00
|
|
|
|
|
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
2020-03-08 22:25:34 +00:00
|
|
|
|
//import config
|
2020-04-06 19:30:31 +00:00
|
|
|
|
string s = mvm.selectConfig();
|
|
|
|
|
|
|
|
|
|
if (s != null)
|
|
|
|
|
{
|
|
|
|
|
if (mvm.GetConsoleOfConfig(s, mvm.GameConfiguration.Console))
|
|
|
|
|
{
|
|
|
|
|
mvm.ImportConfig(s);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
MessageBox.Show("Please re-select a base!");
|
|
|
|
|
|
2020-03-08 22:25:34 +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
|
|
|
|
}
|
2020-04-04 22:16:55 +00:00
|
|
|
|
|
|
|
|
|
private void Button_Click_2(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
mvm.Pack(true);
|
2020-04-06 17:50:12 +00:00
|
|
|
|
mvm.resetCBASE();
|
2020-04-04 22:16:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Button_Click_3(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
mvm.Pack(false);
|
2020-04-06 17:50:12 +00:00
|
|
|
|
mvm.resetCBASE();
|
2020-04-04 22:16:55 +00:00
|
|
|
|
}
|
2020-03-01 15:52:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|