Merge pull request #1 from stuff-by-3-random-dudes/julius

Julius
This commit is contained in:
NicoAICP 2020-03-01 16:15:49 +01:00 committed by GitHub
commit 1c0382d831
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();
}
}
}