You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
802 B

using SparkClient.ViewModel.BaseWindow;
using SparkClient.ViewModel.Configuration.SettingsPages;
using System.Windows.Input;
namespace SparkClient.ViewModel.Configuration;
public class SettingBaseVM : BaseViewModel
{
public SettingsVM CustomSetContent { get; }
public ModelColorSetPageVM ModelColorSetContent { get; }
public ICommand SaveCommand { get; }
public SettingBaseVM()
{
CustomSetContent = new SettingsVM();
ModelColorSetContent = new ModelColorSetPageVM();
SaveCommand = new RelayCommand(Save);
}
public void Save(object param)
{
if(CustomSetContent.SaveUpdate(param)&&
ModelColorSetContent.SaveUpdate(param))
{
WindowManager.mainViewModel.Content = WindowManager.PreviousVM();
}
}
}