using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using System.Collections;
using VistaAdmin.Configuration.Models;

namespace WPF.SaveLoadXML
{
    public class SaveCommand : ICommand
    {
        #region ICommand Members

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            var data = parameter as XmlDataSource;
            if (data != null)
            {
                data.SaveData();
            }

        }

        #endregion
    }
}
