DepartmentFavoriteFeed.cs CampusAppWP8::Feed::Departments::DepartmentFavoriteFeed CampusAppWP8::Feed::Departments System::IO //----------------------------------------------------------------------- //<copyrightfile="DepartmentFavoriteFeed.cs"company="BTU/IIT"> //Companycopyrighttag. //</copyright> //<author>fiedlchr</author> //<sience>01.07.2013</sience> //----------------------------------------------------------------------usingSystem; namespaceCampusAppWP8.Feed.Departments { usingSystem.IO; usingCampusAppWP8.Model; usingCampusAppWP8.Model.Departments; usingCampusAppWP8.Resources; publicclassDepartmentFavoriteFeed:XmlModel<DepartmentModel> { #regionConstructor publicDepartmentFavoriteFeed(boolautoLoad=true) :base(ModelType.File,Constants.FileDepartment_Favorite_Name,string.Empty) { this.isFileUpToDateOnLoad+=newIsFileUpToDate(this.CheckIsFileUpToDateOnLoad); this.isFileUpToDateOnSave+=newIsFileUpToDate(this.CheckIsFileUpToDateOnSave); if(autoLoad==true) { this.LoadData(); } } //Constructor #endregion #regionMethod #regionProtected privateboolCheckIsModelUpToDate(DepartmentModelmodel) { boolretValue=true; if((model==null) ||(model.Faculties==null) ||(model.Faculties.Count!=1)) { retValue=false; } returnretValue; } privateboolCheckIsFileUpToDateOnLoad(DepartmentModelmodel,FileInfoinfo) { boolretValue=false; if(this.Model==null) { retValue=true; } returnretValue; } privateboolCheckIsFileUpToDateOnSave(DepartmentModelmodel,FileInfoinfo) { boolretValue=false; retValue=(model.HasChanged()==false)?true:false; returnretValue; } //Protected #endregion //Method #endregion } }