//----------------------------------------------------------------------- // // Company copyright tag. // // stubbfel // 23.07.2013 //---------------------------------------------------------------------- namespace CampusAppWP8.File.Setting { using System.IO; using CampusAppWP8.Model; using CampusAppWP8.Model.Setting; using CampusAppWP8.Resources; /// /// Class for handle the user-profile-file /// public class UserProfilFile : XmlModel { #region Constructor /// /// Initializes a new instance of the class. /// public UserProfilFile() : base(ModelType.File, Constants.FileProfil_User) { this.isFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad); this.isFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave); } // Constructor #endregion /// /// Method implement CheckIsFileUpToDate()-Method . /// /// model object /// file info object /// true, if file is up-to-date, otherwise false private bool CheckIsFileUpToDateOnLoad(UserProfilModel model, FileInfo info) { if (model == null) { return true; } return false; } /// /// Method implement CheckIsFileUpToDate()-Method . /// /// model object /// file info object /// true, if file is up-to-date, otherwise false private bool CheckIsFileUpToDateOnSave(UserProfilModel model, FileInfo info) { if (model != null && !model.HasChanged()) { return true; } return false; } } }