diff --git a/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceInformation.cs b/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceInformation.cs index f23d4124..96390875 100644 --- a/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceInformation.cs +++ b/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceInformation.cs @@ -7,20 +7,35 @@ //---------------------------------------------------------------------- namespace CampusAppDLL.Model.GeoDb { + using System; using System.Xml.Serialization; /// Information about the place. /// Stubbfel, 19.08.2013. - public class PlaceInformation + public class PlaceInformation : IEquatable { /// Gets or sets the name of the information. /// The name of the information. - [XmlElement("placeInformationName")] + [XmlAttribute("placeInformationName")] public string InformationName { get; set; } /// Gets or sets the information value. /// The information value. [XmlText] public string InformationValue { get; set; } + + /// Tests if this PlaceInformation is considered equal to another. + /// Stubbfel, 09.09.2013. + /// The place information to compare to this object. + /// true if the objects are considered equal, false if they are not. + public bool Equals(PlaceInformation other) + { + if (other.InformationName.Equals(this.InformationName)) + { + return true; + } + + return false; + } } } diff --git a/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceModel.cs b/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceModel.cs index 8e0a0d20..939b4f76 100644 --- a/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceModel.cs +++ b/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceModel.cs @@ -8,13 +8,16 @@ namespace CampusAppDLL.Model.GeoDb { + using System; + using System.Collections.Generic; using System.Collections.ObjectModel; + using System.Text.RegularExpressions; using System.Xml.Serialization; /// /// Model for a place of the SPSService /// - public class PlaceModel + public class PlaceModel : IEquatable { /// /// Gets or sets the placeId @@ -34,6 +37,7 @@ namespace CampusAppDLL.Model.GeoDb [XmlAttribute("refpoint")] public string RefPoint { get; set; } + /// Gets or sets the information. /// The information. [XmlElement("placeInformation")] @@ -43,5 +47,121 @@ namespace CampusAppDLL.Model.GeoDb /// The services. [XmlElement("placeService")] public ObservableCollection Services { get; set; } + + /// Converts this object to a nfc string. + /// Stubbfel, 21.08.2013. + /// This object as a string. + public string ToNfcString() + { + string nfcStr = "{\"pid\":\"" + this.PlaceId + "\",\"parent\":\"" + this.ParentId + "\"}"; + return nfcStr; + } + + /// Tests if this PlaceModel is considered equal to another. + /// Stubbfel, 09.09.2013. + /// The place model to compare to this object. + /// true if the objects are considered equal, false if they are not. + public bool Equals(PlaceModel other) + { + if (other.PlaceId.Equals(this.PlaceId)) + { + return true; + } + + return false; + } + + /// Adds a place informations. + /// Stubbfel, 09.09.2013. + /// The place informations. + public void AddPlaceInformations(List placeInformations) + { + foreach (PlaceInformation info in placeInformations) + { + if (this.Informations.Contains(info)) + { + int index = this.Informations.IndexOf(info); + this.Informations[index].InformationValue = info.InformationValue; + } + else + { + this.Informations.Add(info); + } + } + } + + /// Adds a place services. + /// Stubbfel, 09.09.2013. + /// The place services. + public void AddPlaceServices(List placeServices) + { + foreach (PlaceService service in placeServices) + { + if (this.Services.Contains(service)) + { + int index = this.Services.IndexOf(service); + this.Services[index].Request = service.Request; + this.Services[index].SAP = service.SAP; + } + else + { + this.Services.Add(service); + } + } + } + + /// Query if 'names' contains information names. + /// Stubbfel, 09.09.2013. + /// The names. + /// true if it succeeds, false if it fails. + public bool ContainsInformationNames(List names) + { + foreach (string name in names) + { + bool tmpResult = false; + foreach (PlaceInformation info in this.Informations) + { + if (name.Equals(info.InformationName)) + { + tmpResult = true; + break; + } + } + + if (!tmpResult) + { + return tmpResult; + } + } + + return true; + } + + /// Query if 'services' contains service names. + /// Stubbfel, 09.09.2013. + /// The services. + /// true if it succeeds, false if it fails. + public bool ContainsServiceNames(List services) + { + foreach (string name in services) + { + bool tmpResult = false; + foreach (PlaceService service in this.Services) + { + if (name.Equals(service.ServiceName)) + { + tmpResult = true; + break; + } + } + + if (!tmpResult) + { + return tmpResult; + } + } + + return true; + } } } diff --git a/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceService.cs b/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceService.cs index 7e17403c..2804886d 100644 --- a/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceService.cs +++ b/CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceService.cs @@ -8,11 +8,12 @@ namespace CampusAppDLL.Model.GeoDb { + using System; using System.Xml.Serialization; /// Place service. /// Stubbfel, 19.08.2013. - public class PlaceService + public class PlaceService : IEquatable { /// Gets or sets the name of the service. /// The name of the service. @@ -28,5 +29,29 @@ namespace CampusAppDLL.Model.GeoDb /// The request. [XmlElement("request")] public string Request { get; set; } + + /// Gets the URL string. + /// The URL string. + public string URLString + { + get + { + return this.SAP + this.Request; + } + } + + /// Tests if this PlaceService is considered equal to another. + /// Stubbfel, 09.09.2013. + /// The place service to compare to this object. + /// true if the objects are considered equal, false if they are not. + public bool Equals(PlaceService other) + { + if (other.ServiceName.Equals(this.ServiceName)) + { + return true; + } + + return false; + } } } diff --git a/CampusAppWP8/CampusAppDLL/Model/GeoDb/SpsModel.cs b/CampusAppWP8/CampusAppDLL/Model/GeoDb/SpsModel.cs index 4fa4bb86..396fa73e 100644 --- a/CampusAppWP8/CampusAppDLL/Model/GeoDb/SpsModel.cs +++ b/CampusAppWP8/CampusAppDLL/Model/GeoDb/SpsModel.cs @@ -23,6 +23,7 @@ namespace CampusAppDLL.Model.GeoDb /// Stubbfel, 20.08.2013. public SpsModel() { + this.HasChanged = false; this.Places = new ObservableCollection(); } @@ -32,6 +33,10 @@ namespace CampusAppDLL.Model.GeoDb [XmlElement("place")] public ObservableCollection Places { get; set; } + /// Gets a value indicating whether this object has changed. + /// true if this object has changed, false if not. + public bool HasChanged { get; set; } + /// Gets places by information. /// Stubbfel, 19.08.2013. /// The query. @@ -83,5 +88,113 @@ namespace CampusAppDLL.Model.GeoDb return resultplaces.ToList(); } + + /// Adds the places. + /// Stubbfel, 09.09.2013. + /// A list of places. + public void AddPlaces(List places) + { + foreach (PlaceModel place in places) + { + if (this.Places.Contains(place)) + { + int index = this.Places.IndexOf(place); + this.Places[index].AddPlaceInformations(place.Informations.ToList()); + this.Places[index].AddPlaceServices(place.Services.ToList()); + } + else + { + this.Places.Add(place); + } + } + this.HasChanged = true; + } + + /// Creates PID list. + /// Stubbfel, 09.09.2013. + /// The new PID list. + public List CreatePidList() + { + List pidList = new List(); + foreach (PlaceModel place in this.Places) + { + pidList.Add(place.PlaceId); + } + + return pidList; + } + + /// Gets place by identifier. + /// Stubbfel, 09.09.2013. + /// The identifier. + /// The place by identifier. + public PlaceModel GetPlaceById(string id) + { + foreach (PlaceModel place in this.Places) + { + if (place.PlaceId.Equals(id)) + { + return place; + } + } + + return null; + } + + /// Query if 'pidList' contains information names. + /// Stubbfel, 09.09.2013. + /// List of pids. + /// The names. + /// true if it succeeds, false if it fails. + public bool ContainsInformationNames(List pidList, List names) + { + foreach (string pid in pidList) + { + PlaceModel place = this.GetPlaceById(pid); + if (!place.ContainsInformationNames(names)) + { + return false; + } + } + + return true; + } + + /// Query if 'pidList' contains service names. + /// Stubbfel, 09.09.2013. + /// List of pids. + /// The names. + /// true if it succeeds, false if it fails. + public bool ContainsServiceNames(List pidList, List names) + { + foreach (string pid in pidList) + { + PlaceModel place = this.GetPlaceById(pid); + if (!place.ContainsServiceNames(names)) + { + return false; + } + } + + return true; + } + + /// Filter by PID. + /// Stubbfel, 11.09.2013. + /// List of pids. + /// flitered list of places + public List FilterByPid(List pidList) + { + List fitlerList = new List(); + foreach (PlaceModel place in this.Places) + { + if (pidList.Contains(place.PlaceId)) + { + fitlerList.Add(place); + } + } + + return fitlerList; + } } } diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs index b6a1eeaf..e6b79166 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs @@ -17,6 +17,8 @@ namespace CampusAppWP8.Api.GeoApi /// public class CampusSpsApi : SpsApi { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -25,6 +27,10 @@ namespace CampusAppWP8.Api.GeoApi { } + #endregion + + #region Method + /// /// Method set the UriParameter of a campusRequest for a given latitude and longitude /// @@ -68,5 +74,7 @@ namespace CampusAppWP8.Api.GeoApi return Settings.UserProfil.DefaultCampus; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs index c527c94e..2409d10a 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs @@ -18,17 +18,23 @@ namespace CampusAppWP8.Api.GeoApi /// Stubbfel, 09.09.2013. public class PisApi : XmlModel { + #region Constructor + /// Initializes a new instance of the PisApi class. /// Stubbfel, 09.09.2013. public PisApi() : base(ModelType.Feed, Constants.UrlPisService) { } + + #endregion + + #region Method /// Sets up the information request. /// Stubbfel, 09.09.2013. /// List of pids. - /// (Optional) list of names of the informations. + /// (Optional) list of names of the information. public void SetupInformationRequest(List pidList, List infoNames = null) { string pidListStr = string.Empty; @@ -52,5 +58,7 @@ namespace CampusAppWP8.Api.GeoApi this.SetUriParams(parameterList); } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs index c90e157b..b6cb614e 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs @@ -18,12 +18,18 @@ namespace CampusAppWP8.Api.GeoApi /// Stubbfel, 09.09.2013. public class PssApi : XmlModel { + #region Constructor + /// Initializes a new instance of the PssApi class. /// Stubbfel, 09.09.2013. public PssApi() : base(ModelType.Feed, Constants.UrlPssService) { } + + #endregion + + #region Method /// Sets up the service request. /// Stubbfel, 09.09.2013. @@ -52,5 +58,7 @@ namespace CampusAppWP8.Api.GeoApi this.SetUriParams(parameterList); } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs index 217f192b..18d727f7 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs @@ -19,6 +19,8 @@ namespace CampusAppWP8.Api.GeoApi /// public class SpsApi : XmlModel { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -27,6 +29,10 @@ namespace CampusAppWP8.Api.GeoApi { } + #endregion + + #region Method + /// /// Method set the UriParameter of a placeRequest for a given latitude and longitude /// @@ -56,5 +62,7 @@ namespace CampusAppWP8.Api.GeoApi string log = App.LoadFromAppState(Constants.GeoWatch_CurrentPosition_Long); this.SetupPlaceRequest(lat, log, domian); } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs b/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs index 96ce98a2..bf49bb08 100644 --- a/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs @@ -19,6 +19,8 @@ namespace CampusAppWP8.Api.Lecture /// public class LectureApi : XmlModel { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -27,5 +29,7 @@ namespace CampusAppWP8.Api.Lecture { this.ValidRootName = Constants.LectureXmlValidRootName; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs b/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs index fbc838e7..50ab4ef2 100644 --- a/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs @@ -16,6 +16,8 @@ namespace CampusAppWP8.Api.Person /// Stubbfel, 05.09.2013. public class PersonSearchApi : XmlModel { + #region Constructor + /// Initializes a new instance of the PersonSearchApi class. /// Stubbfel, 05.09.2013. public PersonSearchApi() @@ -23,5 +25,7 @@ namespace CampusAppWP8.Api.Person { this.ValidRootName = Constants.PersonListValidRootName; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/add_contact_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/add_contact_159.png new file mode 100644 index 00000000..0348b4c1 Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/add_contact_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/lab_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/lab_159.png new file mode 100644 index 00000000..22f3387f Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/lab_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/lecture_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/lecture_159.png new file mode 100644 index 00000000..254afb5a Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/lecture_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/practise_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/practise_159.png new file mode 100644 index 00000000..565b8dcf Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/practise_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/seminar_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/seminar_159.png new file mode 100644 index 00000000..e0b38745 Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/seminar_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/add_contact_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/add_contact_159.png new file mode 100644 index 00000000..70e67924 Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/add_contact_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/lab_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/lab_159.png new file mode 100644 index 00000000..39943f90 Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/lab_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/lecture_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/lecture_159.png new file mode 100644 index 00000000..1a6b2a66 Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/lecture_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/practise_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/practise_159.png new file mode 100644 index 00000000..e9e54821 Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/practise_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/seminar_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/seminar_159.png new file mode 100644 index 00000000..8981575b Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/seminar_159.png differ diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 171006aa..7fab7caa 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -101,7 +101,7 @@ App.xaml - + @@ -284,7 +284,7 @@ - + QRScanner.xaml @@ -410,7 +410,7 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile @@ -435,6 +435,7 @@ + @@ -442,11 +443,16 @@ + + + + + @@ -459,6 +465,8 @@ + + @@ -471,11 +479,13 @@ + + diff --git a/CampusAppWP8/CampusAppWP8/Const.cs b/CampusAppWP8/CampusAppWP8/Const.cs index 57cfe428..8ef872af 100644 --- a/CampusAppWP8/CampusAppWP8/Const.cs +++ b/CampusAppWP8/CampusAppWP8/Const.cs @@ -14,11 +14,17 @@ namespace CampusAppWP8 /// public class Const { + #region Member + /// /// Resource object. /// private static Constants constantResources = new Constants(); + #endregion + + #region Property + /// /// Gets the resource object. /// @@ -29,5 +35,7 @@ namespace CampusAppWP8 return constantResources; } } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs index 3f964c67..40733f3a 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs @@ -7,6 +7,7 @@ //---------------------------------------------------------------------- namespace CampusAppWP8.Feed.Departments { + using System; using System.IO; using CampusAppWP8.Model; using CampusAppWP8.Model.Departments; @@ -42,8 +43,6 @@ namespace CampusAppWP8.Feed.Departments #region Method - #region Protected - /// /// Method implement CheckIsModelUpToDate()-Method . /// @@ -59,7 +58,7 @@ namespace CampusAppWP8.Feed.Departments } else { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 7.0); + retValue = this.CheckIsUpToDate(model.CreateTime); } return retValue; @@ -80,7 +79,7 @@ namespace CampusAppWP8.Feed.Departments // at loading if (info.Exists == true) { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 7.0); + retValue = this.CheckIsUpToDate(info.LastWriteTime); } } @@ -103,12 +102,23 @@ namespace CampusAppWP8.Feed.Departments { retValue = false; } - + + if (model != null && model.HasChanged()) + { + retValue = false; + } + return retValue; } - // Protedted - #endregion + /// Check if the model or file is up-to-date. + /// Stubbfel, 12.09.2013. + /// Date of the last modification. + /// true, if is up-to-date, otherwise false. + private bool CheckIsUpToDate(DateTime lastModified) + { + return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 30); + } // Method #endregion diff --git a/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs index 60216204..ef800d52 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs @@ -7,6 +7,7 @@ //---------------------------------------------------------------------- namespace CampusAppWP8.Feed.Events { + using System; using System.IO; using CampusAppWP8.Model; using CampusAppWP8.Model.RSS; @@ -18,6 +19,8 @@ namespace CampusAppWP8.Feed.Events /// public class EventFeed : XmlModel { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -35,6 +38,10 @@ namespace CampusAppWP8.Feed.Events } } + #endregion + + #region Method + /// /// Method implement CheckIsModelUpToDate()-Method /// @@ -50,7 +57,7 @@ namespace CampusAppWP8.Feed.Events } else { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0); + retValue = this.CheckIsUpToDate(model.CreateTime); } return retValue; @@ -71,7 +78,7 @@ namespace CampusAppWP8.Feed.Events // at loading if (info.Exists == true) { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0); + retValue = this.CheckIsUpToDate(info.LastWriteTime); } } @@ -93,8 +100,24 @@ namespace CampusAppWP8.Feed.Events { retValue = false; } + + if (model != null) + { + retValue = this.CheckIsUpToDate(info.LastWriteTime); + } return retValue; } + + /// Check if the model or file is up-to-date. + /// Stubbfel, 12.09.2013. + /// Date of the last modification. + /// true, if is up-to-date, otherwise false. + private bool CheckIsUpToDate(DateTime lastModified) + { + return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 1.0); + } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs index c2dc6ccb..474b74f2 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs @@ -11,11 +11,14 @@ namespace CampusAppWP8.Feed.Exams using CampusAppWP8.Model; using CampusAppWP8.Model.Exams; using CampusAppWP8.Resources; + using CampusAppWP8.Utility; /// Exam feed. /// Stubbfel, 02.09.2013. public class ExamFeed : XmlModel - { + { + #region Constructor + /// Initializes a new instance of the ExamFeed class. /// Stubbfel, 02.09.2013. public ExamFeed() @@ -27,6 +30,10 @@ namespace CampusAppWP8.Feed.Exams this.ValidRootName = Constants.ExamXmlValidRootName; } + #endregion + + #region Method + /// Check is model up to date. /// Stubbfel, 02.09.2013. /// The model. @@ -53,7 +60,14 @@ namespace CampusAppWP8.Feed.Exams return false; } + if (model != null) + { + return Utilities.DayDifference(Utilities.DifferenceType.Less, fileInfo.LastWriteTime, 30.0); + } + return true; } - } + + #endregion + } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs index ff4e256c..98d1c57c 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs @@ -36,8 +36,6 @@ namespace CampusAppWP8.Feed.Link #region Method - #region Private - /// /// Method check if the FeedModel is up-to-date /// @@ -82,7 +80,5 @@ namespace CampusAppWP8.Feed.Link } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs index 57e07b05..dbdc8e3d 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs @@ -36,8 +36,6 @@ namespace CampusAppWP8.Feed.Link #region Method - #region Private - /// /// Method check if the FeedModel is up-to-date /// @@ -82,7 +80,5 @@ namespace CampusAppWP8.Feed.Link } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs index 682d33a6..f342c9a8 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Feed.Mensa /// public class MensaFeedCBMain : MensaFeed { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -22,5 +24,7 @@ namespace CampusAppWP8.Feed.Mensa { this.Title = AppResources.Campus_CBMain; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs index 6edfe0c6..76626dc8 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Feed.Mensa /// public class MensaFeedCBNorth : MensaFeed { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -22,5 +24,7 @@ namespace CampusAppWP8.Feed.Mensa { this.Title = AppResources.Campus_CBNorth; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs index 46796322..f173c3bc 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Feed.Mensa /// public class MensaFeedCBSouth : MensaFeed { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -22,5 +24,7 @@ namespace CampusAppWP8.Feed.Mensa { this.Title = AppResources.Campus_CBSouth; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs index e524160f..557ad5ff 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Feed.Mensa /// public class MensaFeedSBFMain : MensaFeed { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -22,5 +24,7 @@ namespace CampusAppWP8.Feed.Mensa { this.Title = AppResources.Campus_SFBMain; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs index 2fec1634..145c9873 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs @@ -7,6 +7,7 @@ //----------------------------------------------------------------------------- namespace CampusAppWP8.Feed.News { + using System; using System.IO; using CampusAppWP8.Model; using CampusAppWP8.Model.RSS; @@ -18,6 +19,8 @@ namespace CampusAppWP8.Feed.News /// public class NewsFeed : XmlModel { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -35,6 +38,10 @@ namespace CampusAppWP8.Feed.News } } + #endregion + + #region Method + /// /// Method implement CheckIsModelUpToDate()-Method /// @@ -50,7 +57,7 @@ namespace CampusAppWP8.Feed.News } else { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0); + retValue = this.CheckIsUpToDate(model.CreateTime); } return retValue; @@ -70,7 +77,7 @@ namespace CampusAppWP8.Feed.News { if (info.Exists == true) { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0); + retValue = this.CheckIsUpToDate(info.LastWriteTime); } } @@ -92,8 +99,24 @@ namespace CampusAppWP8.Feed.News { retValue = false; } - + + if (model != null) + { + retValue = this.CheckIsUpToDate(info.LastWriteTime); + } + return retValue; } + + /// Check if the model or file is up-to-date. + /// Stubbfel, 12.09.2013. + /// Date of the last modification. + /// true, if is up-to-date, otherwise false. + private bool CheckIsUpToDate(DateTime lastModified) + { + return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 1.0); + } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs index cf60760a..b84ebc33 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs @@ -7,6 +7,7 @@ //---------------------------------------------------------------------- namespace CampusAppWP8.Feed.Openinghours { + using System; using System.IO; using CampusAppWP8.Model; using CampusAppWP8.Model.Openinghours; @@ -35,8 +36,6 @@ namespace CampusAppWP8.Feed.Openinghours #region Method - #region Private - /// /// Method check if the FeedModel is up-to-date /// @@ -52,7 +51,7 @@ namespace CampusAppWP8.Feed.Openinghours } else { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 7.0); + retValue = this.CheckIsUpToDate(model.CreateTime); } return retValue; @@ -72,7 +71,7 @@ namespace CampusAppWP8.Feed.Openinghours { if (info.Exists == true) { - retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 7.0); + retValue = this.CheckIsUpToDate(info.LastWriteTime); } } @@ -95,10 +94,22 @@ namespace CampusAppWP8.Feed.Openinghours retValue = false; } + if (model != null) + { + retValue = this.CheckIsUpToDate(info.LastWriteTime); + } + return retValue; } - #endregion + /// Check if the model or file is up-to-date. + /// Stubbfel, 12.09.2013. + /// Date of the last modification. + /// true, if is up-to-date, otherwise false. + private bool CheckIsUpToDate(DateTime lastModified) + { + return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0); + } #endregion } diff --git a/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs index c381f65f..91d3fe4c 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs @@ -36,8 +36,6 @@ namespace CampusAppWP8.Feed.StudentCouncil #region Method - #region Private - /// /// Method check if the FeedModel is up-to-date /// @@ -82,7 +80,5 @@ namespace CampusAppWP8.Feed.StudentCouncil } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs index 70d9103b..10a6ecce 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs @@ -7,53 +7,11 @@ //---------------------------------------------------------------------- namespace CampusAppWP8.Feed.Utility { - using System.IO; - using CampusAppWP8.Model; - using CampusAppWP8.Model.Exams; - using CampusAppWP8.Resources; + using CampusAppWP8.Feed.Exams; /// Course Feed. /// Stubbfel, 02.09.2013. - public class CourseFeed : XmlModel + public class CourseFeed : ExamFeed { - /// Initializes a new instance of the CourseFeed class. - /// Stubbfel, 02.09.2013. - public CourseFeed() - : base(ModelType.FileAndFeed, Constants.FileExamApp_ExamFeed, Constants.UrlExamApp_ExamFeed) - { - this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate); - this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate); - this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate); - this.ValidRootName = Constants.ExamXmlValidRootName; - } - - /// Check is model up to date. - /// Stubbfel, 02.09.2013. - /// The model. - /// true if it succeeds, false if it fails. - private bool CheckIsModelUpToDate(ExamListModel model) - { - if (model == null) - { - return false; - } - - return true; - } - - /// Check is file up to date. - /// Stubbfel, 02.09.2013. - /// The model. - /// Information describing the file. - /// true if it succeeds, false if it fails. - private bool CheckIsFileUpToDate(ExamListModel model, FileInfo fileInfo) - { - if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) - { - return false; - } - - return true; - } } } diff --git a/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml b/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml index aa72c656..5f353d92 100644 --- a/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml +++ b/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml @@ -1,295 +1,506 @@  - Campus Cottbus Mitte - campus + Campus Cottbus Mitte + campus - Campus Cottbus Süd - campus + Campus Cottbus Süd + campus - Campus Senftenberg - campus + Campus Senftenberg + campus - Campus Cottbus Nord - campus - - - Lehrgebäude 4/6 - - - Lehrgebäude 4/3 - - - Lehrgebäude 4/1 - - - Lehrgebäude 4/4 - - - Wohnheim - - - Wohnheim - - - Wohnheim - - - Wohnheim - - - Wohnheim - - - Biotechnologie - - - Lehrgebäude Musikpädagogik - - - Informations, Kommunikations und Medienzentrum (IKMZ) - library - - - Internationales Begegnungszentrum - - - Lehrgebäude 8 - - - Laborhalle 3D - - - Gewächshaus Fakultät 4 - - - Reprographie - - - Umformer Station - - - Zentrale Einrichtung Sprachenzentrum - - - Lehrgebäude 9 - - - Baustofflabor - - - Studentenwerk Frankfurt (Oder) (SW) - - - Zentralverwaltung Hubertstraße (ZVH) - - - Wohnheim Papitzer Straße 4/5 - guest_house - - - Lehrgebäude 10 - - - Studentenwohnanlage ErichWeinertStraße - - - Studentenwohnanlage Universitätsstraße 1 - - - Studentenwohnanlage Universitätsstraße 2 - - - Studentenwohnanlage Universitätsstraße 3 - - - Zwischenbau 1 - - - Zwischenbau 3 - - - Zwischenbau 4 - - - Zwischenbau 6 - - - Zwischenbau 5 - - - Mehrzweckgebäude - - - Physiotheraphie/Medizintechnik - - - Cafeteria HL - public_building - - - Gebäude 14 - - - Laborgebäude Bauingenieurwesen Verfahrenstechni - - - Lehrgebäude Bauningenieurwesen Architektur - - - Lehrgebäude Bauningenieurwesen Architektur - - - Lehrgebäude Betriebswirtschaftslehre - - - Lehrgebäude Sozialwesen - - - Wohnheim 1 - - - Fakultät 3 / Sport - - - Laborgebäude 1B - - - Lehrgebäude 1A - - - Forschungs und Materialprüfanstalt Cottbus - - - Garagenkomplex - - - Lehrgebäude 1C (LG1C) - - - Lehrgebäude 3 - - - Lehrhalle 3G Verkehrtechnikhalle - - - Sporthalle 1 - - - Hörsaal 3 - - - GrundbauVersuchshalle - - - Laborgebäude 4B - - - Laborhalle 3C - - - Laborhalle 4C - - - Lehrgebäude 3A - - - Lehrgebäude 3B - - - Lehrgebäude 4A - - - Panta Rhei Halle - - - Großer Hörsaal - entrance - - - Hauptgebäude (HG) - - - Zentralverwaltung - - - Zwischenbau Lehrgebäude 2A/B - - - Lehrgebäude 2A - - - Lehrgebäude 2B - - - Lehrgebäude 2C - - - Lehrgebäude 2D - - - Zwischenbau Lehrgebäude 2C/D - - - Alte Schwimmhalle (geschlossen) - - - BTU Mensa - restaurant - - - Zentrales Hörsaalgebäude - - - Zwischenbau 2 - - - Elektrotechnik/Chemie/Verfahrenstechnik - school - - - Maschinenbau - school - - - Sporthalle - school - - - Mensa - school - - - Informatik (Labor) - school - - - Informatik - school - - - KonradZuseMedienzentrum - school - - - Hochschulbibliothek - school - - - Hochschulverwaltung/Rechenzentrum - school - - - Wohnanlage 8 - - - Lehrgebäude 4/2 - - - Lehrgebäude 4/5 + Campus Cottbus Nord + campus + + + Gewächshaus des Lehrstuhls Allgemeine Ökologie der Fakultät 4 der BTU. + Gewächshaus Fakultät 4 + Labor + + + Strömungstechnik- und Aerodynamikhalle der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen (Fak. 3) der BTU. + LH 3D + Laborhalle 3D + Labor + + + Versuchshalle des Lehrstuhls Bodenmechanik und Grundbau/ Geotechnik. + Grundbau-Versuchshalle + Lehrgebäude + + + Die Panta Rhei Halle verfügt über Büros und Labore, in denen Wissenschaftler der BTU an neuartigen Materialien, Werkstoffen und Verfahren forschen. + Panta Rhei Halle + Forschungszentrum + + + Laborhalle der Fakultät 3 der BTU. + LH 3C + Laborhalle 3C + Labor + + + Das Gebäude befindet sich derzeit im Bau. + LG 3E + Lehrgebäude 3E (im Bau) + Lehrgebäude + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + WA 8 + Wohnanlage 8 + Wohnanlage + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + Wohnheim Papitzer Straße 4/5 + Wohnanlage + + + Alte Schwimmhalle (geschlossen) + + + Lehrgebäude 3A der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen der BTU. + LG 3A + Lehrgebäude 3A + Lehrgebäude + + + Laborhalle der Fakultät 4 der BTU. + LB 4C + Laborhalle 4C + Labor + + + Laborgebäude der Fakultät 4 der BTU. + LB 4B + Laborgebäude 4B + Labor + + + Lehrgebäude 4A der Fakultät Umweltwissenschaften und Verfahrenstechnik. + LG 4A + Lehrgebäude 4A + Lehrgebäude + + + Lehrgebäude 3B der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen der BTU. + LG 3B + Lehrgebäude 3B + Lehrgebäude + + + Garagenkomplex + Garage + + + Lehrgebäude 3 der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen der BTU. + LG 3 + Lehrgebäude 3 + Lehrgebäude + + + Die FMPA ist eine Betriebseinheit an der BTU im Verantwortungsbereich der Fakultät Architektur, Bauingenieurwesen und Stadtplanung. + FMPA + Forschungs- und Materialprüfanstalt Cottbus + Lehrgebäude + + + Lehrgebäude 2D der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU. + LG 2D + Lehrgebäude 2D + Lehrgebäude + + + Der Zwischenbau ist das Verbindungsstück der Lehrgebäude 2C und 2D der Fakultät Architektur, Bauingenieurwesen und Stadtplanung. + Zwischenbau Lehrgebäude 2C/D + Lehrgebäude + + + Lehrgebäude 2C der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU. + LG 2C + Lehrgebäude 2C + Lehrgebäude + + + Das Mehrzweckgebäude ist Sitz verschiedener Lehrsühle der BTU u.a. des Lehrstuhls Kraftwerkstechnik und des Lehrstuhls Industrielle Informationstechnik. + MZG + Mehrzweckgebäude + Mehrzweck + + + Das Studentenwerk Frankfurt (Oder) steht Studenten der BTU in finanziellen und sozialen Fragen zur Seite. + SW + Studentenwerk Frankfurt (Oder) + Studentenwerk + + + Verkehrstechnikhalle der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen. + LH 3G + Lehrhalle 3G Verkehrstechnikhalle + Lehrgebäude + + + Umformer Station + + + Die Sporthalle bietet verschiedene Möglichkeiten der sportlichen Ertüchtigung für Jung und Alt. + Sporthalle 1 + Sport + + + Der Hörsaal 3 der BTU befindet sich im LG 1C. + HS 3 + Hörsaal 3 + Hörsaal + + + Das Lehrgebäude 1C der BTU beinhaltet u.a. den Hörsaal 3. + LG 1C + Lehrgebäude 1C + Lehrgebäude + + + Lehrgebäude 2B der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU. + LG 2B + Lehrgebäude 2B + Lehrgebäude + + + Der Zwischenbau ist das Verbindungsstück der Lehrgebäude 2A und 2B der Fakultät Architektur, Bauingenieurwesen und Stadtplanung. + Zwischenbau Lehrgebäude 2A/B + Lehrgebäude + + + Lehrgebäude 2A der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU. + LG 2A + Lehrgebäude 2A + Lehrgebäude + + + Durchführung von Druckarbeiten. + Repro + Reprographie + Mehrzweck + + + Zentraleinrichtung für Hochschulsport (ZEH). + Fak. 3/ Sport + Fakultät 3 / Sport + Sport + + + Sprachausbildung für Studierende und Mitarbeiter aller Fachrichtungen der BTU. + ZE S + Zentrale Einrichtung Sprachenzentrum + Lehrgebäude + + + Das Zentrale Hörsaalgebäude bietet neben kleineren Hörsälen und Seminarräumen auch dem Audimax der BTU platz. + ZHG + Zentrales Hörsaalgebäude + Lehrgebäude + + + Mensa, Caféteria und Brasserie der BTU. + Mensa + BTU Mensa + Mehrzweck + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + WA 3 + Studentenwohnanlage Universitätsstraße 3 + Wohnanlage + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen. + ZB 3 + Zwischenbau 3 + Mehrzweck + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen. + ZB 4 + Zwischenbau 4 + Mehrzweck + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + WA 2 + Studentenwohnanlage Universitätsstraße 2 + Wohnanlage + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + WA 4 + Studentenwohnanlage Erich-Weinert-Straße + Wohnanlage + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen. + ZB 5 + Zwischenbau 5 + Mehrzweck + + + In diesem Gebäude befinden sich Seminarräume. + ZB 6 + Zwischenbau 6 + Lehrgebäude + + + Sitz unterschiedlicher Lehrstühle und Einrichtungen der BTU. + LG 10 + Lehrgebäude 10 + Lehrgebäude + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen. + ZB 1 + Zwischenbau 1 + Mehrzweck + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen. + ZB 2 + Zwischenbau 2 + Mehrzweck + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + WA 1 + Studentenwohnanlage Universitätsstraße 1 + Wohnanlage + + + In diesem Gebäude befindet ein Großteil der Verwaltung der BTU. + ZeVe + Zentralverwaltung + Verwaltung + + + Das Hauptgebäude begrenzt den Campus der BTU und rundet gleichzeitig den zentralen Campusplatz mit Mensa und ZHG ab. + HG + Hauptgebäude + Mehrzweck + + + Der Große Hörsaal ist zentral auf dem Campus der BTU platziert. + GH + Großer Hörsaal + Hörsaal + + + Laborgebäude der Fakultät 1 der BTU. + LG 1B + Laborgebäude 1B + Labor + + + Baustofflabor der Fakultät 2. + Baustofflabor + Baustofflabor + Labor + + + Das Lehrgebäude 1A beinhaltet den Hörsaal A und den Hörsaal B. + LG 1A + Lehrgebäude 1A + Lehrgebäude + + + LG 9 + Lehrgebäude 9 + Lehrgebäude + + + LG 8 + Lehrgebäude 8 + Lehrgebäude + + + Das Internationale Begegnungszentrum soll Gastwissenschaftlern und ihren Familien während der Zeit an der BTU ein zweites Zuhause geben. + Internationales Begegnungszentrum + Mehrzweck + + + Das IKMZ ist die zentrale Einrichtung der BTU, in der die Strukturbereiche der Informations-, Kommunikations- und Medienversorgung zusammengefasst sind. + IKMZ + Informations-, Kommunikations- und Medienzentrum + Bibliothek + + + In diesem Gebäude befindet sich ein Teil der Verwaltung der BTU. + ZVH + Zentralverwaltung Hubertstraße (ZVH) + Verwaltung + + + Das Gebäude beinhaltet hauptsächlich Einrichtungen der Betriebswirtschaftslehre. + Lehrgebäude Betriebswirtschaftslehre + Lehrgebäude + + + Das Gebäude beinhaltet hauptsächlich Einrichtungen des Sozialwesens. + Lehrgebäude Sozialwesen + Lehrgebäude + + + Das Gebäude beinhaltet hauptsächlich Einrichtungen der Musikpädagogik. + Lehrgebäude Musikpädagogik + Lehrgebäude + + + Das Gebäude beinhaltet hauptsächlich Einrichtungen der Architektur. + Lehrgebäude Bauningenieurwesen Architektur + Lehrgebäude + + + Sitz der Caféteria. + Cafeteria HL + Mehrzweck + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + Wohnheim 1 + Wohnanalge + + + Gebäude 14 + + + Das Gebäude beinhaltet hauptsächlich Einrichtungen der Architektur. + Lehrgebäude Bauningenieurwesen Architektur + Lehrgebäude + + + Das Gebäude beinhaltet hauptsächlich Einrichtungen der Verfahrenstechnik. + Laborgebäude Bauingenieurwesen Verfahrenstechni + Labor + + + Lehrgebäude der Biotechnologie. + Biotechnologie + Lehrgebäude + + + Lehrgebäude der Elektrotechnik, Chemie und Verfahrenstechnik in Senftenberg. + Elektrotechnik/Chemie/Verfahrenstechnik + Lehrgebäude + + + Lehrgebäude der Physiotherapie und der Medizintechnik. + Physiotheraphie/Medizintechnik + Lehrgebäude + + + Die Sporthalle bietet Möglichkeiten der sportlichen Ertüchtigung. + Sporthalle + Sport + + + Sitz des Informatiklabors. + Informatik (Labor) + Labor + + + Lehrgebäude der Informatik in Senftenberg. + Informatik + Lehrgebäude + + + Das Konrad-Zuse-Medienzentrum fungiert als Dienstleister für Forschung und Lehre. + Konrad-Zuse-Medienzentrum + Lehrgebäude + + + Lehrgebäude des Maschinenbaus in Senftenberg. + Maschinenbau + Lehrgebäude + + + In diesem Gebäude sitzt ein Teil der Verwaltung der BTU in Senftenberg. + Hochschulverwaltung/Rechenzentrum + Verwaltung + + + Standort der Bibliothek. + Hochschulbibliothek + Bibliothek + + + Sitz der Mensa. + Mensa + Mehrzweck + + + Mehrzweckgebäude + Mehrzweck + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + Wohnheim + Wohnanalge + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + Wohnheim + Wohnanlage + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + Wohnheim + Wohnanlage + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + Wohnheim + Wohnanlage + + + Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). + Wohnheim + Wohnanalge + + + Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU. + LG 4/6 + Lehrgebäude 4/6 + Lehrgebäude + + + Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU. + LG 4/5 + Lehrgebäude 4/5 + Lehrgebäude + + + Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU. + LG 4/4 + Lehrgebäude 4/4 + Lehrgebäude + + + Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU. + LG 4/1 + Lehrgebäude 4/1 + Lehrgebäude + + + Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU. + LG 4/2 + Lehrgebäude 4/2 + Lehrgebäude + + + Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU. + LG 4/3 + Lehrgebäude 4/3 + Lehrgebäude - diff --git a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFavoriteFeed.cs b/CampusAppWP8/CampusAppWP8/File/Departments/DepartmentFavoriteFile.cs similarity index 83% rename from CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFavoriteFeed.cs rename to CampusAppWP8/CampusAppWP8/File/Departments/DepartmentFavoriteFile.cs index 20a1a29c..7d7e3861 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFavoriteFeed.cs +++ b/CampusAppWP8/CampusAppWP8/File/Departments/DepartmentFavoriteFile.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- -// +// // Company copyright tag. // // fiedlchr // 01.07.2013 //---------------------------------------------------------------------- -namespace CampusAppWP8.Feed.Departments +namespace CampusAppWP8.File.Departments { using System.IO; using CampusAppWP8.Model; @@ -15,15 +15,14 @@ namespace CampusAppWP8.Feed.Departments /// /// Feed object to handle favorite department feeds. /// - public class DepartmentFavoriteFeed : XmlModel + public class DepartmentFavoriteFile : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// automatic loading of the data - public DepartmentFavoriteFeed(bool autoLoad = true) + /// Initializes a new instance of the DepartmentFavoriteFile class. + /// Stubbfel, 12.09.2013. + /// (Optional) the automatic load. + public DepartmentFavoriteFile(bool autoLoad = true) : base(ModelType.File, Constants.FileDepartment_Favorite_Name, string.Empty) { this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad); @@ -40,8 +39,6 @@ namespace CampusAppWP8.Feed.Departments #region Method - #region Protected - /// /// Method implement CheckIsModelUpToDate()-Method . /// @@ -57,7 +54,7 @@ namespace CampusAppWP8.Feed.Departments { retValue = false; } - + return retValue; } @@ -75,7 +72,7 @@ namespace CampusAppWP8.Feed.Departments { retValue = true; } - + return retValue; } @@ -90,13 +87,10 @@ namespace CampusAppWP8.Feed.Departments bool retValue = false; retValue = (model.HasChanged() == false) ? true : false; - + return retValue; } - // Protected - #endregion - // Method #endregion } diff --git a/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs b/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs index bbd8ceb4..597baf1c 100644 --- a/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs +++ b/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs @@ -16,9 +16,15 @@ namespace CampusAppWP8.File.Exams /// Stubbfel, 03.09.2013. public class ExamFile : BinaryModel { + #region Member + /// The storage file. private StorageFile storageFile; + #endregion + + #region Constructor + /// Initializes a new instance of the ExamFile class. /// Stubbfel, 03.09.2013. /// Filename of the file. @@ -31,6 +37,12 @@ namespace CampusAppWP8.File.Exams this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate); } + #endregion + + #region Method + + #region public + /// Executes the file operation. /// Stubbfel, 03.09.2013. public async void LaunchFile() @@ -47,6 +59,8 @@ namespace CampusAppWP8.File.Exams } } + #endregion + /// Saves the and launch file. /// Stubbfel, 03.09.2013. public void SaveAndLaunchFile() @@ -62,6 +76,8 @@ namespace CampusAppWP8.File.Exams } } + #region private + /// Check is model up to date. /// Stubbfel, 03.09.2013. /// The model. @@ -83,12 +99,16 @@ namespace CampusAppWP8.File.Exams /// true if it succeeds, false if it fails. private bool CheckIsFileUpToDate(byte[] model, FileInfo fileInfo) { - if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) + if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || model != null) { return false; } return true; } + + #endregion + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs b/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs index f02fc958..5a3e57f1 100644 --- a/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs +++ b/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs @@ -16,6 +16,8 @@ using CampusAppWP8.Resources; /// Stubbfel, 09.09.2013. public class PlacesFile : XmlModel { + #region Constructor + /// Initializes a new instance of the PlacesFile class. /// Stubbfel, 09.09.2013. public PlacesFile() @@ -25,6 +27,10 @@ using CampusAppWP8.Resources; this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate); } + #endregion + + #region Method + /// Check is file up to date. /// Stubbfel, 09.09.2013. /// The model. @@ -32,12 +38,14 @@ using CampusAppWP8.Resources; /// true if it succeeds, false if it fails. private bool CheckIsFileUpToDate(SpsModel model, System.IO.FileInfo fileInfo) { - if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) + if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || (model != null && model.HasChanged)) { return false; } return false; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/LocalizedStrings.cs b/CampusAppWP8/CampusAppWP8/LocalizedStrings.cs index f0a4a960..c79d457f 100644 --- a/CampusAppWP8/CampusAppWP8/LocalizedStrings.cs +++ b/CampusAppWP8/CampusAppWP8/LocalizedStrings.cs @@ -11,9 +11,15 @@ namespace CampusAppWP8 /// Localized strings. public class LocalizedStrings { + #region Member + /// The localized resources. private static AppResources localizedResources = new AppResources(); + #endregion + + #region Property + /// Gets the localized resources. /// The localized resources. public AppResources LocalizedResources @@ -21,7 +27,9 @@ namespace CampusAppWP8 get { return localizedResources; - } + } } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs b/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs index 6cf9fe7b..a372e9d9 100644 --- a/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs @@ -12,6 +12,8 @@ namespace CampusAppWP8.Model /// Stubbfel, 03.09.2013. public abstract class BinaryModel : MainModel { + #region Constructor + /// Initializes a new instance of the BinaryModel class. /// Stubbfel, 03.09.2013. /// Type of the model. @@ -31,6 +33,10 @@ namespace CampusAppWP8.Model { } + #endregion + + #region Method + /// Deserialize model. /// Stubbfel, 03.09.2013. /// Information describing the model. @@ -58,5 +64,7 @@ namespace CampusAppWP8.Model { return this.Model; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs index 0c12cec8..f955f2dc 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs @@ -17,9 +17,15 @@ namespace CampusAppWP8.Model.Campusmap /// public class CBMainMapModel : MapModel { + #region Member + /// Variable for the identify of the campus. private static readonly string Campus = ((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN).ToString(); + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -37,6 +43,10 @@ namespace CampusAppWP8.Model.Campusmap this.GeoOffsetY = 51.766548; } + #endregion + + #region Method + /// Loads the spatial./. /// Stubbfel, 19.08.2013. protected override void LoadSpatials() @@ -52,5 +62,7 @@ namespace CampusAppWP8.Model.Campusmap } } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs index 8bb3347d..0e9b0552 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Model.Campusmap /// Stubbfel, 27.08.2013. public class CurrentPositionPinModel : MapPinModel { + #region Constructor + /// Initializes a new instance of the CurrentPositionPinModel class. /// Stubbfel, 27.08.2013. public CurrentPositionPinModel() @@ -25,5 +27,7 @@ namespace CampusAppWP8.Model.Campusmap this.PinImageOffsetX = -25; this.PinImageOffsetY = -34; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs index 49a5009d..421d4fc8 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs @@ -90,6 +90,8 @@ namespace CampusAppWP8.Model.Campusmap #region Methods + #region public + /// /// Method calculate the coordinates of ScrollToOffsets point /// @@ -218,12 +220,20 @@ namespace CampusAppWP8.Model.Campusmap return this.ConverToMapPoint(point.X, point.Y); } + #endregion + + #region protected + /// Loads the spatial./ /// Stubbfel, 19.08.2013. protected virtual void LoadSpatials() { } + #endregion + + #region private + /// Creates a pin. /// Stubbfel, 27.08.2013. /// The type. @@ -246,6 +256,9 @@ namespace CampusAppWP8.Model.Campusmap return pin; } + + #endregion + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs index 4cba699a..78edcb0e 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Model.Campusmap /// Stubbfel, 27.08.2013. public class SearchPlacePinModel : MapPinModel { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -27,5 +29,7 @@ namespace CampusAppWP8.Model.Campusmap this.PinImageOffsetX = -25; this.PinImageOffsetY = -27; } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs b/CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs index 2cbaecea..968f91ab 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Model.Departments /// public class ChairModel { + #region Member + /// /// German name of the chair. /// @@ -30,6 +32,10 @@ namespace CampusAppWP8.Model.Departments /// private string nameEN = string.Empty; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -37,6 +43,10 @@ namespace CampusAppWP8.Model.Departments { } + #endregion + + #region Property + /// /// Initializes a new instance of the class. /// @@ -124,5 +134,7 @@ namespace CampusAppWP8.Model.Departments } } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentModel.cs b/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentModel.cs index c2256507..202bc929 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentModel.cs @@ -17,6 +17,8 @@ namespace CampusAppWP8.Model.Departments [XmlRoot("root")] public class DepartmentModel { + #region Member + /// /// Object to store the time when the instance was created. /// @@ -27,6 +29,10 @@ namespace CampusAppWP8.Model.Departments /// private ObservableCollection faculties; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -36,6 +42,10 @@ namespace CampusAppWP8.Model.Departments this.createTime = DateTime.Now; } + #endregion + + #region Property + /// /// Gets or sets the faculty list. /// @@ -68,6 +78,10 @@ namespace CampusAppWP8.Model.Departments } } + #endregion + + #region Method + /// /// Check if the content of the faculty lists hast changed since the /// last call of this function. @@ -87,5 +101,7 @@ namespace CampusAppWP8.Model.Departments return retValue; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs b/CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs index f7b7407c..3014dcf2 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs @@ -16,6 +16,8 @@ namespace CampusAppWP8.Model.Departments /// public class FacultyModel { + #region Member + /// /// Object to hold the information of the chair containing to this /// faculty. @@ -32,6 +34,10 @@ namespace CampusAppWP8.Model.Departments /// private bool hasChanged = false; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -40,6 +46,10 @@ namespace CampusAppWP8.Model.Departments this.chairs = new ObservableCollection(); } + #endregion + + #region Property + /// /// Initializes a new instance of the class. /// @@ -126,6 +136,10 @@ namespace CampusAppWP8.Model.Departments return retValue; } + #endregion + + #region Method + /// /// Add a chair to the list, if it does not already exist. /// @@ -234,5 +248,7 @@ namespace CampusAppWP8.Model.Departments return retValue; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListModel.cs index 64b1c6e0..407c65ab 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListModel.cs @@ -17,11 +17,17 @@ namespace CampusAppWP8.Model.Exams [XmlRoot("links")] public class ExamListModel { + #region Property + /// Gets or sets the exams. /// The exams. [XmlElement("link")] public ObservableCollection Exams { get; set; } + #endregion + + #region Property + /// Creates course list. /// Stubbfel, 10.09.2013. /// The new course list. @@ -40,5 +46,7 @@ namespace CampusAppWP8.Model.Exams return result; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamModel.cs b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamModel.cs index 57752d26..58c58ce6 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamModel.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Model.Exams /// Stubbfel, 02.09.2013. public class ExamModel { + #region Property + /// Gets or sets the course number. /// The course number. [XmlAttribute("stg")] @@ -63,5 +65,7 @@ namespace CampusAppWP8.Model.Exams return StringManager.StripHTML(this.CourseText + " (" + this.Type + "/" + this.Version + ")"); } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs index 55c50d24..d504afd3 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Model.GeoDb /// Stubbfel, 19.08.2013. public class PlaceInformation : IEquatable { + #region Property + /// Gets or sets the name of the information. /// The name of the information. [XmlAttribute("placeInformationName")] @@ -24,6 +26,10 @@ namespace CampusAppWP8.Model.GeoDb [XmlText] public string InformationValue { get; set; } + #endregion + + #region Method + /// Tests if this PlaceInformation is considered equal to another. /// Stubbfel, 09.09.2013. /// The place information to compare to this object. @@ -37,5 +43,7 @@ namespace CampusAppWP8.Model.GeoDb return false; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs index 463bcd89..2758cfcc 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs @@ -23,6 +23,8 @@ namespace CampusAppWP8.Model.GeoDb /// public class PlaceModel : IEquatable { + #region Property + /// /// Gets or sets the placeId /// @@ -85,6 +87,10 @@ namespace CampusAppWP8.Model.GeoDb [XmlElement("placeService")] public ObservableCollection Services { get; set; } + #endregion + + #region Method + /// Converts this object to a nfc string. /// Stubbfel, 21.08.2013. /// This object as a string. @@ -108,9 +114,9 @@ namespace CampusAppWP8.Model.GeoDb return false; } - /// Adds a place informations. + /// Adds a place information. /// Stubbfel, 09.09.2013. - /// The place informations. + /// The place information. public void AddPlaceInformations(List placeInformations) { foreach (PlaceInformation info in placeInformations) @@ -200,5 +206,7 @@ namespace CampusAppWP8.Model.GeoDb return true; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs index 303c760c..9f318365 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Model.GeoDb /// Stubbfel, 19.08.2013. public class PlaceService : IEquatable { + #region Property + /// Gets or sets the name of the service. /// The name of the service. [XmlAttribute("placeServiceName")] @@ -30,6 +32,10 @@ namespace CampusAppWP8.Model.GeoDb [XmlElement("request")] public string Request { get; set; } + #endregion + + #region Method + /// Gets the URL string. /// The URL string. public string URLString @@ -53,5 +59,7 @@ namespace CampusAppWP8.Model.GeoDb return false; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs index 769df19f..1430a436 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs @@ -19,19 +19,34 @@ namespace CampusAppWP8.Model.GeoDb [XmlRoot("root")] public class SpsModel { + #region Constructor + /// Initializes a new instance of the SpsModel class. /// Stubbfel, 20.08.2013. public SpsModel() { + this.HasChanged = false; this.Places = new ObservableCollection(); } + #endregion + + #region Property + /// /// Gets or sets a list of places /// [XmlElement("place")] public ObservableCollection Places { get; set; } + /// Gets or sets a value indicating whether this object has changed. + /// true if this object has changed, false if not. + public bool HasChanged { get; set; } + + #endregion + + #region Method + /// Gets places by information. /// Stubbfel, 19.08.2013. /// The query. @@ -102,6 +117,8 @@ namespace CampusAppWP8.Model.GeoDb this.Places.Add(place); } } + + this.HasChanged = true; } /// Creates PID list. @@ -176,7 +193,7 @@ namespace CampusAppWP8.Model.GeoDb /// Filter by PID. /// Stubbfel, 11.09.2013. /// List of pids. - /// . + /// filtered list of places. public List FilterByPid(List pidList) { List fitlerList = new List(); @@ -187,7 +204,10 @@ namespace CampusAppWP8.Model.GeoDb fitlerList.Add(place); } } + return fitlerList; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs index a26bfb79..8d87520b 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs @@ -9,6 +9,7 @@ namespace CampusAppWP8.Model.Lecture { using System.Collections.ObjectModel; using System.Xml.Serialization; + using CampusAppWP8.Resources; using CampusAppWP8.Utility; /// @@ -18,6 +19,21 @@ namespace CampusAppWP8.Model.Lecture { #region Members + /// The activity icon name lecture. + private const string ActivityIconNameLecture = "Vorlesung"; + + /// The activity icon name seminar. + private const string ActivityIconNameSeminar = "Seminar"; + + /// The activity icon name practice. + private const string ActivityIconNamePract = "Übung"; + + /// The activity icon name lab. + private const string ActivityIconNameLab = "Labor"; + + /// The activity icon name exam. + private const string ActivityIconNameExam = "Prüfung"; + /// /// List of lecturer /// @@ -38,7 +54,11 @@ namespace CampusAppWP8.Model.Lecture /// private string topic; + /// URL of the icon. + private string iconUrl; + #endregion + #region Constructor /// @@ -184,10 +204,22 @@ namespace CampusAppWP8.Model.Lecture } } + /// Gets URL of the icon. + /// The icon URL. + public string IconUrl + { + get + { + this.CreateIconUrl(); + return this.iconUrl; + } + } #endregion #region Methods + #region public + /// /// Method create a formatted string of the LecturerList /// @@ -217,5 +249,43 @@ namespace CampusAppWP8.Model.Lecture } #endregion + + #region private + + /// Creates icon URL. + /// Stubbfel, 12.09.2013. + private void CreateIconUrl() + { + string typeStr = this.Type; + + if (typeStr.Contains(LectureActivity.ActivityIconNameLecture)) + { + this.iconUrl = Icons.Lecture; + } + else if (typeStr.Contains(LectureActivity.ActivityIconNameExam)) + { + this.iconUrl = Icons.Exams; + } + else if (typeStr.Contains(LectureActivity.ActivityIconNamePract)) + { + this.iconUrl = Icons.Practise; + } + else if (typeStr.Contains(LectureActivity.ActivityIconNameSeminar)) + { + this.iconUrl = Icons.Info; + } + else if (typeStr.Contains(LectureActivity.ActivityIconNameLab)) + { + this.iconUrl = Icons.Lab; + } + else + { + this.iconUrl = Icons.Info; + } + } + + #endregion + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs index 03d40bf4..b418f12e 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs @@ -13,6 +13,8 @@ namespace CampusAppWP8.Model.Lecture /// public class LectureCourse { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -20,10 +22,16 @@ namespace CampusAppWP8.Model.Lecture { } + #endregion + + #region Property + /// /// Gets or sets the title of the course /// [XmlElement("bezeichnung")] public string Title { get; set; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs index 701f9ef4..a6fab88a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Model.Lecture /// public class LectureDate { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -21,6 +23,10 @@ namespace CampusAppWP8.Model.Lecture { } + #endregion + + #region Property + /// /// Gets or sets WeekDay /// @@ -62,5 +68,7 @@ namespace CampusAppWP8.Model.Lecture /// [XmlElement("enddatum")] public string EndDate { get; set; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs index 1e2d92e5..7d9102b2 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Model.Lecture /// public class LectureLecturer { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -21,6 +23,10 @@ namespace CampusAppWP8.Model.Lecture { } + #endregion + + #region Property + /// /// Gets or sets the FirstName of a lecturer /// @@ -45,6 +51,10 @@ namespace CampusAppWP8.Model.Lecture [XmlAttribute("zustaendigkeit")] public string Responsibility { get; set; } + #endregion + + #region Method + /// /// Method overrides the base ToString() and create an formatted string of the lecturer /// @@ -68,5 +78,7 @@ namespace CampusAppWP8.Model.Lecture return result; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/MainModel.cs b/CampusAppWP8/CampusAppWP8/Model/MainModel.cs index 6a01db2b..4123275f 100644 --- a/CampusAppWP8/CampusAppWP8/Model/MainModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/MainModel.cs @@ -20,6 +20,8 @@ namespace CampusAppWP8 /// model type public abstract class MainModel { + #region Member + /// /// File object. /// @@ -55,6 +57,10 @@ namespace CampusAppWP8 /// private Uri paramizedUri = null; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -87,6 +93,10 @@ namespace CampusAppWP8 } } + #endregion + + #region Events + /// /// Delegate of the OnIO callback function. /// @@ -174,6 +184,10 @@ namespace CampusAppWP8 /// public event IsModelUpToDate IsModelUpToDateOnSave = null; + #endregion + + #region Enum + /// /// Specifies the I/O type of the model. /// @@ -213,6 +227,10 @@ namespace CampusAppWP8 FORCE_WEB = 2 } + #endregion + + #region Property + /// /// Gets or sets the Model. /// @@ -229,6 +247,12 @@ namespace CampusAppWP8 } } + #endregion + + #region Method + + #region public + /// /// Forces a update from web. /// @@ -412,6 +436,10 @@ namespace CampusAppWP8 this.paramizedUri = null; } + #endregion + + #region protected + /// /// Abstract declaration of the model deserialize function. /// @@ -457,6 +485,10 @@ namespace CampusAppWP8 return retValue; } + #endregion + + #region private + /// /// Initialize the class. Is called by the constructors. /// @@ -596,5 +628,9 @@ namespace CampusAppWP8 return retValue; } + + #endregion + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Model/Mensa/MenuModel.cs b/CampusAppWP8/CampusAppWP8/Model/Mensa/MenuModel.cs index b9ef20f1..3f5f48d0 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Mensa/MenuModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Mensa/MenuModel.cs @@ -8,11 +8,8 @@ namespace CampusAppWP8.Model.Mensa { using System; - using System.Xml.Serialization; - using CampusAppWP8.Resources; - using CampusAppWP8.Utility; using System.Collections.ObjectModel; - using System.Globalization; + using System.Xml.Serialization; /// /// Model for menu diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionModel.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionModel.cs index 147fbc5d..5b68531c 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionModel.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Model.Person /// Stubbfel, 05.09.2013. public class PersonFunctionModel { + #region Member + /// The first tel. private string tel1; @@ -35,6 +37,10 @@ namespace CampusAppWP8.Model.Person /// The building. private string building; + #endregion + + #region Property + /// Gets or sets the tel 1. /// The tel 1. [XmlAttribute("telefon")] @@ -175,5 +181,7 @@ namespace CampusAppWP8.Model.Person /// Gets or sets zero-based index of the function. /// The function index. public int FunctionIndex { get; set; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListModel.cs index 0182d9ce..8af959d0 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListModel.cs @@ -17,11 +17,17 @@ namespace CampusAppWP8.Model.Person [XmlRoot("Uebersicht")] public class PersonListModel { + #region Property + /// Gets or sets the persons. /// The persons. [XmlElement("person")] public ObservableCollection Persons { get; set; } + #endregion + + #region Method + /// Sets person identifier to function. /// Stubbfel, 05.09.2013. public void SetPersonIdToFunction() @@ -75,5 +81,7 @@ namespace CampusAppWP8.Model.Person this.Persons.Remove(removePerson); } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonModel.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonModel.cs index a8b51572..af48f050 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonModel.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Model.Person /// Stubbfel, 05.09.2013. public class PersonModel { + #region Member + /// The akadgrad. private string akadgrad; @@ -30,6 +32,10 @@ namespace CampusAppWP8.Model.Person /// The functions. private ObservableCollection functions; + #endregion + + #region Property + /// Gets or sets the identifier. /// The identifier. [XmlAttribute("id")] @@ -137,6 +143,10 @@ namespace CampusAppWP8.Model.Person } } + #endregion + + #region Method + /// Sets person identifier to function. /// Stubbfel, 05.09.2013. public void SetPersonIdToFunction() @@ -153,5 +163,7 @@ namespace CampusAppWP8.Model.Person function.FunctionIndex = index++; } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/RSS/RSSChannelModel.cs b/CampusAppWP8/CampusAppWP8/Model/RSS/RSSChannelModel.cs index fc8a8afe..fd0f0463 100644 --- a/CampusAppWP8/CampusAppWP8/Model/RSS/RSSChannelModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/RSS/RSSChannelModel.cs @@ -21,6 +21,8 @@ namespace CampusAppWP8.Model.RSS /// private ObservableCollection item; + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -30,6 +32,10 @@ namespace CampusAppWP8.Model.RSS this.item.CollectionChanged += new NotifyCollectionChangedEventHandler(this.OnListChanged); } + #endregion + + #region Property + /// /// Gets or sets the RSS feed item list. /// @@ -50,6 +56,10 @@ namespace CampusAppWP8.Model.RSS } } + #endregion + + #region Method + /// /// Is called when the item list has changed. /// Here used for the add event. @@ -66,5 +76,7 @@ namespace CampusAppWP8.Model.RSS list[list.Count - 1].Index = list.Count - 1; } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/RSS/RSSModel.cs b/CampusAppWP8/CampusAppWP8/Model/RSS/RSSModel.cs index 725cd074..ec341240 100644 --- a/CampusAppWP8/CampusAppWP8/Model/RSS/RSSModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/RSS/RSSModel.cs @@ -16,6 +16,8 @@ namespace CampusAppWP8.Model.RSS /// public class RSSModel { + #region Member + /// /// Index of this object. /// @@ -41,6 +43,10 @@ namespace CampusAppWP8.Model.RSS /// private string link; + #endregion + + #region Property + /// /// Gets or sets the title of the feed. /// @@ -131,7 +137,7 @@ namespace CampusAppWP8.Model.RSS /// /// Gets the time of the timestamp as string. - /// example: 12:56 Uhr. + /// example: 12:56. /// public string Time { @@ -177,6 +183,12 @@ namespace CampusAppWP8.Model.RSS } } + #endregion + + #region Method + + #region public + /// /// Comparing function for DateTime timestamps. /// (currently unused) @@ -196,6 +208,10 @@ namespace CampusAppWP8.Model.RSS } } + #endregion + + #region private + /// /// Remove or transform html-unicode specific tags into ASCII. /// @@ -252,5 +268,9 @@ namespace CampusAppWP8.Model.RSS return retValue.ToString(); } + + #endregion + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/RSS/RSSViewModel.cs b/CampusAppWP8/CampusAppWP8/Model/RSS/RSSViewModel.cs index e09a01f0..7f0b2691 100644 --- a/CampusAppWP8/CampusAppWP8/Model/RSS/RSSViewModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/RSS/RSSViewModel.cs @@ -17,6 +17,8 @@ namespace CampusAppWP8.Model.RSS [XmlRoot("root")] public class RSSViewModel { + #region Member + /// /// Object to store the time when the instance was created. /// @@ -26,7 +28,11 @@ namespace CampusAppWP8.Model.RSS /// Channel list for the RSS feeds. /// private ObservableCollection channel; - + + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -36,6 +42,10 @@ namespace CampusAppWP8.Model.RSS this.createTime = DateTime.Now; } + #endregion + + #region Property + /// /// Gets or sets the channel list. /// @@ -67,5 +77,7 @@ namespace CampusAppWP8.Model.RSS return this.createTime; } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs b/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs index 65da2561..d12e961a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Model.Setting /// public class AppSettings { + #region Property + /// /// Gets or sets a value indicating whether the GeoWatch-Flag /// @@ -106,5 +108,7 @@ namespace CampusAppWP8.Model.Setting App.SaveToAppState(Constants.AppSetting_OnlyWifi, value); } } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs b/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs index a753efca..eb957228 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs @@ -192,8 +192,6 @@ namespace CampusAppWP8.Model.Setting #region Methods - #region private - /// /// Methods check if a value could be a valid semester /// @@ -225,7 +223,5 @@ namespace CampusAppWP8.Model.Setting } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/StudentCouncil/StudentCouncilListModel.cs b/CampusAppWP8/CampusAppWP8/Model/StudentCouncil/StudentCouncilListModel.cs index 1a935a1a..914798d1 100644 --- a/CampusAppWP8/CampusAppWP8/Model/StudentCouncil/StudentCouncilListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/StudentCouncil/StudentCouncilListModel.cs @@ -26,6 +26,7 @@ namespace CampusAppWP8.Model.StudentCouncil private readonly DateTime createTime; #endregion + #region Constructor /// /// Initializes a new instance of the class. diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/CampusListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/CampusListPickerItemListModel.cs index 372c2103..60469c7f 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/CampusListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/CampusListPickerItemListModel.cs @@ -28,8 +28,6 @@ namespace CampusAppWP8.Model.Utility #region Method - #region private - /// /// Overrides the LoadList-Method /// @@ -42,7 +40,5 @@ namespace CampusAppWP8.Model.Utility } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/CleanUrlParamModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/CleanUrlParamModel.cs index 46d2211c..b7e20c43 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/CleanUrlParamModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/CleanUrlParamModel.cs @@ -10,25 +10,24 @@ namespace CampusAppWP8.Model.Utility /// /// This class is a Model for the URLParameter like GET-Parameter /// - public class CleanUrlParamModel:UrlParamModel + public class CleanUrlParamModel : UrlParamModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// the key for the parameter - public CleanUrlParamModel(string key) :base(key) + /// Initializes a new instance of the CleanUrlParamModel class. + /// Stubbfel, 12.09.2013. + /// the key for the parameter. + public CleanUrlParamModel(string key) + : base(key) { - } - /// - /// Initializes a new instance of the class. - /// - /// the key for the parameter> - /// value of the parameter - public CleanUrlParamModel(string key, string value) : base(key,value) + /// Initializes a new instance of the CleanUrlParamModel class. + /// Stubbfel, 12.09.2013. + /// the key for the parameter. + /// The value. + public CleanUrlParamModel(string key, string value) + : base(key, value) { } #endregion diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListModel.cs index e518704d..1015879a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListModel.cs @@ -17,9 +17,13 @@ namespace CampusAppWP8.Model.Utility /// public class CourseListPickerItemListModel : ListPickerItemListModel { + #region Member + /// List of courses. private CourseFeed courseList; + #endregion + #region Constructor /// @@ -30,9 +34,7 @@ namespace CampusAppWP8.Model.Utility } #endregion - - #region Method - + #region Events /// @@ -44,9 +46,12 @@ namespace CampusAppWP8.Model.Utility /// Callback pointer, called after loading. /// public event OnIO OnLoaded = null; + #endregion - #region private + #region Method + + #region public /// /// Overrides the LoadList-Method @@ -66,6 +71,10 @@ namespace CampusAppWP8.Model.Utility this.CallOnLoaded(); } } + + #endregion + + #region private /// Fall back list. /// Stubbfel, 10.09.2013. diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/CourseModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseModel.cs index 26ad1dc5..bba93443 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/CourseModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseModel.cs @@ -13,6 +13,8 @@ namespace CampusAppWP8.Model.Utility /// Stubbfel, 10.09.2013. public class CourseModel : IEquatable { + #region Constructor + /// Initializes a new instance of the CourseModel class. /// Stubbfel, 10.09.2013. /// The course number. @@ -23,6 +25,10 @@ namespace CampusAppWP8.Model.Utility this.CourseText = courseText; } + #endregion + + #region Property + /// Gets or sets the course number. /// The course number. public string CourseNumber { get; set; } @@ -31,6 +37,10 @@ namespace CampusAppWP8.Model.Utility /// The course text. public string CourseText { get; set; } + #endregion + + #region Method + /// Tests if this CourseModel is considered equal to another. /// Stubbfel, 10.09.2013. /// The course model to compare to this object. @@ -44,5 +54,7 @@ namespace CampusAppWP8.Model.Utility return false; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/DegreeListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/DegreeListPickerItemListModel.cs index 78c211bd..515eda2a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/DegreeListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/DegreeListPickerItemListModel.cs @@ -28,8 +28,6 @@ namespace CampusAppWP8.Model.Utility #region Method - #region private - /// /// Overrides the LoadList-Method /// @@ -41,7 +39,5 @@ namespace CampusAppWP8.Model.Utility } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemListModel.cs index 555ebf40..f9985ff4 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemListModel.cs @@ -127,7 +127,7 @@ namespace CampusAppWP8.Model.Utility #endregion - #region private + #region protected /// /// Method load an default list diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs index 5dceec55..d20163bc 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs @@ -12,6 +12,8 @@ namespace CampusAppWP8.Model.Utility /// public class ListPickerItemModel { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -30,6 +32,10 @@ namespace CampusAppWP8.Model.Utility this.Text = text; } + #endregion + + #region Property + /// /// Gets or sets the Value of an Item /// @@ -39,5 +45,7 @@ namespace CampusAppWP8.Model.Utility /// Gets or sets the Text (caption) of an Item /// public string Text { get; set; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/RoleListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/RoleListPickerItemListModel.cs index 205f2b6a..e185f875 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/RoleListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/RoleListPickerItemListModel.cs @@ -28,8 +28,6 @@ namespace CampusAppWP8.Model.Utility #region Method - #region private - /// /// Overrides the LoadList-Method /// @@ -40,7 +38,5 @@ namespace CampusAppWP8.Model.Utility } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/SemesterListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/SemesterListPickerItemListModel.cs index e3d3be7f..44e206d1 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/SemesterListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/SemesterListPickerItemListModel.cs @@ -28,8 +28,6 @@ namespace CampusAppWP8.Model.Utility #region Method - #region private - /// /// Overrides the LoadList-Method /// @@ -41,7 +39,5 @@ namespace CampusAppWP8.Model.Utility } #endregion - - #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs b/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs index 5a2cbdbe..b50aaa85 100644 --- a/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs @@ -17,6 +17,8 @@ namespace CampusAppWP8.Model /// model type public abstract class XmlModel : MainModel { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -41,6 +43,10 @@ namespace CampusAppWP8.Model this.ValidRootName = Constants.XMLRootElementName; } + #endregion + + #region Method + /// /// Gets or sets for the name of the root-tag /// @@ -85,5 +91,7 @@ namespace CampusAppWP8.Model return retValue; } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml index bc93963e..2033c099 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml @@ -35,11 +35,11 @@ - + - - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs index 9283b491..03f83d24 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs @@ -25,6 +25,8 @@ namespace CampusAppWP8.Pages.Events /// public partial class EventPage : PhoneApplicationPage { + #region Method + /// /// To checking if the feed source is already set or not. /// @@ -46,6 +48,10 @@ namespace CampusAppWP8.Pages.Events /// The is in speech. private volatile bool isInSpeech = false; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -71,6 +77,12 @@ namespace CampusAppWP8.Pages.Events this.isInSpeech = false; } + #endregion + + #region Method + + #region protected + /// /// On navigation to this page. /// The PivotItem source will be set, if it wasn't before. @@ -157,6 +169,10 @@ namespace CampusAppWP8.Pages.Events } } + #endregion + + #region private + /// /// Called when the index of the selected PivotItem is changed. /// Set the text Grid to visible and the WebBrowser to collapsed. @@ -222,5 +238,9 @@ namespace CampusAppWP8.Pages.Events this.isInSpeech = false; } } + + #endregion + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs index 1aaaaa0a..bce8f255 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs @@ -21,12 +21,18 @@ namespace CampusAppWP8.Pages.Exams /// Stubbfel, 02.09.2013. public partial class Exams : PhoneApplicationPage { + #region Member + /// The feed. private ExamFeed feed; /// The exam file. private ExamFile file; + #endregion + + #region Constructor + /// Initializes a new instance of the Exams class. /// Stubbfel, 02.09.2013. public Exams() @@ -35,6 +41,12 @@ namespace CampusAppWP8.Pages.Exams this.InitializeFeed(); } + #endregion + + #region Method + + #region protected + /// Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. /// Stubbfel, 02.09.2013. /// Ein Objekt, das die Ereignisdaten enthält. @@ -68,6 +80,10 @@ namespace CampusAppWP8.Pages.Exams } } + #endregion + + #region private + /// Method initialize the Feed. /// Stubbfel, 02.09.2013. private void InitializeFeed() @@ -199,5 +215,9 @@ namespace CampusAppWP8.Pages.Exams this.file.LoadData(); this.ProgressBar.Visibility = System.Windows.Visibility.Visible; } + + #endregion + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs index cf6d4332..95e3e8d0 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs @@ -17,6 +17,8 @@ namespace CampusAppWP8.Pages.Lecture /// public partial class ModulWebPage : PhoneApplicationPage { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -24,6 +26,10 @@ namespace CampusAppWP8.Pages.Lecture { this.InitializeComponent(); } + + #endregion + + #region Method /// /// Override the OnNavigatedTo method @@ -39,5 +45,7 @@ namespace CampusAppWP8.Pages.Lecture base.OnNavigatedTo(e); } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs index e09763e3..87a5c88e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs @@ -17,6 +17,8 @@ namespace CampusAppWP8.Pages.Lecture /// public partial class ResultDetailPage : PhoneApplicationPage { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -25,6 +27,11 @@ namespace CampusAppWP8.Pages.Lecture this.InitializeComponent(); } + #endregion + + #region Method + + #region protected /// /// Override the OnNavigatedTo method /// @@ -40,6 +47,10 @@ namespace CampusAppWP8.Pages.Lecture base.OnNavigatedTo(e); } + #endregion + + #region private + /// /// Method load a certain Activity from the model /// @@ -53,7 +64,12 @@ namespace CampusAppWP8.Pages.Lecture activity.CreateLectureString(); activity.CreateCourseString(); this.ContentPanel.DataContext = activity; - } + } } + + #endregion + + #endregion + } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml index a2854ff7..0575f070 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml @@ -47,9 +47,12 @@ - - - + + + + + + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs index 47d94d1f..aefe127f 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs @@ -21,6 +21,8 @@ namespace CampusAppWP8.Pages.Lecture /// public partial class ResultPage : PhoneApplicationPage { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -29,6 +31,10 @@ namespace CampusAppWP8.Pages.Lecture this.InitializeComponent(); } + #endregion + + #region Method + /// /// Override the OnNavigatedTo method /// @@ -46,7 +52,6 @@ namespace CampusAppWP8.Pages.Lecture if (list.Activities.Count > 0) { - this.ResultList.ItemsSource = list.Activities.OrderByDescending(o => o.Type).ThenBy(o => o.Title).ToList(); } else @@ -57,7 +62,9 @@ namespace CampusAppWP8.Pages.Lecture { NavigationService.GoBack(); } - } + } } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs index ed045122..779eef46 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs @@ -12,9 +12,9 @@ namespace CampusAppWP8.Pages.Links using System.Windows.Navigation; using CampusAppWP8.Feed.Link; using CampusAppWP8.Resources; + using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; - using CampusAppWP8.Utility; /// /// Class for the LinkPage diff --git a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs index 4559285f..66988df9 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs @@ -14,10 +14,10 @@ namespace CampusAppWP8.Pages.Mensa using CampusAppWP8.Api.GeoApi; using CampusAppWP8.Feed.Mensa; using CampusAppWP8.Resources; + using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; - using CampusAppWP8.Utility; /// /// Class for the MensaPage diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs index c46b20d8..7b5f8e7e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs @@ -12,21 +12,27 @@ namespace CampusAppWP8.Pages.News using System.Windows.Navigation; using CampusAppWP8.Feed.News; using CampusAppWP8.Resources; + using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; - using CampusAppWP8.Utility; /// /// Overview page of all news. /// public partial class NewsIndexPage : PhoneApplicationPage { + #region Member + /// /// News Feed object, which contains the RSS models and data. /// private static NewsFeed newsFeed = null; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -52,6 +58,10 @@ namespace CampusAppWP8.Pages.News NewsIndexPage.newsFeed.LoadData(Utilities.GetLoadModus()); } + #endregion + + #region Property + /// /// Gets or sets the feed object. /// @@ -80,6 +90,12 @@ namespace CampusAppWP8.Pages.News return NewsIndexPage.newsFeed; } + #endregion + + #region Method + + #region protected + /// /// On navigation to this page, creates a FeedEventHandler and load the RSS feed data. /// @@ -103,6 +119,11 @@ namespace CampusAppWP8.Pages.News base.OnNavigatedFrom(e); } + + #endregion + + #region private + /// /// Is called after the RSS feeds are loaded into the newsFeed model. /// If there was no feed information set to the UI, the feed list @@ -143,5 +164,9 @@ namespace CampusAppWP8.Pages.News this.progressBar.Visibility = Visibility.Collapsed; MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile); } + + #endregion + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs index 276189b1..725f7d2f 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs @@ -13,9 +13,9 @@ namespace CampusAppWP8.Pages.Openinghours using CampusAppWP8.Feed.Openinghours; using CampusAppWP8.Model.Openinghours; using CampusAppWP8.Resources; + using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; - using CampusAppWP8.Utility; /// /// Opening hours page. diff --git a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs index 1fa324ca..b95c31e2 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs @@ -23,9 +23,15 @@ namespace CampusAppWP8.Pages.Person /// Stubbfel, 09.09.2013. public partial class PersonPage : PhoneApplicationPage { + #region Member + /// The API. private PersonSearchApi api; + #endregion + + #region Constructor + /// Initializes a new instance of the PersonPage class. /// Stubbfel, 09.09.2013. public PersonPage() @@ -33,6 +39,10 @@ namespace CampusAppWP8.Pages.Person this.InitializeComponent(); } + #endregion + + #region Method + /// Sends a request. /// Stubbfel, 09.09.2013. /// Source of the event. @@ -127,5 +137,7 @@ namespace CampusAppWP8.Pages.Person saveContactTask.Show(); } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs index 8d8dbe6b..b8c4ef91 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs @@ -26,6 +26,7 @@ namespace CampusAppWP8.Pages.PlaceNews /// Stubbfel, 09.09.2013. public partial class PlaceNews : PhoneApplicationPage { + #region Member /// The sps API. private SpsApi spsApi; @@ -38,13 +39,19 @@ namespace CampusAppWP8.Pages.PlaceNews /// The places. private PlacesFile places; - /// varaible indicates how many apis are running. + /// variable indicates how many apis are running. private int waitForApi; - /// true to force reqest. - private bool forceReqest; + /// true to force request. + private bool forceRequest; + + /// List of search pids. private List searchPidList; + #endregion + + #region Constructor + /// Initializes a new instance of the PlaceNews class. /// Stubbfel, 09.09.2013. public PlaceNews() @@ -53,6 +60,12 @@ namespace CampusAppWP8.Pages.PlaceNews this.waitForApi = 0; } + #endregion + + #region Method + + #region protected + /// Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. /// Stubbfel, 09.09.2013. /// Ein Objekt, das die Ereignisdaten enthält. @@ -72,10 +85,8 @@ namespace CampusAppWP8.Pages.PlaceNews Thread thread = new Thread(delegate() { this.InitializeApi(); - }); thread.Start(); - } } @@ -92,6 +103,10 @@ namespace CampusAppWP8.Pages.PlaceNews } } + #endregion + + #region private + /// Initializes the API. /// Stubbfel, 09.09.2013. private void InitializeApi() @@ -106,20 +121,20 @@ namespace CampusAppWP8.Pages.PlaceNews } // init sps Api - if (this.spsApi == null || this.forceReqest) + if (this.spsApi == null || this.forceRequest) { this.spsApi = new SpsApi(); this.spsApi.OnLoaded += new SpsApi.OnIO(this.SpsApiIsReady); this.spsApi.OnFailedLoad += new SpsApi.OnFailed(this.ApiIsFail); this.spsApi.SetupCurrentPlaceRequest(Constants.SpsDomain_Buildings); - if (this.forceReqest) + if (this.forceRequest) { this.spsApi.LoadData(); } } // init pis API - if (this.pisApi == null || this.forceReqest) + if (this.pisApi == null || this.forceRequest) { this.pisApi = new PisApi(); this.pisApi.OnLoaded += new PisApi.OnIO(this.PisApiIsReady); @@ -127,7 +142,7 @@ namespace CampusAppWP8.Pages.PlaceNews } // init pss Api - if (this.pssApi == null || this.forceReqest) + if (this.pssApi == null || this.forceRequest) { this.pssApi = new PssApi(); this.pssApi.OnLoaded += new PssApi.OnIO(this.PssApiIsReady); @@ -158,7 +173,8 @@ namespace CampusAppWP8.Pages.PlaceNews this.spsApi.OnLoaded += new SpsApi.OnIO(this.SpsApiIsReady); this.spsApi.OnFailedLoad += new SpsApi.OnFailed(this.ApiIsFail); this.spsApi.SetupCurrentPlaceRequest(Constants.SpsDomain_Buildings); - } + } + this.spsApi.LoadData(); this.waitForApi++; } @@ -174,6 +190,7 @@ namespace CampusAppWP8.Pages.PlaceNews this.spsApi.OnFailedLoad += new SpsApi.OnFailed(this.ApiIsFail); this.spsApi.SetupCurrentPlaceRequest(Constants.SpsDomain_Buildings); } + this.spsApi.LoadData(); this.waitForApi++; } @@ -205,6 +222,7 @@ namespace CampusAppWP8.Pages.PlaceNews if (this.Dispatcher != null) { this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb))); + this.Dispatcher.BeginInvoke(new Action(() => this.ProgressBar.Visibility = Visibility.Collapsed)); } } @@ -215,22 +233,22 @@ namespace CampusAppWP8.Pages.PlaceNews this.waitForApi--; this.places.Model.AddPlaces(this.spsApi.Model.Places.ToList()); - searchPidList = this.spsApi.Model.CreatePidList(); + this.searchPidList = this.spsApi.Model.CreatePidList(); List infoNames = new List() { Constants.PisInformationName_Name }; List serviceNames = new List() { Constants.PssServiceName_PlaceNews }; // load from pis api - if (this.forceReqest || !this.places.Model.ContainsInformationNames(searchPidList, infoNames)) + if (this.forceRequest || !this.places.Model.ContainsInformationNames(this.searchPidList, infoNames)) { - this.pisApi.SetupInformationRequest(searchPidList, infoNames); + this.pisApi.SetupInformationRequest(this.searchPidList, infoNames); this.pisApi.LoadData(); this.waitForApi++; } // load from pis api - if (this.forceReqest || !this.places.Model.ContainsServiceNames(searchPidList, serviceNames)) + if (this.forceRequest || !this.places.Model.ContainsServiceNames(this.searchPidList, serviceNames)) { - this.pssApi.SetupServiceRequest(searchPidList, serviceNames); + this.pssApi.SetupServiceRequest(this.searchPidList, serviceNames); this.pssApi.LoadData(); this.waitForApi++; } @@ -246,7 +264,7 @@ namespace CampusAppWP8.Pages.PlaceNews this.ProgressBar.Visibility = Visibility.Collapsed; this.places.SaveData(); App.SaveToIsolatedStorage(Constants.IsolatedStorage_AllPlaces, this.places.Model); - this.forceReqest = false; + this.forceRequest = false; } /// Event handler. Called by UpdateButtonAppBar for click events. @@ -265,7 +283,7 @@ namespace CampusAppWP8.Pages.PlaceNews private void InitApiCurrentPositionForce() { Utilities.DetermineAndStoreCurrentPositionForce(); - this.forceReqest = true; + this.forceRequest = true; this.InitializeApi(); } @@ -301,5 +319,9 @@ namespace CampusAppWP8.Pages.PlaceNews } } } + + #endregion + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs index 960241b3..31828bcc 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs @@ -18,13 +18,19 @@ namespace CampusAppWP8.Pages.PlaceNews /// Stubbfel, 09.09.2013. public partial class ShowPad : PhoneApplicationPage { + #region Constructor + /// Initializes a new instance of the ShowPad class. /// Stubbfel, 09.09.2013. public ShowPad() { - InitializeComponent(); + this.InitializeComponent(); } + #endregion + + #region Method + /// Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. /// Stubbfel, 09.09.2013. /// Ein Objekt, das die Ereignisdaten enthält. @@ -44,5 +50,7 @@ namespace CampusAppWP8.Pages.PlaceNews base.OnNavigatedTo(e); } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs index a3406e04..905422f7 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Pages.Setting /// public partial class AppSettingPage : PhoneApplicationPage { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -25,6 +27,10 @@ namespace CampusAppWP8.Pages.Setting OnlyWiFiToggle.IsChecked = Settings.AppSetting.OnlyWifi; } + #endregion + + #region Method + /// /// Override the OnNavigatedFrom method /// @@ -37,5 +43,7 @@ namespace CampusAppWP8.Pages.Setting Settings.AppSetting.OnlyWifi = OnlyWiFiToggle.IsChecked.Value; } } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs index 86babeb8..2a5f9a81 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs @@ -20,6 +20,8 @@ namespace CampusAppWP8.Pages.Setting /// public partial class UserProfil : PhoneApplicationPage { + #region Member + /// /// Reference of the profileFile /// @@ -28,6 +30,10 @@ namespace CampusAppWP8.Pages.Setting /// List of courses. private CourseListPickerItemListModel courseList; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -38,6 +44,12 @@ namespace CampusAppWP8.Pages.Setting this.LoadListPicker(); } + #endregion + + #region Method + + #region protected + /// /// Override the OnNavigatedFrom method /// @@ -50,6 +62,10 @@ namespace CampusAppWP8.Pages.Setting } } + #endregion + + #region private + /// Loads list picker. /// Stubbfel, 10.09.2013. private void LoadListPicker() @@ -102,5 +118,9 @@ namespace CampusAppWP8.Pages.Setting Logger.LogException(e); } } + + #endregion + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs index 22559c56..459a5316 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs @@ -24,9 +24,15 @@ namespace CampusAppWP8.Pages /// public partial class StartPage : PhoneApplicationPage { + #region Member + /// List of initialise courses. private CourseFeed initCourseList; + #endregion + + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -76,6 +82,12 @@ namespace CampusAppWP8.Pages } } + #endregion + + #region Method + + #region protected + /// /// Methods overrides the OnNavigatedTo-Method /// @@ -85,6 +97,10 @@ namespace CampusAppWP8.Pages base.OnNavigatedTo(e); } + #endregion + + #region private + /// Stores course feed. /// Stubbfel, 10.09.2013. private void StoreCourseFeed() @@ -204,7 +220,7 @@ namespace CampusAppWP8.Pages /// Event information. private void ApplicationBarMenuItem4_Click(object sender, EventArgs e) { - Uri url = new Uri("/Utility/QRScanner/QRScanner.xaml", UriKind.Relative); + Uri url = new Uri("/Pages/Dev/QRScanner.xaml", UriKind.Relative); NavigationService.Navigate(url); } @@ -251,5 +267,9 @@ namespace CampusAppWP8.Pages Settings.AppSetting.GeoWatchEnable = false; } } + + #endregion + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs index a1de45c2..06ab89bd 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs @@ -12,9 +12,9 @@ namespace CampusAppWP8.Pages.StudentCouncil using System.Windows.Navigation; using CampusAppWP8.Feed.StudentCouncil; using CampusAppWP8.Resources; + using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; - using CampusAppWP8.Utility; /// /// Class for the StudentCouncilPage diff --git a/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs index 50afc636..0344e9d7 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs @@ -16,6 +16,8 @@ namespace CampusAppWP8.Pages.Webmail /// public partial class WebmailPage : PhoneApplicationPage { + #region Constructor + /// /// Initializes a new instance of the class. /// @@ -25,6 +27,10 @@ namespace CampusAppWP8.Pages.Webmail this.LoadWebmailPage(); } + #endregion + + #region Method + /// /// Method load WebmailPage /// @@ -32,5 +38,7 @@ namespace CampusAppWP8.Pages.Webmail { this.WebmailBrowser.Navigate(new Uri(Constants.UrlWebMail_Addr, UriKind.Absolute)); } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Resources/Icons.cs b/CampusAppWP8/CampusAppWP8/Resources/Icons.cs index b52d7047..eb719a52 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/Icons.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/Icons.cs @@ -33,6 +33,17 @@ namespace CampusAppWP8.Resources } } + /// + /// Gets the uri string of the AddContact icon. + /// + public static string AddContact + { + get + { + return Themerize("add_contact_159.png"); + } + } + /// /// Gets the uri string of the Campus icon. /// @@ -176,6 +187,17 @@ namespace CampusAppWP8.Resources } } + /// + /// Gets the uri string of the Lab icon. + /// + public static string Lab + { + get + { + return Themerize("lab_159.png"); + } + } + /// /// Gets the uri string of the Lamb icon. /// @@ -187,6 +209,17 @@ namespace CampusAppWP8.Resources } } + /// + /// Gets the uri string of the Lecture icon. + /// + public static string Lecture + { + get + { + return Themerize("lecture_159.png"); + } + } + /// /// Gets the uri string of the Lectures icon. /// @@ -275,6 +308,17 @@ namespace CampusAppWP8.Resources } } + /// + /// Gets the uri string of the Practise icon. + /// + public static string Practise + { + get + { + return Themerize("practise_159.png"); + } + } + /// /// Gets the uri string of the Schedule icon. /// @@ -308,6 +352,17 @@ namespace CampusAppWP8.Resources } } + /// + /// Gets the uri string of the Seminar icon. + /// + public static string Seminar + { + get + { + return Themerize("seminar_159.png"); + } + } + /// /// Gets the uri string of the StudentCouncil icon. /// diff --git a/CampusAppWP8/CampusAppWP8/Resources/Icons.resx b/CampusAppWP8/CampusAppWP8/Resources/Icons.resx index 1cdc52f7..35f73cf8 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/Icons.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/Icons.resx @@ -120,6 +120,9 @@ add_159.png + + add_contact_159.png + campus_159.png @@ -159,9 +162,15 @@ info_159.png + + lab_159.png + info_159.png + + lecture_159.png + lectures_159.png @@ -186,6 +195,9 @@ info_159.png + + practise_159.png + schedule_159.png @@ -195,6 +207,9 @@ search_place_159.png + + seminar_159.png + student_council_159.png diff --git a/CampusAppWP8/CampusAppWP8/Settings.StyleCop b/CampusAppWP8/CampusAppWP8/Settings.StyleCop index 3ecec60b..cf756198 100644 --- a/CampusAppWP8/CampusAppWP8/Settings.StyleCop +++ b/CampusAppWP8/CampusAppWP8/Settings.StyleCop @@ -1,9 +1,26 @@ + akadgrad api + apis enum + initialise + initialises + ndef + ndefs + nfc + param + pid + pids + pis + prev + pss + Senftenberg + sps Stubbfel + uni + wifi \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Settings.cs b/CampusAppWP8/CampusAppWP8/Settings.cs index a09bbe44..a02b99fb 100644 --- a/CampusAppWP8/CampusAppWP8/Settings.cs +++ b/CampusAppWP8/CampusAppWP8/Settings.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8 /// public static class Settings { + #region Member + /// /// reference of the user-profile-file /// @@ -25,6 +27,10 @@ namespace CampusAppWP8 /// private static AppSettings appSetting = new AppSettings(); + #endregion + + #region Property + /// /// Gets or sets the user-profile-file /// @@ -62,5 +68,7 @@ namespace CampusAppWP8 } } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/ThemelizedIcons.cs b/CampusAppWP8/CampusAppWP8/ThemelizedIcons.cs index 0cf17d0f..e353db8e 100644 --- a/CampusAppWP8/CampusAppWP8/ThemelizedIcons.cs +++ b/CampusAppWP8/CampusAppWP8/ThemelizedIcons.cs @@ -14,11 +14,17 @@ namespace CampusAppWP8 /// public class ThemelizedIcons { + #region Member + /// /// Resource object. /// private static Icons themelized = new Icons(); + #endregion + + #region Property + /// /// Gets the resource object. /// @@ -29,5 +35,7 @@ namespace CampusAppWP8 return themelized; } } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Utility/File.cs b/CampusAppWP8/CampusAppWP8/Utility/File.cs index 3a444a0d..7905b1d9 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/File.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/File.cs @@ -18,6 +18,8 @@ namespace CampusAppWP8.Utility /// public class File { + #region Member + /// /// Folder object. /// @@ -28,6 +30,10 @@ namespace CampusAppWP8.Utility /// private string filename = string.Empty; + #endregion + + #region Constructor + /// Initializes a new instance of the class. /// Stubbfel, 03.09.2013. /// file name. @@ -36,11 +42,21 @@ namespace CampusAppWP8.Utility this.filename = filename; } + #endregion + + #region Events + /// /// Delegation of the write callback function prototype. /// public delegate void WriteCallbackFunc(); + #endregion + + #region Method + + #region public + /// Read data from file to a string. /// Stubbfel, 03.09.2013. /// data string. @@ -99,6 +115,10 @@ namespace CampusAppWP8.Utility return null; } + #endregion + + #region private + /// /// Read data synchronous from file. /// @@ -208,5 +228,9 @@ namespace CampusAppWP8.Utility onSavedCallback(); } } + + #endregion + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Utility/Logger.cs b/CampusAppWP8/CampusAppWP8/Utility/Logger.cs index 6b8d3d33..4416a3b4 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Logger.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Logger.cs @@ -14,6 +14,8 @@ namespace CampusAppWP8.Utility /// public class Logger { + #region Method + /// /// Method log a Exception /// @@ -31,5 +33,7 @@ namespace CampusAppWP8.Utility { Console.WriteLine(msg); } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs index 6653f038..f02e2040 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs @@ -1,43 +1,69 @@ -using CampusAppWP8.Resources; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media.Imaging; +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 09.09.2013 +//---------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { + using System; + using System.Windows; + using System.Windows.Controls; + using System.Windows.Media.Imaging; + using CampusAppWP8.Resources; + + /// Add person button. + /// Stubbfel, 12.09.2013. public class AddPersonButton : System.Windows.Controls.Button { - private static BitmapImage icon = new BitmapImage(new Uri(Icons.Add, UriKind.Relative)); - - public AddPersonButton() - : base() - { - this.Content = new Image - { - Source = icon - }; - } + #region Member + /// The person identifier property. public static readonly DependencyProperty PersonIdProperty = DependencyProperty.Register("PersonID", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false)); - + /// The function index property. public static readonly DependencyProperty FunctionIndexProperty = DependencyProperty.Register("FunctionIndex", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false)); + /// The icon. + private static BitmapImage icon = new BitmapImage(new Uri(Icons.AddContact, UriKind.Relative)); + + #endregion + + #region Constructor + + /// Initializes a new instance of the AddPersonButton class. + /// Stubbfel, 12.09.2013. + public AddPersonButton() + : base() + { + this.Content = new Image + { + Source = icon + }; + } + + #endregion + + #region Property + + /// Gets or sets the identifier of the person. + /// The identifier of the person. public object PersonId { get { return (object)this.GetValue(PersonIdProperty); } set { this.SetValue(PersonIdProperty, value); } } + /// Gets or sets zero-based index of the function. + /// The function index. public object FunctionIndex { get { return (object)this.GetValue(FunctionIndexProperty); } set { this.SetValue(FunctionIndexProperty, value); } } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs index 98b696d5..45d20f39 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs @@ -15,6 +15,8 @@ namespace CampusAppWP8.Utility.Lui.MessageBoxes /// public class MessageBoxes { + #region Method + /// /// Method show the MessageBox for the GeoWatch-OptIn /// @@ -37,10 +39,12 @@ namespace CampusAppWP8.Utility.Lui.MessageBoxes /// Shows the main model information message box. /// Stubbfel, 10.09.2013. /// custom text for the box. - /// . + /// result of the UserInteraction public static MessageBoxResult ShowMainModelInfoMessageBox(string text) { return MessageBox.Show(text, AppResources.MsgBox_InfoHeader, MessageBoxButton.OK); } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs index 06927893..438edc25 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs @@ -13,6 +13,8 @@ namespace CampusAppWP8.Utility.NDEF /// Stubbfel, 21.08.2013. public class NDEFShortRecord : NDEFRecord { + #region Constructor + /// Initializes a new instance of the NDEFShortRecord class. /// Stubbfel, 21.08.2013. public NDEFShortRecord() @@ -37,6 +39,10 @@ namespace CampusAppWP8.Utility.NDEF this.Payload = Encoding.UTF8.GetString(array, index + this.HeaderSize + this.PayloadPraefix.Length, payLoadSize); } + #endregion + + #region Method + /// Converts this NDEFShortRecord to a byte array. /// Stubbfel, 21.08.2013. /// This object as a byte[]. @@ -59,5 +65,7 @@ namespace CampusAppWP8.Utility.NDEF return array; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Utility/StringManager.cs b/CampusAppWP8/CampusAppWP8/Utility/StringManager.cs index 4c8b93d9..8a87aeae 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/StringManager.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/StringManager.cs @@ -7,9 +7,9 @@ //---------------------------------------------------------------------- namespace CampusAppWP8.Utility { - using CampusAppWP8.Resources; using System; using System.Text.RegularExpressions; + using CampusAppWP8.Resources; /// /// Class provides some special StringMethods @@ -23,6 +23,9 @@ namespace CampusAppWP8.Utility /// private static readonly string HtmlTagPattern = "<.*?>"; + /// The mail valid regular expression. + private static readonly string EMailValidRegex = @"^(?("")(""[^""]+?""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9]{2,17}))$"; + #endregion #region Methods @@ -33,7 +36,7 @@ namespace CampusAppWP8.Utility /// String with Html-Tags /// String without Html-Tags public static string StripHTML(string inputString) - { + { string result = Regex.Replace(inputString, HtmlTagPattern, string.Empty); return System.Net.HttpUtility.HtmlDecode(result); } @@ -48,11 +51,10 @@ namespace CampusAppWP8.Utility return str.ToString() + "\n"; } - /// - /// Method remove(TrimEND!) an Newline to a string - /// - /// input string - /// input string - newlineMethod remove(TrimEND!) an Newline to a string. + /// Stubbfel, 12.09.2013. + /// input string. + /// input string - newline. public static string RemoveNewLine(string str) { return str.TrimEnd('\n'); @@ -67,10 +69,10 @@ namespace CampusAppWP8.Utility // Return true if strIn is in valid e-mail format. try { - return Regex.IsMatch(strIn, - @"^(?("")(""[^""]+?""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" + - @"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9]{2,17}))$", - RegexOptions.IgnoreCase); + return Regex.IsMatch( + strIn, + StringManager.EMailValidRegex, + RegexOptions.IgnoreCase); } catch (Exception) { @@ -78,11 +80,11 @@ namespace CampusAppWP8.Utility } } - /// Creates uni telefon number. - /// Stubbfel, 04.09.2013. - /// The input. - /// The new uni telefon number. - public static string CreateUniTelefonNumber(string input) + /// Creates uni telefon number. + /// Stubbfel, 04.09.2013. + /// The input. + /// The new uni telefon number. + public static string CreateUniTelefonNumber(string input) { string result = null; if (input.Length < 5) @@ -95,7 +97,7 @@ namespace CampusAppWP8.Utility } Regex regexObj = new Regex(@"[^\d]"); - result = regexObj.Replace(result.TrimStart('0'), ""); + result = regexObj.Replace(result.TrimStart('0'), string.Empty); result = Constants.DeTelPrefix + result; return result; } diff --git a/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs b/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs index 0cba0d1f..cbc4c010 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs @@ -12,7 +12,6 @@ namespace CampusAppWP8.Utility using System.Device.Location; using System.Globalization; using System.Linq; - using System.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Media; @@ -24,10 +23,7 @@ namespace CampusAppWP8.Utility /// public static class Utilities { - /// - /// ResetEvent for CampusDetermination - /// - private static ManualResetEvent waitForCampus = new ManualResetEvent(false); + #region Enums /// /// Comparison types. @@ -60,6 +56,10 @@ namespace CampusAppWP8.Utility GreaterEqual } + #endregion + + #region Method + /// /// Compares the difference between a specified DateTime and Now /// and the specified time difference (in Days). @@ -285,9 +285,9 @@ namespace CampusAppWP8.Utility } } - /// Query if the phone is in the uni network. Method compares only Networkname and Description! + /// Query if the phone is in the uni network. Method compares only Network name and Description! /// Stubbfel, 26.08.2013. - /// true if uni networkavailable, false if not. + /// true if uni network is available, false if not. public static bool IsUniNetworkAvailable() { NetworkInterfaceList networkInterfaceList = new NetworkInterfaceList(); @@ -340,5 +340,7 @@ namespace CampusAppWP8.Utility return MainModel.ForceType.INVALID; } } + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Utility/XmlManager.cs b/CampusAppWP8/CampusAppWP8/Utility/XmlManager.cs index 75d1467e..118e8a11 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/XmlManager.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/XmlManager.cs @@ -16,6 +16,8 @@ namespace CampusAppWP8.Utility /// public class XmlManager { + #region Method + /// /// Method deserialization a string to a Model /// @@ -51,12 +53,11 @@ namespace CampusAppWP8.Utility return model; } - /// - /// Method serializes a model to a string. - /// - /// type of the model - /// model object - /// serialized string + /// Method serializes a model to a string. + /// Stubbfel, 12.09.2013. + /// type of the model. + /// model object. + /// serialized string. public static string SerializationToString(T model) { string retValue = string.Empty; @@ -84,5 +85,7 @@ namespace CampusAppWP8.Utility return retValue; } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceInformation.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceInformation.cs index 4768712b..050c92bf 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceInformation.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceInformation.cs @@ -7,20 +7,35 @@ //---------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.GeoDb { + using System; using System.Xml.Serialization; /// Information about the place. /// Stubbfel, 19.08.2013. - public class PlaceInformation + public class PlaceInformation : IEquatable { /// Gets or sets the name of the information. /// The name of the information. - [XmlElement("placeInformationName")] + [XmlAttribute("placeInformationName")] public string InformationName { get; set; } /// Gets or sets the information value. /// The information value. [XmlText] public string InformationValue { get; set; } + + /// Tests if this PlaceInformation is considered equal to another. + /// Stubbfel, 09.09.2013. + /// The place information to compare to this object. + /// true if the objects are considered equal, false if they are not. + public bool Equals(PlaceInformation other) + { + if (other.InformationName.Equals(this.InformationName)) + { + return true; + } + + return false; + } } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceModel.cs index 3b048ee8..6b533c75 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceModel.cs @@ -8,13 +8,16 @@ namespace CampusAppWPortalLib8.Model.GeoDb { + using System; + using System.Collections.Generic; using System.Collections.ObjectModel; + using System.Text.RegularExpressions; using System.Xml.Serialization; /// /// Model for a place of the SPSService /// - public class PlaceModel + public class PlaceModel : IEquatable { /// /// Gets or sets the placeId @@ -34,6 +37,7 @@ namespace CampusAppWPortalLib8.Model.GeoDb [XmlAttribute("refpoint")] public string RefPoint { get; set; } + /// Gets or sets the information. /// The information. [XmlElement("placeInformation")] @@ -43,5 +47,121 @@ namespace CampusAppWPortalLib8.Model.GeoDb /// The services. [XmlElement("placeService")] public ObservableCollection Services { get; set; } + + /// Converts this object to a nfc string. + /// Stubbfel, 21.08.2013. + /// This object as a string. + public string ToNfcString() + { + string nfcStr = "{\"pid\":\"" + this.PlaceId + "\",\"parent\":\"" + this.ParentId + "\"}"; + return nfcStr; + } + + /// Tests if this PlaceModel is considered equal to another. + /// Stubbfel, 09.09.2013. + /// The place model to compare to this object. + /// true if the objects are considered equal, false if they are not. + public bool Equals(PlaceModel other) + { + if (other.PlaceId.Equals(this.PlaceId)) + { + return true; + } + + return false; + } + + /// Adds a place informations. + /// Stubbfel, 09.09.2013. + /// The place informations. + public void AddPlaceInformations(List placeInformations) + { + foreach (PlaceInformation info in placeInformations) + { + if (this.Informations.Contains(info)) + { + int index = this.Informations.IndexOf(info); + this.Informations[index].InformationValue = info.InformationValue; + } + else + { + this.Informations.Add(info); + } + } + } + + /// Adds a place services. + /// Stubbfel, 09.09.2013. + /// The place services. + public void AddPlaceServices(List placeServices) + { + foreach (PlaceService service in placeServices) + { + if (this.Services.Contains(service)) + { + int index = this.Services.IndexOf(service); + this.Services[index].Request = service.Request; + this.Services[index].SAP = service.SAP; + } + else + { + this.Services.Add(service); + } + } + } + + /// Query if 'names' contains information names. + /// Stubbfel, 09.09.2013. + /// The names. + /// true if it succeeds, false if it fails. + public bool ContainsInformationNames(List names) + { + foreach (string name in names) + { + bool tmpResult = false; + foreach (PlaceInformation info in this.Informations) + { + if (name.Equals(info.InformationName)) + { + tmpResult = true; + break; + } + } + + if (!tmpResult) + { + return tmpResult; + } + } + + return true; + } + + /// Query if 'services' contains service names. + /// Stubbfel, 09.09.2013. + /// The services. + /// true if it succeeds, false if it fails. + public bool ContainsServiceNames(List services) + { + foreach (string name in services) + { + bool tmpResult = false; + foreach (PlaceService service in this.Services) + { + if (name.Equals(service.ServiceName)) + { + tmpResult = true; + break; + } + } + + if (!tmpResult) + { + return tmpResult; + } + } + + return true; + } } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceService.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceService.cs index 8a5f5bf8..220b59bb 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceService.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceService.cs @@ -8,11 +8,12 @@ namespace CampusAppWPortalLib8.Model.GeoDb { + using System; using System.Xml.Serialization; /// Place service. /// Stubbfel, 19.08.2013. - public class PlaceService + public class PlaceService : IEquatable { /// Gets or sets the name of the service. /// The name of the service. @@ -28,5 +29,29 @@ namespace CampusAppWPortalLib8.Model.GeoDb /// The request. [XmlElement("request")] public string Request { get; set; } + + /// Gets the URL string. + /// The URL string. + public string URLString + { + get + { + return this.SAP + this.Request; + } + } + + /// Tests if this PlaceService is considered equal to another. + /// Stubbfel, 09.09.2013. + /// The place service to compare to this object. + /// true if the objects are considered equal, false if they are not. + public bool Equals(PlaceService other) + { + if (other.ServiceName.Equals(this.ServiceName)) + { + return true; + } + + return false; + } } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/SpsModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/SpsModel.cs index 378d7e90..ea41c617 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/SpsModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/SpsModel.cs @@ -23,6 +23,7 @@ namespace CampusAppWPortalLib8.Model.GeoDb /// Stubbfel, 20.08.2013. public SpsModel() { + this.HasChanged = false; this.Places = new ObservableCollection(); } @@ -32,6 +33,10 @@ namespace CampusAppWPortalLib8.Model.GeoDb [XmlElement("place")] public ObservableCollection Places { get; set; } + /// Gets a value indicating whether this object has changed. + /// true if this object has changed, false if not. + public bool HasChanged { get; set; } + /// Gets places by information. /// Stubbfel, 19.08.2013. /// The query. @@ -83,5 +88,113 @@ namespace CampusAppWPortalLib8.Model.GeoDb return resultplaces.ToList(); } + + /// Adds the places. + /// Stubbfel, 09.09.2013. + /// A list of places. + public void AddPlaces(List places) + { + foreach (PlaceModel place in places) + { + if (this.Places.Contains(place)) + { + int index = this.Places.IndexOf(place); + this.Places[index].AddPlaceInformations(place.Informations.ToList()); + this.Places[index].AddPlaceServices(place.Services.ToList()); + } + else + { + this.Places.Add(place); + } + } + this.HasChanged = true; + } + + /// Creates PID list. + /// Stubbfel, 09.09.2013. + /// The new PID list. + public List CreatePidList() + { + List pidList = new List(); + foreach (PlaceModel place in this.Places) + { + pidList.Add(place.PlaceId); + } + + return pidList; + } + + /// Gets place by identifier. + /// Stubbfel, 09.09.2013. + /// The identifier. + /// The place by identifier. + public PlaceModel GetPlaceById(string id) + { + foreach (PlaceModel place in this.Places) + { + if (place.PlaceId.Equals(id)) + { + return place; + } + } + + return null; + } + + /// Query if 'pidList' contains information names. + /// Stubbfel, 09.09.2013. + /// List of pids. + /// The names. + /// true if it succeeds, false if it fails. + public bool ContainsInformationNames(List pidList, List names) + { + foreach (string pid in pidList) + { + PlaceModel place = this.GetPlaceById(pid); + if (!place.ContainsInformationNames(names)) + { + return false; + } + } + + return true; + } + + /// Query if 'pidList' contains service names. + /// Stubbfel, 09.09.2013. + /// List of pids. + /// The names. + /// true if it succeeds, false if it fails. + public bool ContainsServiceNames(List pidList, List names) + { + foreach (string pid in pidList) + { + PlaceModel place = this.GetPlaceById(pid); + if (!place.ContainsServiceNames(names)) + { + return false; + } + } + + return true; + } + + /// Filter by PID. + /// Stubbfel, 11.09.2013. + /// List of pids. + /// flitered list of places + public List FilterByPid(List pidList) + { + List fitlerList = new List(); + foreach (PlaceModel place in this.Places) + { + if (pidList.Contains(place.PlaceId)) + { + fitlerList.Add(place); + } + } + + return fitlerList; + } } } diff --git a/Doc/html/annotated.html b/Doc/html/annotated.html index 4472d9e4..3aef254a 100644 --- a/Doc/html/annotated.html +++ b/Doc/html/annotated.html @@ -110,144 +110,188 @@ $(document).ready(function(){initNavTree('annotated.html','');});
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12345]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\NCampusAppWP8
 oNFeed
 |oNDepartments
 |oNEvents
 |oNGeoApi
 |oNLecture
 |oNLink
 |oNMensa
 |oNNews
 |oNOpeninghours
 |\NStudentCouncil
 oNModel
 |oNCampusmap
 |oNDepartments
 |oNevents_news
 |oNGeoDb
 |oNLecture
 |oNLink
 |oNMensa
 |oNOpeninghours
 |oNRSS
 |oNSetting
 |oNStudentCouncil
 |oNUtility
 |\CXmlModel< T >Xml model io handler class.
 oNPages
 |oNCampusmap
 |oNDepartments
 |oNEvents
 |oNLecture
 |oNLinks
 |oNMensa
 |oNNews
 |oNOpeninghours
 |oNSetting
 |oNStudentCouncil
 |oNWebmail
 |\CStartPageClass for the StartPage
 oNResources
 |oCAppResourcesEine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
 |oCConstantsEine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
 |\CIconsIcons uri string.
 oNUtility
 |oNLui
 |oCFileFile class.
 |oCHttpRequestClass realize the access of restful HttpRequest
 |oCLoggerThis Class creates logs for the app
 |\CXmlManagerClass provides some Xml-methods
 oCApp
 oCConstAccess to Constants.rex
 oCLocalizedStringsBietet Zugriff auf Zeichenfolgenressourcen.
 oCMainModel< T >Base model io handling class.
 \CThemelizedIconsTheme icons.
 oNApi
 |oNGeoApi
 |oNLecture
 |\NPerson
 oNFeed
 |oNDepartments
 |oNEvents
 |oNExams
 |oNLink
 |oNMensa
 |oNNews
 |oNOpeninghours
 |oNStudentCouncil
 |\NUtility
 oNFile
 |oNDepartments
 |oNExams
 |\NPlaces
 oNModel
 |oNCampusmap
 |oNDepartments
 |oNevents_news
 |oNExams
 |oNGeoDb
 |oNLecture
 |oNLink
 |oNMensa
 |oNOpeninghours
 |oNPerson
 |oNRSS
 |oNSetting
 |oNStudentCouncil
 |oNUtility
 |oCBinaryModelBinary model.
 |\CXmlModel< T >Xml model io handler class.
 oNPages
 |oNCampusmap
 |oNDepartments
 |oNDev
 |oNEvents
 |oNExams
 |oNLecture
 |oNLinks
 |oNMensa
 |oNNews
 |oNOpeninghours
 |oNPerson
 |oNPlaceNews
 |oNSetting
 |oNStudentCouncil
 |oNWebmail
 |\CStartPageClass for the StartPage
 oNResources
 |oCAppResourcesEine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
 |oCConstantsEine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
 |\CIconsIcons uri string.
 oNUtility
 |oNLui
 |oNNDEF
 |oCFileFile class.
 |oCHttpRequestClass realize the access of restful HttpRequest
 |oCLoggerThis Class creates logs for the app
 |\CXmlManagerClass provides some Xml-methods
 oCApp
 oCConstAccess to Constants.rex
 oCLocalizedStringsLocalized strings.
 oCMainModel< T >Base model io handling class.
 \CThemelizedIconsTheme icons.
@@ -255,7 +299,7 @@ $(document).ready(function(){initNavTree('annotated.html','');});