|
|
@ -41,6 +41,8 @@ public class LevelConfigVM : BaseViewModel |
|
|
|
public bool InstitutesEnabled { get { return _institutesEnabled; } set { _institutesEnabled = value; OnPropertyChanged("InstitutesEnabled"); } } |
|
|
|
public bool InstitutesEnabled { get { return _institutesEnabled; } set { _institutesEnabled = value; OnPropertyChanged("InstitutesEnabled"); } } |
|
|
|
private bool _shapesEnabled = true; |
|
|
|
private bool _shapesEnabled = true; |
|
|
|
public bool ShapesEnabled { get { return _shapesEnabled; } set { _shapesEnabled = value; OnPropertyChanged("ShapesEnabled"); } } |
|
|
|
public bool ShapesEnabled { get { return _shapesEnabled; } set { _shapesEnabled = value; OnPropertyChanged("ShapesEnabled"); } } |
|
|
|
|
|
|
|
private bool _isUpdateButtonEnabled; |
|
|
|
|
|
|
|
public bool IsUpdateButtonEnabled { get { return _isUpdateButtonEnabled; } set { _isUpdateButtonEnabled = value; OnPropertyChanged("IsUpdateButtonEnabled"); } } |
|
|
|
|
|
|
|
|
|
|
|
JsonEntity jsonEntity = new JsonEntity(); |
|
|
|
JsonEntity jsonEntity = new JsonEntity(); |
|
|
|
|
|
|
|
|
|
|
@ -61,6 +63,7 @@ public class LevelConfigVM : BaseViewModel |
|
|
|
SaveLevelConfigCommand = new RelayCommand(SaveLevelConfig); |
|
|
|
SaveLevelConfigCommand = new RelayCommand(SaveLevelConfig); |
|
|
|
InitLevelConfig(null); |
|
|
|
InitLevelConfig(null); |
|
|
|
InitData(); |
|
|
|
InitData(); |
|
|
|
|
|
|
|
IsUpdateButtonEnabled = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -482,6 +485,7 @@ public class LevelConfigVM : BaseViewModel |
|
|
|
{ |
|
|
|
{ |
|
|
|
InstitutesEnabled = false; |
|
|
|
InstitutesEnabled = false; |
|
|
|
ShapesEnabled = false; |
|
|
|
ShapesEnabled = false; |
|
|
|
|
|
|
|
IsUpdateButtonEnabled = true; |
|
|
|
Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog(); |
|
|
|
Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog(); |
|
|
|
openFileDialog.Filter = "Text files (*.enc)|*.enc|All files (*.*)|*.*"; |
|
|
|
openFileDialog.Filter = "Text files (*.enc)|*.enc|All files (*.*)|*.*"; |
|
|
|
jsonEntity = null; |
|
|
|
jsonEntity = null; |
|
|
@ -499,6 +503,9 @@ public class LevelConfigVM : BaseViewModel |
|
|
|
{ |
|
|
|
{ |
|
|
|
InstitutesEnabled = true; |
|
|
|
InstitutesEnabled = true; |
|
|
|
ShapesEnabled = true; |
|
|
|
ShapesEnabled = true; |
|
|
|
|
|
|
|
IsUpdateButtonEnabled = false; |
|
|
|
|
|
|
|
InitData(); |
|
|
|
|
|
|
|
ChangeShapeModel(""); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (jsonEntity != null) |
|
|
|
if (jsonEntity != null) |
|
|
@ -571,7 +578,7 @@ public class LevelConfigVM : BaseViewModel |
|
|
|
public void ChangeShapeModel(object param) |
|
|
|
public void ChangeShapeModel(object param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (ShapeId!= null && ShapeId != string.Empty) { |
|
|
|
if (ShapeId!= null && ShapeId != string.Empty) { |
|
|
|
setInstitutes(ShapeId); |
|
|
|
InstituteId = setInstitutes(ShapeId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|