This commit is contained in:
NicoAICP 2020-03-01 16:16:39 +01:00
commit 2b2b5c341a
3 changed files with 57 additions and 1 deletions

View file

@ -310,7 +310,7 @@ namespace UWUVCI_AIO_WPF
}
else
{
//DirectoryCopy(Path.Combine(Properties.Settings.Default.BaseRomPath, baserom), baseRomPath, true);
///DirectoryCopy(Path.Combine(Properties.Settings.Default.BaseRomPath, baserom), baseRomPath, true);
}
}

View file

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
namespace UWUVCI_AIO_WPF
{
public class BaseModel : INotifyPropertyChanged
{
// Declare the PropertyChanged event
public event PropertyChangedEventHandler PropertyChanged;
// OnPropertyChanged will raise the PropertyChanged event passing the
// source property that is being updated.
protected void OnPropertyChanged([CallerMemberName]string propertyName = "")
{
if (this.PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}

View file

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UWUVCI_AIO_WPF
{
class MainViewModel : BaseModel
{
//public GameConfig GameConfiguration { get; set; }
private GameConfig gameConfiguration;
public GameConfig GameConfiguration
{
get { return gameConfiguration; }
set
{
gameConfiguration = value;
OnPropertyChanged();
}
}
public bool PathsSet { get; set; } = false;
public MainViewModel()
{
GameConfiguration = new GameConfig();
}
}
}