diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs index 8809c8a2..94ef65b8 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/CampusSpsApi.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 12.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the campus sps API class +//----------------------------------------------------------------------- namespace CampusAppWP8.Api.GeoApi { using System; @@ -12,16 +13,15 @@ namespace CampusAppWP8.Api.GeoApi using CampusAppWP8.Resources; using CampusAppWP8.Utility; - /// - /// Class for SPSAPI - /// + /// Class for SPSAPI. + /// Stubbfel, 14.10.2013. + /// public class CampusSpsApi : SpsApi { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public CampusSpsApi() : base() { @@ -32,18 +32,18 @@ namespace CampusAppWP8.Api.GeoApi #region Method /// - /// Method set the UriParameter of a campusRequest for a given latitude and longitude + /// Method set the UriParameter of a campusRequest for a given latitude and longitude. /// - /// latitude parameter - /// longitude parameter + /// Stubbfel, 14.10.2013. + /// latitude parameter. + /// longitude parameter. public void SetupCampusRequest(string lat, string log) { this.SetupPlaceRequest(lat, log, Constants.SpsApi_CampusDomain); } - /// - /// Method set the UriParameter of a campusRequest for the actualPosition - /// + /// Method set the UriParameter of a campusRequest for the actualPosition. + /// Stubbfel, 14.10.2013. public void SetupCurrentCampusRequest() { Utilities.DetermineAndStoreCurrentPosition(); @@ -52,10 +52,9 @@ namespace CampusAppWP8.Api.GeoApi this.SetupCampusRequest(lat, log); } - /// - /// Method return the campus of the placeList - /// - /// actual campus + /// Method return the campus of the placeList. + /// Stubbfel, 14.10.2013. + /// actual campus. public CampusAppWPortalLib8.Model.Settings.Campus GetCampus() { if (this.Model == null) diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs index a35d987b..9d8b112d 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PisApi.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 09.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the pis API class +//----------------------------------------------------------------------- namespace CampusAppWP8.Api.GeoApi { using System.Collections.Generic; @@ -15,14 +15,15 @@ namespace CampusAppWP8.Api.GeoApi using CampusAppWPortalLib8.Model; using CampusAppWPortalLib8.Model.Utility; - /// Pis api. - /// Stubbfel, 09.09.2013. + /// Pis api. + /// Stubbfel, 09.09.2013. + /// public class PisApi : XmlModel { #region Constructor - /// Initializes a new instance of the PisApi class. - /// Stubbfel, 09.09.2013. + /// Initializes a new instance of the PisApi class. + /// Stubbfel, 09.09.2013. public PisApi() : base(ModelType.Feed, Constants.UrlPisService) { @@ -32,10 +33,10 @@ namespace CampusAppWP8.Api.GeoApi #region Method - /// Sets up the information request. - /// Stubbfel, 09.09.2013. - /// List of pids. - /// (Optional) list of names of the information. + /// Sets up the information request. + /// Stubbfel, 09.09.2013. + /// List of pids. + /// (Optional) list of names of the information. public void SetupInformationRequest(List pidList, List infoNames = null) { string pidListStr = string.Empty; diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs index 77e91e24..52e5afb3 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/PssApi.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 09.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the pss API class +//----------------------------------------------------------------------- namespace CampusAppWP8.Api.GeoApi { using System.Collections.Generic; @@ -15,14 +15,15 @@ namespace CampusAppWP8.Api.GeoApi using CampusAppWPortalLib8.Model; using CampusAppWPortalLib8.Model.Utility; - /// Pss api. - /// Stubbfel, 09.09.2013. + /// Pss api. + /// Stubbfel, 09.09.2013. + /// public class PssApi : XmlModel { #region Constructor - /// Initializes a new instance of the PssApi class. - /// Stubbfel, 09.09.2013. + /// Initializes a new instance of the PssApi class. + /// Stubbfel, 09.09.2013. public PssApi() : base(ModelType.Feed, Constants.UrlPssService) { @@ -32,10 +33,10 @@ namespace CampusAppWP8.Api.GeoApi #region Method - /// Sets up the service request. - /// Stubbfel, 09.09.2013. - /// List of pids. - /// (Optional) list of names of the services. + /// Sets up the service request. + /// Stubbfel, 09.09.2013. + /// List of pids. + /// (Optional) list of names of the services. public void SetupServiceRequest(List pidList, List serviceNames = null) { string pidListStr = string.Empty; diff --git a/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs b/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs index 6c00b9ee..806d1ca2 100644 --- a/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/GeoApi/SpsApi.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 06.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the sps API class +//----------------------------------------------------------------------- namespace CampusAppWP8.Api.GeoApi { using System.Collections.Generic; @@ -15,16 +16,15 @@ namespace CampusAppWP8.Api.GeoApi using CampusAppWPortalLib8.Model; using CampusAppWPortalLib8.Model.Utility; - /// - /// Class for SPSAPI - /// + /// Class for SPSAPI. + /// Stubbfel, 14.10.2013. + /// public class SpsApi : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public SpsApi() : base(ModelType.Feed, Constants.UrlSpsService) { @@ -35,11 +35,12 @@ namespace CampusAppWP8.Api.GeoApi #region Method /// - /// Method set the UriParameter of a placeRequest for a given latitude and longitude + /// Method set the UriParameter of a placeRequest for a given latitude and longitude. /// - /// latitude of the place - /// longitude of the place - /// request domain + /// Stubbfel, 14.10.2013. + /// latitude of the place. + /// longitude of the place. + /// (Optional) request domain. public void SetupPlaceRequest(string lat, string log, string domian = null) { List parameterList = new List(); @@ -53,9 +54,9 @@ namespace CampusAppWP8.Api.GeoApi this.SetUriParams(parameterList); } - /// Sets up the current place request. - /// Stubbfel, 09.09.2013. - /// (Optional) request domain. + /// Sets up the current place request. + /// Stubbfel, 09.09.2013. + /// (Optional) request domain. public void SetupCurrentPlaceRequest(string domian = null) { Utilities.DetermineAndStoreCurrentPosition(); diff --git a/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs b/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs index 6ad81728..d724ae54 100644 --- a/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs @@ -1,30 +1,27 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 13.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the lecture API class +//----------------------------------------------------------------------- namespace CampusAppWP8.Api.Lecture { using CampusAppWP8.Model; using CampusAppWP8.Model.Lecture; using CampusAppWP8.Resources; using CampusAppWPortalLib8.Model; - - /// - /// Class for the feed of the Lecture - /// - /// - /// need the XmlAPI - /// + + /// Class for the feed of the Lecture. + /// need the XmlAPI. + /// public class LectureApi : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public LectureApi() : base(ModelType.Feed, Constants.UrlLecture_ApiBaseAddr) { diff --git a/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs b/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs index e44e2dbd..0e989bb6 100644 --- a/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs +++ b/CampusAppWP8/CampusAppWP8/Api/Person/PersonSearchApi.cs @@ -1,11 +1,11 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 05.09.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the person search API class +//----------------------------------------------------------------------- namespace CampusAppWP8.Api.Person { using CampusAppWP8.Model; @@ -13,14 +13,15 @@ namespace CampusAppWP8.Api.Person using CampusAppWP8.Resources; using CampusAppWPortalLib8.Model; - /// Person search api. - /// Stubbfel, 05.09.2013. + /// Person search api. + /// Stubbfel, 05.09.2013. + /// public class PersonSearchApi : XmlModel { #region Constructor - /// Initializes a new instance of the PersonSearchApi class. - /// Stubbfel, 05.09.2013. + /// Initializes a new instance of the PersonSearchApi class. + /// Stubbfel, 05.09.2013. public PersonSearchApi() : base(ModelType.Feed, Constants.UrlPerson_PersonSearchByName) { diff --git a/CampusAppWP8/CampusAppWP8/Assets/AlignmentGrid.png b/CampusAppWP8/CampusAppWP8/Assets/AlignmentGrid.png deleted file mode 100644 index f7d2e978..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/AlignmentGrid.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileLarge.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileLarge.png deleted file mode 100644 index e0c59ac0..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileLarge.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileMedium.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileMedium.png deleted file mode 100644 index e93b89d6..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileMedium.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileSmall.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileSmall.png deleted file mode 100644 index 550b1b5e..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/FlipCycleTileSmall.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/IconicTileMediumLarge.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/IconicTileMediumLarge.png deleted file mode 100644 index 686e6b53..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/IconicTileMediumLarge.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/IconicTileSmall.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/IconicTileSmall.png deleted file mode 100644 index d4b5ede1..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/IconicTileSmall.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_large.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_large.png deleted file mode 100644 index da968db0..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_large.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_medium.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_medium.png deleted file mode 100644 index 98634e93..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_medium.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_small.png b/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_small.png deleted file mode 100644 index 66e4b500..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/Tiles/kachel_small.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/psd/holo_optionsbuttons.psd b/CampusAppWP8/CampusAppWP8/Assets/psd/holo_optionsbuttons.psd deleted file mode 100644 index 53796ff0..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/psd/holo_optionsbuttons.psd and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/Assets/psd/iconbutton_effects2.psd b/CampusAppWP8/CampusAppWP8/Assets/psd/iconbutton_effects2.psd deleted file mode 100644 index 4b15310c..00000000 Binary files a/CampusAppWP8/CampusAppWP8/Assets/psd/iconbutton_effects2.psd and /dev/null differ diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index f095f044..1f098b7d 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -138,6 +138,7 @@ + @@ -200,7 +201,9 @@ - + + False + @@ -432,8 +435,6 @@ - - @@ -445,7 +446,6 @@ - PreserveNewest @@ -543,24 +543,6 @@ - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - Designer diff --git a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs index e3c749f7..bbc55dcf 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//---------------------------------------------------------------------- +// 14.10.2013 +// Implements the department feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Departments { using System; @@ -14,18 +15,17 @@ namespace CampusAppWP8.Feed.Departments using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model; using CampusAppWPortalLib8.Model.Departments; - - /// - /// Feed class for the department information. - /// + + /// Feed class for the department information. + /// fiedlchr, 14.10.2013. + /// public class DepartmentFeed : XmlModel { #region Constructor - - /// - /// Initializes a new instance of the class. - /// - /// automatic loading of the data + + /// Initializes a new instance of the class. + /// fiedlchr, 14.10.2013. + /// (Optional) automatic loading of the data. public DepartmentFeed(bool autoLoad = true) : base(ModelType.FileAndFeed, Constants.FileDepartment_Name, Constants.UrlDepartment_Addr) { @@ -44,11 +44,10 @@ namespace CampusAppWP8.Feed.Departments #region Method - /// - /// Method implement CheckIsModelUpToDate()-Method . - /// - /// model object - /// true, if model is up-to-date, otherwise false + /// Method implement CheckIsModelUpToDate()-Method . + /// fiedlchr, 14.10.2013. + /// model object. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(DepartmentModel model) { bool retValue = true; @@ -65,12 +64,11 @@ namespace CampusAppWP8.Feed.Departments return retValue; } - /// - /// Method implement CheckIsFileUpToDate()-Method . - /// - /// model object - /// file info object - /// true, if file is up-to-date, otherwise false + /// Method implement CheckIsFileUpToDate()-Method . + /// fiedlchr, 14.10.2013. + /// model object. + /// file info object. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnLoad(DepartmentModel model, FileInfo info) { bool retValue = true; @@ -87,12 +85,11 @@ namespace CampusAppWP8.Feed.Departments return retValue; } - /// - /// Method implement CheckIsFileUpToDate()-Method . - /// - /// model object - /// file info object - /// true, if file is up-to-date, otherwise false + /// Method implement CheckIsFileUpToDate()-Method . + /// fiedlchr, 14.10.2013. + /// model object. + /// file info object. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnSave(DepartmentModel model, FileInfo info) { bool retValue = true; @@ -112,10 +109,10 @@ namespace CampusAppWP8.Feed.Departments 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. + /// Check if the model or file is up-to-date. + /// fiedlchr, 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); diff --git a/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs index 995f34dd..31e9aa46 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//---------------------------------------------------------------------- +// 14.10.2013 +// Implements the event feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Events { using System; @@ -15,17 +16,16 @@ namespace CampusAppWP8.Feed.Events using CampusAppWPortalLib8.Model.RSS; using CampusAppWPortalLib8.Model; - /// - /// Event Feed. - /// + /// Event Feed. + /// fiedlchr, 14.10.2013. + /// public class EventFeed : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// automatic loading of the data + /// Initializes a new instance of the class. + /// fiedlchr, 14.10.2013. + /// (Optional) automatic loading of the data. public EventFeed(bool autoLoad = true) : base(ModelType.FileAndFeed, Constants.FileEvents_Name, CampusAppWPortalLib8.Resources.Constants.UrlEvents_Addr) { @@ -43,11 +43,10 @@ namespace CampusAppWP8.Feed.Events #region Method - /// - /// Method implement CheckIsModelUpToDate()-Method - /// - /// model object - /// true, if model is up-to-date, otherwise false + /// Method implement CheckIsModelUpToDate()-Method + /// fiedlchr, 14.10.2013. + /// model object. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(RSSViewModel model) { bool retValue = true; @@ -64,12 +63,11 @@ namespace CampusAppWP8.Feed.Events return retValue; } - /// - /// Method implement CheckIsFileUpToDate()-Method - /// - /// model object - /// file info object - /// true, if file is up-to-date, otherwise false + /// Method implement CheckIsFileUpToDate()-Method + /// fiedlchr, 14.10.2013. + /// model object. + /// file info object. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnLoad(RSSViewModel model, FileInfo info) { bool retValue = true; @@ -86,12 +84,11 @@ namespace CampusAppWP8.Feed.Events return retValue; } - /// - /// Method implement CheckIsFileUpToDate()-Method - /// - /// model object - /// file info object - /// true, if file is up-to-date, otherwise false + /// Method implement CheckIsFileUpToDate()-Method + /// fiedlchr, 14.10.2013. + /// model object. + /// file info object. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnSave(RSSViewModel model, FileInfo info) { bool retValue = true; @@ -111,10 +108,10 @@ namespace CampusAppWP8.Feed.Events 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. + /// Check if the model or file is up-to-date. + /// fiedlchr, 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); diff --git a/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs index 107d0804..d9c03999 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.09.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the exam feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Exams { using System.IO; @@ -14,14 +15,15 @@ namespace CampusAppWP8.Feed.Exams using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model; - /// Exam feed. - /// Stubbfel, 02.09.2013. + /// Exam feed. + /// Stubbfel, 02.09.2013. + /// public class ExamFeed : XmlModel { #region Constructor - /// Initializes a new instance of the ExamFeed class. - /// Stubbfel, 02.09.2013. + /// Initializes a new instance of the ExamFeed class. + /// Stubbfel, 02.09.2013. public ExamFeed() : base(ModelType.FileAndFeed, Constants.FileExamApp_ExamFeed, Constants.UrlExamApp_ExamFeed) { @@ -35,10 +37,10 @@ namespace CampusAppWP8.Feed.Exams #region Method - /// Check is model up to date. - /// Stubbfel, 02.09.2013. - /// The model. - /// true if it succeeds, false if it fails. + /// Check is model up to date. + /// Stubbfel, 02.09.2013. + /// The model. + /// true if it succeeds, false if it fails. private bool CheckIsModelUpToDate(ExamListWp8Model model) { if (model == null) @@ -49,11 +51,11 @@ namespace CampusAppWP8.Feed.Exams 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. + /// 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(ExamListWp8Model model, FileInfo fileInfo) { if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) diff --git a/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs index 5e8237e7..fbe2dc3d 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Link/ClubLinkFeed.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the club link feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Link { using System; @@ -15,16 +16,15 @@ namespace CampusAppWP8.Feed.Link using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model; - /// - /// This Class is for ClubLinkFeeds - /// + /// This Class is for ClubLinkFeeds. + /// Stubbfel, 14.10.2013. + /// public class ClubLinkFeed : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public ClubLinkFeed() : base(ModelType.FileAndFeed, Constants.FileLink_ClubLinks, Constants.UrlLink_ClubLinks) { @@ -37,11 +37,10 @@ namespace CampusAppWP8.Feed.Link #region Method - /// - /// Method check if the FeedModel is up-to-date - /// - /// reference of the FeedModel - /// true, if model is up-to-date, otherwise false + /// Method check if the FeedModel is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(LinkListModel model) { if (model == null) @@ -53,12 +52,11 @@ namespace CampusAppWP8.Feed.Link return this.CheckIsUpToDate(lastModified); } - /// - /// Method check if the FeedFile is up-to-date - /// - /// reference of the FeedModel - /// info about the file - /// true, if file is up-to-date, otherwise false + /// Method check if the FeedFile is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// info about the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo) { if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) @@ -70,11 +68,10 @@ namespace CampusAppWP8.Feed.Link return this.CheckIsUpToDate(lastModified); } - /// - /// Check if the model or file is up-to-date. - /// - /// Date of the last modification - /// true, if is up-to-date, otherwise false + /// Check if the model or file is up-to-date. + /// Stubbfel, 14.10.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); diff --git a/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs index 4be0b0d5..d8a4cc74 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Link/CommonLinkFeed.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the common link feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Link { using System; @@ -15,16 +16,15 @@ namespace CampusAppWP8.Feed.Link using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model; - /// - /// This Class is for CommonLinkFeeds - /// + /// This Class is for CommonLinkFeeds. + /// Stubbfel, 14.10.2013. + /// public class CommonLinkFeed : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public CommonLinkFeed() : base(ModelType.FileAndFeed, Constants.FileLink_CommonLinks, Constants.UrlLink_CommonLinks) { @@ -37,11 +37,10 @@ namespace CampusAppWP8.Feed.Link #region Method - /// - /// Method check if the FeedModel is up-to-date - /// - /// reference of the FeedModel - /// true, if model is up-to-date, otherwise false + /// Method check if the FeedModel is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(LinkListModel model) { if (model == null) @@ -53,12 +52,11 @@ namespace CampusAppWP8.Feed.Link return this.CheckIsUpToDate(lastModified); } - /// - /// Method check if the FeedFile is up-to-date - /// - /// reference of the FeedModel - /// info about the file - /// true, if file is up-to-date, otherwise false + /// Method check if the FeedFile is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// info about the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo) { if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) @@ -70,11 +68,10 @@ namespace CampusAppWP8.Feed.Link return this.CheckIsUpToDate(lastModified); } - /// - /// Check if the model or file is up-to-date. - /// - /// Date of the last modification - /// true, if is up-to-date, otherwise false + /// Check if the model or file is up-to-date. + /// Stubbfel, 14.10.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); diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs index 39755ba2..030d6aae 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 03.05.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the mensa feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Mensa { using System; @@ -13,18 +14,17 @@ namespace CampusAppWP8.Feed.Mensa using CampusAppWPortalLib8.Model.Mensa; using CampusAppWPortalLib8.Model; - /// - /// This Class is for MensaFeeds - /// + /// This Class is for MensaFeeds. + /// Stubbfel, 14.10.2013. + /// public abstract class MensaFeed : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// name of the file - /// url of the feed + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. + /// name of the file. + /// url of the feed. protected MensaFeed(string fileName, string feedUrl) : base(ModelType.FileAndFeed, fileName, feedUrl) { @@ -37,8 +37,8 @@ namespace CampusAppWP8.Feed.Mensa #region Property - /// Gets or sets the title. - /// The title. + /// Gets the title. + /// The title. public string Title { get; protected set; } #endregion @@ -47,11 +47,10 @@ namespace CampusAppWP8.Feed.Mensa #region public - /// - /// Method creates a MensaFeed depends of certain Campus - /// - /// camus parameter - /// the correct mensaFeed + /// Method creates a MensaFeed depends of certain Campus. + /// Stubbfel, 14.10.2013. + /// camus parameter. + /// the correct mensaFeed. public static MensaFeed CreateCampusMensaFeed(CampusAppWPortalLib8.Model.Settings.Campus campus) { switch (campus) @@ -73,11 +72,10 @@ namespace CampusAppWP8.Feed.Mensa #region Private - /// - /// Method check if the FeedModel is up-to-date - /// - /// reference of the FeedModel - /// true, if model is up-to-date, otherwise false + /// Method check if the FeedModel is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(MenuWeekModel model) { if (model == null) @@ -89,12 +87,11 @@ namespace CampusAppWP8.Feed.Mensa return this.CheckIsUpToDate(lastModified); } - /// - /// Method check if the FeedFile is up-to-date - /// - /// reference of the FeedModel - /// info about the file - /// true, if file is up-to-date, otherwise false + /// Method check if the FeedFile is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// info about the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDate(MenuWeekModel model, FileInfo fileInfo) { if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) @@ -106,11 +103,10 @@ namespace CampusAppWP8.Feed.Mensa return this.CheckIsUpToDate(lastModified); } - /// - /// Method check if the last modification was later as the NewMenuWeekDay - /// - /// Date of the last modification - /// true, if is up-to-date, otherwise false + /// Method check if the last modification was later as the NewMenuWeekDay. + /// Stubbfel, 14.10.2013. + /// Date of the last modification. + /// true, if is up-to-date, otherwise false. private bool CheckIsUpToDate(DateTime lastModified) { int diff = lastModified.CompareTo(MenuWeekModel.CalcFirstWeekDay()); diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs index e07ffd42..e0765814 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBMain.cs @@ -1,24 +1,24 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 12.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the mensa feed cb main class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Mensa { using CampusAppWP8.Resources; - /// - /// MensaFeed for main campus of cottbus - /// + /// MensaFeed for main campus of cottbus. + /// Stubbfel, 14.10.2013. + /// public class MensaFeedCBMain : MensaFeed { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public MensaFeedCBMain() : base(Constants.FileMensa_Shedule_CBMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBMain) { diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs index 4c9d8d5b..a6956d5f 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBNorth.cs @@ -1,24 +1,24 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 12.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the mensa feed cb north class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Mensa { using CampusAppWP8.Resources; - /// - /// MensaFeed for main campus of cottbus - /// + /// MensaFeed for main campus of cottbus. + /// Stubbfel, 14.10.2013. + /// public class MensaFeedCBNorth : MensaFeed { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public MensaFeedCBNorth() : base(Constants.FileMensa_Shedule_CBNorth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBNorth) { diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs index 941e5cb4..fc33a1da 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedCBSouth.cs @@ -1,24 +1,24 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 12.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the mensa feed cb south class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Mensa { using CampusAppWP8.Resources; - /// - /// MensaFeed for main campus of cottbus - /// + /// MensaFeed for main campus of cottbus. + /// Stubbfel, 14.10.2013. + /// public class MensaFeedCBSouth : MensaFeed { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public MensaFeedCBSouth() : base(Constants.FileMensa_Shedule_CBSouth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBSouth) { diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs index 3d562a3c..0fe1fc1e 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeedSBFMain.cs @@ -1,24 +1,24 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 12.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the mensa feed sbf main class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Mensa { using CampusAppWP8.Resources; - /// - /// MensaFeed for main campus of cottbus - /// + /// MensaFeed for main campus of cottbus. + /// Stubbfel, 14.10.2013. + /// public class MensaFeedSBFMain : MensaFeed { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public MensaFeedSBFMain() : base(Constants.FileMensa_Shedule_SBFMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_SBFMain) { diff --git a/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs index 8eb21ab2..134f00c3 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs @@ -1,10 +1,11 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//----------------------------------------------------------------------------- +// 14.10.2013 +// Implements the news feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.News { using System; @@ -15,17 +16,16 @@ namespace CampusAppWP8.Feed.News using CampusAppWPortalLib8.Model.RSS; using CampusAppWPortalLib8.Model; - /// - /// News Feed. - /// + /// News Feed. + /// fiedlchr, 14.10.2013. + /// public class NewsFeed : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// automatic loading of the data + /// Initializes a new instance of the class. + /// fiedlchr, 14.10.2013. + /// (Optional) automatic loading of the data. public NewsFeed(bool autoLoad = true) : base(ModelType.FileAndFeed, Constants.FileNews_Name, CampusAppWPortalLib8.Resources.Constants.UrlNews_Addr) { @@ -43,11 +43,10 @@ namespace CampusAppWP8.Feed.News #region Method - /// - /// Method implement CheckIsModelUpToDate()-Method - /// - /// model object - /// true, if model is up-to-date, otherwise false + /// Method implement CheckIsModelUpToDate()-Method + /// fiedlchr, 14.10.2013. + /// model object. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(RSSViewModel model) { bool retValue = true; @@ -64,12 +63,11 @@ namespace CampusAppWP8.Feed.News return retValue; } - /// - /// Method implement CheckIsFileUpToDate()-Method - /// - /// model object - /// info object of the file - /// true, if file is up-to-date, otherwise false + /// Method implement CheckIsFileUpToDate()-Method + /// fiedlchr, 14.10.2013. + /// model object. + /// info object of the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnLoad(RSSViewModel model, FileInfo info) { bool retValue = true; @@ -84,13 +82,12 @@ namespace CampusAppWP8.Feed.News return retValue; } - - /// - /// Method implement CheckIsFileUpToDate()-Method - /// - /// model object - /// info object of the file - /// true, if file is up-to-date, otherwise false + + /// Method implement CheckIsFileUpToDate()-Method + /// fiedlchr, 14.10.2013. + /// model object. + /// info object of the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnSave(RSSViewModel model, FileInfo info) { bool retValue = true; @@ -110,10 +107,10 @@ namespace CampusAppWP8.Feed.News 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. + /// Check if the model or file is up-to-date. + /// fiedlchr, 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); diff --git a/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs index d77a8369..5c4c974d 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Openinghours/OpeninghoursFeed.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//---------------------------------------------------------------------- +// 14.10.2013 +// Implements the openinghours feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Openinghours { using System; @@ -14,17 +15,16 @@ namespace CampusAppWP8.Feed.Openinghours using CampusAppWP8.Resources; using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model; - - /// - /// This Class is for MesaFeeds - /// + + /// This Class is for MesaFeeds. + /// fiedlchr, 14.10.2013. + /// public class OpeninghoursFeed : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// fiedlchr, 14.10.2013. public OpeninghoursFeed() : base(ModelType.FileAndFeed, Constants.FileOpeningHours_OpeningHours, Constants.UrlOpeningHours_OpeningHours) { @@ -37,11 +37,10 @@ namespace CampusAppWP8.Feed.Openinghours #region Method - /// - /// Method check if the FeedModel is up-to-date - /// - /// reference of the FeedModel - /// true, if model is up-to-date, otherwise false + /// Method check if the FeedModel is up-to-date. + /// fiedlchr, 14.10.2013. + /// reference of the FeedModel. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(OpeninghoursWp8Model model) { bool retValue = true; @@ -58,12 +57,11 @@ namespace CampusAppWP8.Feed.Openinghours return retValue; } - /// - /// Method check if the FeedFile is up-to-date - /// - /// reference of the FeedModel - /// info about the file - /// true, if file is up-to-date, otherwise false + /// Method check if the FeedFile is up-to-date. + /// fiedlchr, 14.10.2013. + /// reference of the FeedModel. + /// info about the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnLoad(OpeninghoursWp8Model model, FileInfo info) { bool retValue = true; @@ -79,12 +77,11 @@ namespace CampusAppWP8.Feed.Openinghours return retValue; } - /// - /// Method check if the FeedFile is up-to-date - /// - /// reference of the FeedModel - /// info about the file - /// true, if file is up-to-date, otherwise false + /// Method check if the FeedFile is up-to-date. + /// fiedlchr, 14.10.2013. + /// reference of the FeedModel. + /// info about the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnSave(OpeninghoursWp8Model model, FileInfo info) { bool retValue = true; @@ -103,10 +100,10 @@ namespace CampusAppWP8.Feed.Openinghours 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. + /// Check if the model or file is up-to-date. + /// fiedlchr, 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); diff --git a/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs index 26c1e860..7bc6f61e 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/StudentCouncil/StudentCouncilFeed.cs @@ -15,16 +15,15 @@ namespace CampusAppWP8.Feed.StudentCouncil using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model; - /// - /// This Class is for StudentCouncilFeed - /// + /// This Class is for StudentCouncilFeed. + /// Stubbfel, 14.10.2013. + /// public class StudentCouncilFeed : XmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public StudentCouncilFeed() : base(ModelType.FileAndFeed, Constants.FileStudentCouncil_StudentCouncils, Constants.UrlStudentCouncil_StudentCouncils) { @@ -37,11 +36,10 @@ namespace CampusAppWP8.Feed.StudentCouncil #region Method - /// - /// Method check if the FeedModel is up-to-date - /// - /// reference of the FeedModel - /// true, if model is up-to-date, otherwise false + /// Method check if the FeedModel is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(StudentCouncilListModel model) { if (model == null) @@ -53,12 +51,11 @@ namespace CampusAppWP8.Feed.StudentCouncil return this.CheckIsUpToDate(lastModified); } - /// - /// Method check if the FeedFile is up-to-date - /// - /// reference of the FeedModel - /// info about the file - /// true, if file is up-to-date, otherwise false + /// Method check if the FeedFile is up-to-date. + /// Stubbfel, 14.10.2013. + /// reference of the FeedModel. + /// info about the file. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDate(StudentCouncilListModel model, FileInfo fileInfo) { if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1) @@ -70,11 +67,10 @@ namespace CampusAppWP8.Feed.StudentCouncil return this.CheckIsUpToDate(lastModified); } - /// - /// Check if the model or file is up-to-date. - /// - /// Date of the last modification - /// true, if is up-to-date, otherwise false + /// Check if the model or file is up-to-date. + /// Stubbfel, 14.10.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); diff --git a/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs index 10a6ecce..63b3c4bf 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Utility/CourseFeed.cs @@ -1,16 +1,18 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.09.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the course feed class +//----------------------------------------------------------------------- namespace CampusAppWP8.Feed.Utility { using CampusAppWP8.Feed.Exams; - /// Course Feed. - /// Stubbfel, 02.09.2013. + /// Course Feed. + /// Stubbfel, 02.09.2013. + /// public class CourseFeed : ExamFeed { } diff --git a/CampusAppWP8/CampusAppWP8/File/Departments/DepartmentFavoriteFile.cs b/CampusAppWP8/CampusAppWP8/File/Departments/DepartmentFavoriteFile.cs index fd5f4248..44983e0f 100644 --- a/CampusAppWP8/CampusAppWP8/File/Departments/DepartmentFavoriteFile.cs +++ b/CampusAppWP8/CampusAppWP8/File/Departments/DepartmentFavoriteFile.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 01.07.2013 -//---------------------------------------------------------------------- +// 14.10.2013 +// Implements the department favorite file class +//----------------------------------------------------------------------- namespace CampusAppWP8.File.Departments { using System.IO; @@ -13,16 +14,16 @@ namespace CampusAppWP8.File.Departments using CampusAppWPortalLib8.Model; using CampusAppWPortalLib8.Model.Departments; - /// - /// Feed object to handle favorite department feeds. - /// + /// Feed object to handle favorite department feeds. + /// fiedlchr, 14.10.2013. + /// public class DepartmentFavoriteFile : XmlModel { #region Constructor - /// Initializes a new instance of the DepartmentFavoriteFile class. - /// Stubbfel, 12.09.2013. - /// (Optional) the automatic load. + /// Initializes a new instance of the DepartmentFavoriteFile class. + /// fiedlchr, 12.09.2013. + /// (Optional) the automatic load. public DepartmentFavoriteFile(bool autoLoad = true) : base(ModelType.File, Constants.FileDepartment_Favorite_Name, string.Empty) { @@ -40,11 +41,10 @@ namespace CampusAppWP8.File.Departments #region Method - /// - /// Method implement CheckIsModelUpToDate()-Method . - /// - /// model object - /// true, if model is up-to-date, otherwise false + /// Method implement CheckIsModelUpToDate()-Method . + /// fiedlchr, 14.10.2013. + /// model object. + /// true, if model is up-to-date, otherwise false. private bool CheckIsModelUpToDate(DepartmentModel model) { bool retValue = true; @@ -59,12 +59,11 @@ namespace CampusAppWP8.File.Departments return retValue; } - /// - /// Method implement CheckIsFileUpToDate()-Method . - /// - /// model object - /// file info object - /// true, if file is up-to-date, otherwise false + /// Method implement CheckIsFileUpToDate()-Method . + /// fiedlchr, 14.10.2013. + /// model object. + /// file info object. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnLoad(DepartmentModel model, FileInfo info) { bool retValue = false; @@ -77,12 +76,11 @@ namespace CampusAppWP8.File.Departments return retValue; } - /// - /// Method implement CheckIsFileUpToDate()-Method . - /// - /// model object - /// file info object - /// true, if file is up-to-date, otherwise false + /// Method implement CheckIsFileUpToDate()-Method . + /// fiedlchr, 14.10.2013. + /// model object. + /// file info object. + /// true, if file is up-to-date, otherwise false. private bool CheckIsFileUpToDateOnSave(DepartmentModel model, FileInfo info) { bool retValue = false; diff --git a/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs b/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs index e4f71f58..c148e2b1 100644 --- a/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs +++ b/CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs @@ -1,34 +1,35 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 03.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the exam file class +//----------------------------------------------------------------------- namespace CampusAppWP8.File.Exams { using System.IO; using CampusAppWP8.Model; using Windows.Storage; - /// Exam file. - /// Stubbfel, 03.09.2013. + /// Exam file. + /// Stubbfel, 03.09.2013. + /// public class ExamFile : BinaryModel { #region Member - /// The storage file. + /// 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. - /// URL of the document. + /// Initializes a new instance of the ExamFile class. + /// Stubbfel, 03.09.2013. + /// Filename of the file. + /// URL of the document. public ExamFile(string fileName, string url) : base(CampusAppWPortalLib8.Model.ModelType.FileAndFeed, fileName, url) { @@ -46,6 +47,9 @@ namespace CampusAppWP8.File.Exams /// Executes the file operation. /// Stubbfel, 03.09.2013. #pragma warning disable 4014 + + /// Executes the file operation. + /// Stubbfel, 14.10.2013. public async void LaunchFile() { if (this.storageFile == null) @@ -62,8 +66,8 @@ namespace CampusAppWP8.File.Exams #endregion - /// Saves the and launch file. - /// Stubbfel, 03.09.2013. + /// Saves the and launch file. + /// Stubbfel, 03.09.2013. public void SaveAndLaunchFile() { if (this.File.Exist()) @@ -79,10 +83,10 @@ namespace CampusAppWP8.File.Exams #region private - /// Check is model up to date. - /// Stubbfel, 03.09.2013. - /// The model. - /// true if it succeeds, false if it fails. + /// Check is model up to date. + /// Stubbfel, 03.09.2013. + /// The model. + /// true if it succeeds, false if it fails. private bool CheckIsModelUpToDate(byte[] model) { if (model == null) @@ -93,11 +97,11 @@ namespace CampusAppWP8.File.Exams return true; } - /// Check is file up to date. - /// Stubbfel, 03.09.2013. - /// The model. - /// Information describing the file. - /// true if it succeeds, false if it fails. + /// Check is file up to date. + /// Stubbfel, 03.09.2013. + /// The model. + /// Information describing the file. + /// true if it succeeds, false if it fails. private bool CheckIsFileUpToDate(byte[] model, FileInfo fileInfo) { if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || model != null) diff --git a/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs b/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs index e6d2945a..e39c9ad0 100644 --- a/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs +++ b/CampusAppWP8/CampusAppWP8/File/Places/PlacesFile.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 09.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the places file class +//----------------------------------------------------------------------- namespace CampusAppWP8.File.Places { using CampusAppWP8.Model; @@ -13,14 +13,15 @@ namespace CampusAppWP8.File.Places using CampusAppWP8.Resources; using CampusAppWPortalLib8.Utility; - /// Places file. - /// Stubbfel, 09.09.2013. + /// Places file. + /// Stubbfel, 09.09.2013. + /// public class PlacesFile : XmlModel { #region Constructor - /// Initializes a new instance of the PlacesFile class. - /// Stubbfel, 09.09.2013. + /// Initializes a new instance of the PlacesFile class. + /// Stubbfel, 09.09.2013. public PlacesFile() : base(CampusAppWPortalLib8.Model.ModelType.File, Constants.FilePlace_AllPlaces) { @@ -33,11 +34,11 @@ namespace CampusAppWP8.File.Places #region Method - /// Check is file up to date. - /// Stubbfel, 09.09.2013. - /// The model. - /// Information describing the file. - /// true if it succeeds, false if it fails. + /// Check is file up to date. + /// Stubbfel, 09.09.2013. + /// The model. + /// Information describing the file. + /// 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 || (model != null && model.HasChanged)) @@ -48,9 +49,8 @@ namespace CampusAppWP8.File.Places return false; } - /// - /// Method load OfflineMap as Fallback - /// + /// Method load OfflineMap as Fallback. + /// Stubbfel, 14.10.2013. public void FallBackLoad() { SpsModel fallBackModel = XmlManager.DeserializationFileToModel(Constants.FileMap_OfflineMap); diff --git a/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs b/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs index bcb8b39b..f98219f1 100644 --- a/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs @@ -1,35 +1,36 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 03.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the binary model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model { using CampusAppWPortalLib8.Model; - /// Binary model. - /// Stubbfel, 03.09.2013. + /// Binary 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. - /// Filename of the file. - /// URL of the document. + /// Initializes a new instance of the BinaryModel class. + /// Stubbfel, 03.09.2013. + /// Type of the model. + /// Filename of the file. + /// URL of the document. public BinaryModel(ModelType modelType, string fileName, string url) : base(modelType, fileName, url) { } - /// Initializes a new instance of the BinaryModel class. - /// Stubbfel, 03.09.2013. - /// Type of the model. - /// Name of the source. + /// Initializes a new instance of the BinaryModel class. + /// Stubbfel, 03.09.2013. + /// Type of the model. + /// Name of the source. public BinaryModel(ModelType modelType, string sourceName) : base(modelType, sourceName) { @@ -39,10 +40,10 @@ namespace CampusAppWP8.Model #region Method - /// Deserialize model. - /// Stubbfel, 03.09.2013. - /// Information describing the model. - /// true if it succeeds, false if it fails. + /// Deserialize model. + /// Stubbfel, 03.09.2013. + /// Information describing the model. + /// true if it succeeds, false if it fails. protected override bool DeserializeModel(byte[] modelData) { bool retValue = true; @@ -59,9 +60,9 @@ namespace CampusAppWP8.Model return retValue; } - /// Gets the serialize model. - /// Stubbfel, 03.09.2013. - /// an byte Array. + /// Gets the serialize model. + /// Stubbfel, 03.09.2013. + /// an byte Array. protected override byte[] SerializeModel() { return this.Model; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/BuildingMapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/BuildingMapModel.cs index 6f222579..9c9dc708 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/BuildingMapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/BuildingMapModel.cs @@ -1,25 +1,35 @@ -using CampusAppWP8.Model.GeoDb; -using CampusAppWP8.Resources; -using CampusAppWPortalLib8.Utility; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; - +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// Stubbfel +// 14.10.2013 +// Implements the building map model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { + using System.Globalization; + using System.Linq; + using System.Windows; + using CampusAppWP8.Model.GeoDb; + using CampusAppWP8.Resources; + using CampusAppWPortalLib8.Utility; + + /// A data Model for the building map. + /// Stubbfel, 14.10.2013. + /// public class BuildingMapModel : MapModel { + /// Initializes a new instance of the BuildingMapModel class. + /// Stubbfel, 14.10.2013. + /// The identifier. public BuildingMapModel(string id) { SpsModel buildings = XmlManager.DeserializationFileToModel(Constants.FileMap_BuildingsMap); PlaceModel building = buildings.GetPlaceById(id); if (buildings == null) { - return; + return; } this.ImageSource = building.GetInformationsValue("ImageSource"); @@ -29,7 +39,7 @@ namespace CampusAppWP8.Model.Campusmap this.ImageWidth = tmpVal; } - if (double.TryParse(building.GetInformationsValue("ImageHeight"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal)) + if (double.TryParse(building.GetInformationsValue("ImageHeight"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal)) { this.ImageHeight = tmpVal; } @@ -52,6 +62,7 @@ namespace CampusAppWP8.Model.Campusmap { return; } + double x; double y; @@ -60,7 +71,7 @@ namespace CampusAppWP8.Model.Campusmap return; } - this.RefPoint = new Point(x,y); + this.RefPoint = new Point(x, y); if (double.TryParse(building.GetInformationsValue("ScaleX"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal)) { @@ -74,7 +85,6 @@ namespace CampusAppWP8.Model.Campusmap this.GeoOffsetX = building.GeoRefPoint.Longitude; this.GeoOffsetY = building.GeoRefPoint.Latitude; - } } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs index 3363f686..2e2757c5 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs @@ -1,36 +1,37 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 13.08.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the main map model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { - using System.Windows; - using CampusAppWP8.File.Places; + using System.Collections.Generic; + using System.Windows; using CampusAppWP8.Model.GeoDb; - using CampusAppWP8.Resources; - using System.Collections.Generic; + using CampusAppWP8.Resources; - /// - /// Class for the MapModel of the mainCampus of cottbus - /// + /// Class for the MapModel of the mainCampus of cottbus. + /// Stubbfel, 14.10.2013. + /// public class CBMainMapModel : CampusMapModel { #region Member - /// Variable for the identify of the campus. + /// Variable for the identify of the campus. private static readonly string Campus = ((int)CampusAppWPortalLib8.Model.Settings.Campus.CB_MAIN).ToString(); #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// - public CBMainMapModel(List placeList) : base (placeList,CBMainMapModel.Campus) + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. + /// List of places. + public CBMainMapModel(List placeList) + : base(placeList, CBMainMapModel.Campus) { this.ImageSource = Constants.FileMap_CBMainMap; this.ImageWidth = 2000; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs index 3c3740b7..a98fb364 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs @@ -1,31 +1,25 @@ -//----------------------------------------------------------------------------- -// -// Company copyright tag. +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 13.08.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the main map room model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { - using System.Windows; - using CampusAppWP8.File.Places; - using CampusAppWP8.Model.GeoDb; - using CampusAppWP8.Resources; - using System.Collections.Generic; - - /// - /// Class for the MapModel of the mainCampus of cottbus - /// + /// Class for the MapModel of the mainCampus of cottbus. + /// Stubbfel, 14.10.2013. public class CBMainMapRoomModel { #region Constructor + + /// Initializes a new instance of the CBMainMapRoomModel class. + /// Stubbfel, 14.10.2013. public CBMainMapRoomModel() { - } #endregion - - } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs index 579a80f3..45a71407 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs @@ -1,28 +1,27 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 26.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the campus map model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using System.Collections.Generic; using CampusAppWP8.Model.GeoDb; - /// - /// Class for the CampusMapModel - /// + /// Class for the CampusMapModel. + /// Stubbfel, 14.10.2013. + /// public class CampusMapModel : MapModel { #region constructor - /// - /// Initializes a new instance of the class. - /// - /// list of places - /// id of the campus + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. + /// list of places. + /// id of the campus. public CampusMapModel(List placeList, string campusId) { this.CampusId = campusId; @@ -30,6 +29,8 @@ namespace CampusAppWP8.Model.Campusmap this.IsReady = true; } + /// Initializes a new instance of the CampusMapModel class. + /// Stubbfel, 14.10.2013. public CampusMapModel() { } @@ -38,18 +39,17 @@ namespace CampusAppWP8.Model.Campusmap #region property - /// - /// Gets or sets the campusId - /// + /// Gets or sets the campusId. + /// The identifier of the campus. public string CampusId { get; protected set; } #endregion #region method - /// Loads the spatial./. - /// Stubbfel, 19.08.2013. - /// list of places + /// Loads the spatial./. + /// Stubbfel, 14.10.2013. + /// protected override void LoadSpatials(List placeList) { List campusPlaces = new List(); diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/ClickAblePlacePinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/ClickAblePlacePinModel.cs index 8267acd1..9fc74d80 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/ClickAblePlacePinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/ClickAblePlacePinModel.cs @@ -1,42 +1,39 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 26.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the click able place pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using System.Collections.Generic; using CampusAppWP8.Model.GeoDb; - /// - /// abstract class for click abel bins - /// + /// abstract class for click abel bins. + /// Stubbfel, 14.10.2013. + /// public abstract class ClickAblePlacePinModel : MapPinModel { #region property - /// - /// Gets or sets Callback Function, to show place information of the Pin - /// + /// Gets or sets Callback Function, to show place information of the Pin. + /// The call back. public MapModel.MapInfos CallBack { get; set; } - /// - /// Gets or sets place which are associative with this pin - /// + /// Gets or sets place which are associative with this pin. + /// The associated places. public List AssocPlaces { get; set; } #endregion #region Method - /// - /// Show Information of this pin places - /// - /// sender of the Event - /// MouseButtonEvent Arguments + /// Show Information of this pin places. + /// Stubbfel, 14.10.2013. + /// sender of the Event. + /// MouseButtonEvent Arguments. public void ShowInfo(object sender, System.Windows.Input.MouseButtonEventArgs e) { this.CallBack(this.AssocPlaces); diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs index ab11ad7d..78d17ad9 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CurrentPositionPinModel.cs @@ -1,24 +1,25 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 27.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the current position pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using System.Windows; using CampusAppWP8.Resources; - /// Current position pin model. - /// Stubbfel, 27.08.2013. + /// Current position pin model. + /// Stubbfel, 27.08.2013. + /// public class CurrentPositionPinModel : MapPinModel { #region Constructor - /// Initializes a new instance of the CurrentPositionPinModel class. - /// Stubbfel, 27.08.2013. + /// Initializes a new instance of the CurrentPositionPinModel class. + /// Stubbfel, 27.08.2013. public CurrentPositionPinModel() { this.ImageSource = Icons.CurrentPosition; @@ -26,7 +27,7 @@ namespace CampusAppWP8.Model.Campusmap this.ImageHeight = 60; this.PinImageOffsetX = -25; this.PinImageOffsetY = -34; - this.Tag = MapPinModel.CurrendPositionPlacePinString; + this.Tag = MapPinModel.CurrentPositionPlacePinString; this.ZIndex = 3; } diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/HiddenPinPlaceModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/HiddenPinPlaceModel.cs index e8343a76..57290f3a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/HiddenPinPlaceModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/HiddenPinPlaceModel.cs @@ -1,19 +1,22 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// fiedlchr -// 13.08.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the hidden pin place model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { - /// Hidden pin place model. - /// Stubbfel, 27.08.2013. + /// Hidden pin place model. + /// Stubbfel, 27.08.2013. + /// public class HiddenPinPlaceModel : MapPinModel { /// /// Initializes a new instance of the class. /// + /// Stubbfel, 14.10.2013. public HiddenPinPlaceModel() { this.Tag = MapPinModel.HiddenPlacePinString; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoLabPlacePinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoLabPlacePinModel.cs index da79014f..2d63a436 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoLabPlacePinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoLabPlacePinModel.cs @@ -1,25 +1,24 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 27.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the information lab place pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using CampusAppWP8.Resources; - /// Search pin place model. - /// Stubbfel, 27.08.2013. + /// Search pin place model. + /// Stubbfel, 27.08.2013. + /// public class InfoLabPlacePinModel : InfoPlacePinModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// Stubbfel, 27.08.2013. + /// Initializes a new instance of the class. + /// Stubbfel, 27.08.2013. public InfoLabPlacePinModel() { this.ImageSource = Icons.PlaceLab; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceAccessPinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceAccessPinModel.cs index 2b89ddbd..0c5e5d2e 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceAccessPinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceAccessPinModel.cs @@ -1,25 +1,24 @@ //----------------------------------------------------------------------- -// -// Company copyright tag. +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 27.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the information place access pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using CampusAppWP8.Resources; - /// Search pin place model. - /// Stubbfel, 27.08.2013. + /// Search pin place model. + /// Stubbfel, 27.08.2013. + /// public class InfoPlaceAccessPinModel : InfoPlacePinModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// Stubbfel, 27.08.2013. + /// Initializes a new instance of the class. + /// Stubbfel, 27.08.2013. public InfoPlaceAccessPinModel() { this.ImageSource = Icons.PlaceInfoAccess; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlacePinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlacePinModel.cs index 70ca24f4..1111da33 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlacePinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlacePinModel.cs @@ -1,25 +1,24 @@ //----------------------------------------------------------------------- // -// BTU/IIT +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 27.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the information place pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using CampusAppWP8.Resources; - /// Search pin place model. - /// Stubbfel, 27.08.2013. + /// Search pin place model. + /// Stubbfel, 27.08.2013. + /// public class InfoPlacePinModel : ClickAblePlacePinModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// Stubbfel, 27.08.2013. + /// Initializes a new instance of the class. + /// Stubbfel, 27.08.2013. public InfoPlacePinModel() { this.ImageSource = Icons.PlaceInfo; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceWCPinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceWCPinModel.cs index 223f429f..e070250f 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceWCPinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/InfoPlaceWCPinModel.cs @@ -1,25 +1,24 @@ //----------------------------------------------------------------------- -// -// Company copyright tag. +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 27.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the information place wc pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using CampusAppWP8.Resources; - /// Search pin place model. - /// Stubbfel, 27.08.2013. + /// Search pin place model. + /// Stubbfel, 27.08.2013. + /// public class InfoPlaceWCPinModel : InfoPlacePinModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// Stubbfel, 27.08.2013. + /// Initializes a new instance of the InfoPlaceWCPinModel class. + /// Stubbfel, 14.10.2013. public InfoPlaceWCPinModel() { this.ImageSource = Icons.PlaceInfoWc; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs index f97360ae..5e105c5d 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 24.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the map model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using System; @@ -15,25 +16,22 @@ namespace CampusAppWP8.Model.Campusmap using System.Windows.Media.Imaging; using CampusAppWP8.Model.GeoDb; - /// - /// This Class manage the properties of a Map - /// + /// This Class manage the properties of a Map. + /// Stubbfel, 14.10.2013. public class MapModel { #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public MapModel() { this.IsReady = false; } - /// - /// Initializes a new instance of the class. - /// - /// list of places + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. + /// list of places. public MapModel(List placeList) { this.IsReady = false; @@ -45,77 +43,63 @@ namespace CampusAppWP8.Model.Campusmap #region Events - /// - /// Delegate for MapInfo - /// - /// list of places + /// Delegate for MapInfo. + /// Stubbfel, 14.10.2013. + /// list of places. public delegate void MapInfos(List places); - /// - /// Event ShowMapInfo - /// + /// Event ShowMapInfo. public event MapInfos ShowMapInfos = null; #endregion #region Property - /// - /// Gets or sets a value indicating whether the map is ready or not - /// + /// Gets or sets a value indicating whether the map is ready or not. + /// true if this object is ready, false if not. public bool IsReady { get; protected set; } - /// - /// Gets or sets the ImageSource of the map - /// + /// Gets or sets the ImageSource of the map. + /// The image source. public string ImageSource { get; set; } - /// - /// Gets or sets the ImageWidth of the map - /// + /// Gets or sets the ImageWidth of the map. + /// The width of the image. public double ImageWidth { get; set; } - /// - /// Gets or sets the ImageHeight of the map - /// + /// Gets or sets the ImageHeight of the map. + /// The height of the image. public double ImageHeight { get; set; } - /// - /// Gets or sets the ImageOffsetX of the map - /// + /// Gets or sets the ImageOffsetX of the map. + /// The map image offset x coordinate. public double MapImageOffsetX { get; set; } - /// - /// Gets or sets the ImageOffsetY of the map - /// + /// Gets or sets the ImageOffsetY of the map. + /// The map image offset y coordinate. public double MapImageOffsetY { get; set; } - /// - /// Gets or sets the GeoOffsetX of the map - /// + /// Gets or sets the GeoOffsetX of the map. + /// The geo offset x coordinate. public double GeoOffsetX { get; set; } - /// - /// Gets or sets the GeoOffsetY of the map - /// + /// Gets or sets the GeoOffsetY of the map. + /// The geo offset y coordinate. public double GeoOffsetY { get; set; } - /// - /// Gets or sets the Scale (to pixel) of the map - /// + /// Gets or sets the Scale (to pixel) of the map. + /// The scale x coordinate. public double ScaleX { get; set; } - /// - /// Gets or sets the Scale (to pixel) of the map - /// + /// Gets or sets the Scale (to pixel) of the map. + /// The scale y coordinate. public double ScaleY { get; set; } - /// - /// Gets or sets the reference point - /// + /// Gets or sets the reference point. + /// The reference point. public Point RefPoint { get; set; } - /// Gets or sets the spatial of the map. - /// The spatial. + /// Gets or sets the spatial of the map. + /// The spatial. public SpsModel Spatial { get; set; } #endregion @@ -124,23 +108,20 @@ namespace CampusAppWP8.Model.Campusmap #region public - /// - /// Method calculate the coordinates of ScrollToOffsets point - /// - /// input point - /// point (in pixel) + /// Method calculate the coordinates of ScrollToOffsets point. + /// Stubbfel, 14.10.2013. + /// input point. + /// point (in pixel) public Point GetScrollPoint(Point point) { return this.GetScrollPoint(point.X, point.Y); } - /// - /// Method calculate the coordinates of ScrollToOffsets point - /// - /// the input-point will be shown in the center - /// x - coordinate - /// y - coordinate - /// point (in pixel) + /// Method calculate the coordinates of ScrollToOffsets point. + /// the input-point will be shown in the center. + /// x - coordinate. + /// y - coordinate. + /// point (in pixel) public Point GetScrollPoint(double x, double y) { x = this.RefPoint.X + this.MapImageOffsetX + x; @@ -149,13 +130,13 @@ namespace CampusAppWP8.Model.Campusmap return new Point(x, y); } - /// Method create in image, which can show at a certain position. - /// Stubbfel, 27.08.2013. - /// the x- coordinate. - /// the y-coordinate. - /// The type. - /// list of places - /// image of the pin. + /// Method create in image, which can show at a certain position. + /// Stubbfel, 27.08.2013. + /// the x- coordinate. + /// the y-coordinate. + /// The type. + /// (Optional) list of places. + /// image of the pin. public Image AddPin(double x, double y, MapPinModel.PinType type, List places = null) { Point position = new Point(x, y); @@ -166,12 +147,12 @@ namespace CampusAppWP8.Model.Campusmap /// Method create in image, which can show at a certain position depend of the /// /// - /// Stubbfel, 27.08.2013. - /// the x-coordinate. - /// the y-coordinate. - /// The type. - /// list of places - /// image of the pin. + /// Stubbfel, 27.08.2013. + /// the x-coordinate. + /// the y-coordinate. + /// The type. + /// (Optional) list of places. + /// image of the pin. public Image AddPinFromRefPoint(double x, double y, MapPinModel.PinType type, List places = null) { Point position = new Point(this.RefPoint.X + x, this.RefPoint.Y - y); @@ -182,22 +163,22 @@ namespace CampusAppWP8.Model.Campusmap /// Method create in image, which can show at a certain position depend of the /// /// - /// Stubbfel, 27.08.2013. - /// input point. - /// The type. - /// list of places - /// image of the pin. + /// Stubbfel, 27.08.2013. + /// input point. + /// The type. + /// (Optional) list of places. + /// image of the pin. public Image AddPinFromRefPoint(Point position, MapPinModel.PinType type, List places = null) { return this.AddPinFromRefPoint(position.X, position.Y, type, places); } - /// Method create in image, which can show at a certain position. - /// Stubbfel, 27.08.2013. - /// input point. - /// The type. - /// list of places - /// image of the pin. + /// Method create in image, which can show at a certain position. + /// Stubbfel, 27.08.2013. + /// input point. + /// The type. + /// (Optional) list of places. + /// image of the pin. public Image AddPin(Point position, MapPinModel.PinType type, List places = null) { Image pinImg = new Image(); @@ -216,43 +197,40 @@ namespace CampusAppWP8.Model.Campusmap return pinImg; } - /// Convert a coordinates to coordinates which address pixels. - /// Stubbfel, 27.08.2013. - /// the x-coordinate. - /// the y-coordinate. - /// Point in pixel-size. + /// Convert a coordinates to coordinates which address pixels. + /// Stubbfel, 27.08.2013. + /// the x-coordinate. + /// the y-coordinate. + /// Point in pixel-size. public Point ConverToPixelPoint(double x, double y) { Point p = new Point { X = this.ScaleX * x, Y = this.ScaleY * y }; return p; } - /// - /// Convert a coordinates to coordinates which address pixels - /// - /// not scaled pointd - /// Point in pixel-size + /// Convert a coordinates to coordinates which address pixels. + /// Stubbfel, 14.10.2013. + /// not scaled point. + /// Point in pixel-size. public Point ConverToPixelPoint(Point point) { return this.ConverToPixelPoint(point.X, point.Y); } - /// - /// Convert a coordinates to coordinates which address mapPoint - /// - /// the x-coordinate - /// the y-coordinate - /// Point in pixel-size + /// Convert a coordinates to coordinates which address mapPoint. + /// Stubbfel, 14.10.2013. + /// the x-coordinate. + /// the y-coordinate. + /// Point in pixel-size. public Point ConverToMapPoint(double x, double y) { return new Point { X = x - this.GeoOffsetX, Y = y - this.GeoOffsetY }; } - /// - /// Convert a coordinates to coordinates which address mapPoint - /// - /// not scaled point - /// Point in pixel-size + /// Convert a coordinates to coordinates which address mapPoint. + /// Stubbfel, 14.10.2013. + /// not scaled point. + /// Point in pixel-size. public Point ConverToMapPoint(Point point) { return this.ConverToMapPoint(point.X, point.Y); @@ -262,9 +240,9 @@ namespace CampusAppWP8.Model.Campusmap #region protected - /// Loads the spatial./ - /// Stubbfel, 19.08.2013. - /// list of places + /// Loads the spatial object + /// Stubbfel, 19.08.2013. + /// list of places. protected virtual void LoadSpatials(List placeList) { this.Spatial = new SpsModel(); @@ -275,12 +253,12 @@ namespace CampusAppWP8.Model.Campusmap #region private - /// Creates a pin. - /// Stubbfel, 27.08.2013. - /// The type. - /// list of places - /// image of the pin - /// The new pin. + /// Creates a pin. + /// Stubbfel, 27.08.2013. + /// The type. + /// list of places. + /// image of the pin. + /// The new pin. private MapPinModel CreatePin(MapPinModel.PinType type, List places, Image pinImg) { MapPinModel pin; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapPinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapPinModel.cs index 79a8cb43..7067bd7d 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapPinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapPinModel.cs @@ -1,67 +1,56 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 24.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 14.10.2013 +// Implements the map pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using System.Windows; using System.Windows.Input; using CampusAppWP8.Resources; - /// - /// This Class manage the properties of a MapPin - /// + /// This Class manage the properties of a MapPin. + /// Stubbfel, 14.10.2013. public abstract class MapPinModel { #region Member - /// - /// String for info pins - /// + /// String for info pins. private static string infoPlacePinString = MapPinModel.PinTypeToString(PinType.InfoPlace); - /// - /// String for info pins - /// + /// String for info pins. private static string infoLabPlacePinString = MapPinModel.PinTypeToString(PinType.InfoLabPlace); - /// - /// String for hidden pins - /// + /// String for hidden pins. private static string hiddenPlacePinString = MapPinModel.PinTypeToString(PinType.Hidden); - /// - /// String for search pins - /// + /// String for search pins. private static string searchPlacePinString = MapPinModel.PinTypeToString(PinType.SearchPlace); - /// - /// String for current position pins - /// - private static string currendPositionPlacePinString = MapPinModel.PinTypeToString(PinType.CurrentPosition); + /// String for current position pins. + private static string currentPositionPlacePinString = MapPinModel.PinTypeToString(PinType.CurrentPosition); + /// The information wc place pin string. private static string infoWcPlacePinString = MapPinModel.PinTypeToString(PinType.InfoWcPlace); + /// The information access place pin string. private static string infoAccesPlacePinString = MapPinModel.PinTypeToString(PinType.InfoAccesPlace); + /// The information red place pin string. private static string infoRedPlacePinString = MapPinModel.PinTypeToString(PinType.InfoRedPlace); - - - /// - /// Variable of the actual position of the pin - /// + /// Variable of the actual position of the pin. private Point position; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + + /// Initializes a new instance of the class. + /// Stubbfel, 14.10.2013. public MapPinModel() { } @@ -69,8 +58,9 @@ namespace CampusAppWP8.Model.Campusmap #endregion #region enums - /// Values that represent PinType. - /// Stubbfel, 27.08.2013. + + /// Values that represent PinType. + /// Stubbfel, 27.08.2013. public enum PinType { /// An enum constant representing the hidden option. @@ -84,100 +74,105 @@ namespace CampusAppWP8.Model.Campusmap /// An enum constant representing the info place option. InfoPlace = 3, + + /// An enum constant representing the information lab place option. InfoLabPlace = 4, + + /// An enum constant representing the information wc place option. InfoWcPlace = 5, + + /// An enum constant representing the information red place option. InfoRedPlace = 6, + + /// An enum constant representing the information access place option. InfoAccesPlace = 7 } #endregion #region Property + /// Gets the information red place pin string. + /// The information red place pin string. public static string InfoRedPlacePinString { get { return MapPinModel.infoRedPlacePinString; } } + /// Gets the information access place pin string. + /// The information access place pin string. public static string InfoAccesPlacePinString { get { return MapPinModel.infoAccesPlacePinString; } } + /// Gets the information wc place pin string. + /// The information wc place pin string. public static string InfoWcPlacePinString { get { return MapPinModel.infoWcPlacePinString; } } - /// - /// Gets the string of current position pins - /// - public static string CurrendPositionPlacePinString + /// Gets the string of current position pins. + /// The current position place pin string. + public static string CurrentPositionPlacePinString { - get { return MapPinModel.currendPositionPlacePinString; } + get { return MapPinModel.currentPositionPlacePinString; } } - /// - /// Gets the string of search pins - /// + /// Gets the string of search pins. + /// The search place pin string. public static string SearchPlacePinString { get { return MapPinModel.searchPlacePinString; } } - /// - /// Gets the string of hidden pins - /// + /// Gets the string of hidden pins. + /// The hidden place pin string. public static string HiddenPlacePinString { get { return MapPinModel.hiddenPlacePinString; } } - /// - /// Gets the string of info pins - /// + /// Gets the string of info pins. + /// The information place pin string. public static string InfoPlacePinString { get { return MapPinModel.infoPlacePinString; } } + /// Gets the information lab place pin string. + /// The information lab place pin string. public static string InfoLabPlacePinString { get { return MapPinModel.infoLabPlacePinString; } } - /// - /// Gets or sets the ImageSource of the pin - /// + /// Gets or sets the ImageSource of the pin. + /// The image source. public string ImageSource { get; set; } - /// - /// Gets or sets the ImageWidth of the pin - /// + /// Gets or sets the ImageWidth of the pin. + /// The width of the image. public double ImageWidth { get; set; } - /// - /// Gets or sets the ImageHeight of the pin - /// + /// Gets or sets the ImageHeight of the pin. + /// The height of the image. public double ImageHeight { get; set; } - /// - /// Gets or sets the ZIndex of the pin - /// + /// Gets or sets the ZIndex of the pin. + /// The z coordinate index. public int ZIndex { get; set; } - /// - /// Gets or sets the ImageOffsetX of the pin - /// + /// Gets or sets the ImageOffsetX of the pin. + /// The pin image offset x coordinate. public double PinImageOffsetX { get; set; } - /// - /// Gets or sets the ImageOffsetY of the pin - /// + /// Gets or sets the ImageOffsetY of the pin. + /// The pin image offset y coordinate. public double PinImageOffsetY { get; set; } - /// - /// Gets or sets position of the pin - /// + /// Gets or sets position of the pin. + /// The position. public Point Position { get @@ -213,20 +208,18 @@ namespace CampusAppWP8.Model.Campusmap } } - /// - /// Gets or sets the tag of the pin - /// + /// Gets or sets the tag of the pin. + /// The tag. public object Tag { get; set; } #endregion #region Method - /// - /// Method convert PinType to a string - /// - /// type of the Pin - /// PinType as string + /// Method convert PinType to a string. + /// Stubbfel, 14.10.2013. + /// type of the Pin. + /// PinType as string. public static string PinTypeToString(PinType type) { string result = null; diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs index aec1cd5b..252be325 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/SearchPlacePinModel.cs @@ -1,17 +1,18 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 27.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 14.10.2013 +// Implements the search place pin model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Campusmap { using CampusAppWP8.Resources; - /// Search pin place model. - /// Stubbfel, 27.08.2013. + /// Search pin place model. + /// Stubbfel, 27.08.2013. + /// public class SearchPlacePinModel : ClickAblePlacePinModel { #region Constructor @@ -19,7 +20,7 @@ namespace CampusAppWP8.Model.Campusmap /// /// Initializes a new instance of the class. /// - /// Stubbfel, 27.08.2013. + /// Stubbfel, 27.08.2013. public SearchPlacePinModel() { this.ImageSource = Icons.SearchPlace; diff --git a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListWp8Model.cs index 0e112c99..c7c4c200 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListWp8Model.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamListWp8Model.cs @@ -1,16 +1,18 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.09.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the exam list wp 8 model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Exams { using System.Xml.Serialization; - /// Exam list model. - /// Stubbfel, 02.09.2013. + /// Exam list model. + /// Stubbfel, 02.09.2013. + /// [XmlRoot("links")] public class ExamListWp8Model : CampusAppWPortalLib8.Model.Exams.ExamListModel { diff --git a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamWp8Model.cs index f0d89d4e..b48bb444 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Exams/ExamWp8Model.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Exams/ExamWp8Model.cs @@ -1,22 +1,24 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.09.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the exam wp 8 model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Exams { using CampusAppWP8.Utility; - /// Exam model. - /// Stubbfel, 02.09.2013. + /// Exam model. + /// Stubbfel, 02.09.2013. + /// public class ExamWp8Model : CampusAppWPortalLib8.Model.Exams.ExamModel { #region Property - /// Gets the caption. - /// The caption. + /// Gets the caption of the exam. + /// The caption. public string Caption { get diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingLayerModel.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingLayerModel.cs index 32307073..d55db74c 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingLayerModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingLayerModel.cs @@ -1,28 +1,28 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 23.09.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the campus building layer model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.GeoDb { using System.Collections.Generic; using CampusAppWP8.Resources; - /// - /// Class is model for buildings of a campus - /// + /// Class is model for buildings of a campus. + /// Stubbfel, 15.10.2013. public class CampusBuildingLayerModel { #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// id of the layer - /// list of place which can be room of the layer + /// Stubbfel, 15.10.2013. + /// id of the layer. + /// list of place which can be room of the layer. public CampusBuildingLayerModel(string layerId, List places) { this.LayerId = layerId; @@ -42,14 +42,12 @@ namespace CampusAppWP8.Model.GeoDb #region property - /// - /// Gets or sets Rooms - /// + /// Gets or sets Rooms. + /// The rooms. public SpsModel Rooms { get; set; } - /// - /// Gets or sets LayerId - /// + /// Gets or sets LayerId. + /// The identifier of the layer. public string LayerId { get; set; } #endregion diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingModel.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingModel.cs index cbee3c67..05da5f80 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/CampusBuildingModel.cs @@ -1,28 +1,28 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 23.09.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the campus building model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.GeoDb { using System.Collections.Generic; using CampusAppWP8.Resources; - /// - /// Class is model for buildings of a campus - /// + /// Class is model for buildings of a campus. + /// Stubbfel, 15.10.2013. public class CampusBuildingModel { #region constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// id of the building - /// list of place which can be room of the buildings + /// Stubbfel, 15.10.2013. + /// id of the building. + /// list of place which can be room of the buildings. public CampusBuildingModel(string buildingId, List places) { this.Layers = new Dictionary(); @@ -57,25 +57,22 @@ namespace CampusAppWP8.Model.GeoDb #region Property - /// - /// Gets the Layer of the building - /// + /// Gets the Layer of the building. + /// The layers. public Dictionary Layers { get; private set; } - /// - /// Gets or sets the Building PlaceModel - /// + /// Gets or sets the Building PlaceModel. + /// The building. public PlaceModel Building { get; set; } #endregion #region method - /// - /// Method gets a place by their placeID - /// - /// the placeId of the place - /// The place by identifier. + /// Method gets a place by their placeID. + /// Stubbfel, 15.10.2013. + /// the placeId of the place. + /// The place by identifier. public PlaceModel GetPlaceById(string placeID) { PlaceModel result = null; @@ -91,6 +88,10 @@ namespace CampusAppWP8.Model.GeoDb return result; } + /// Gets layer key. + /// Stubbfel, 15.10.2013. + /// Identifier for the place. + /// The layer key. public string GetLayerKey(string placeId) { PlaceModel tmpPlace = null; diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs index d504afd3..4882a456 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceInformation.cs @@ -1,28 +1,30 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 19.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the place information class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.GeoDb { using System; using System.Xml.Serialization; - /// Information about the place. - /// Stubbfel, 19.08.2013. + /// Information about the place. + /// Stubbfel, 19.08.2013. + /// public class PlaceInformation : IEquatable { #region Property - /// Gets or sets the name of the information. - /// The name of the information. + /// Gets or sets the name of the information. + /// The name of the information. [XmlAttribute("placeInformationName")] public string InformationName { get; set; } - /// Gets or sets the information value. - /// The information value. + /// Gets or sets the information value. + /// The information value. [XmlText] public string InformationValue { get; set; } @@ -30,10 +32,10 @@ namespace CampusAppWP8.Model.GeoDb #region Method - /// 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. + /// 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)) diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs index 03e8661d..f6b29595 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceModel.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the place model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.GeoDb { using System; @@ -18,33 +18,30 @@ namespace CampusAppWP8.Model.GeoDb using CampusAppWP8.Resources; using CampusAppWPortalLib8.Utility; - /// - /// Model for a place of the SPSService - /// + /// Model for a place of the SPSService. + /// Stubbfel, 15.10.2013. + /// public class PlaceModel : IEquatable { #region Property - /// - /// Gets or sets the placeId - /// + /// Gets or sets the placeId. + /// The identifier of the place. [XmlAttribute("id")] public string PlaceId { get; set; } - /// - /// Gets or sets the id of the "parent" of a place - /// + /// Gets or sets the id of the "parent" of a place. + /// The identifier of the parent. [XmlAttribute("parentId")] public string ParentId { get; set; } - /// - /// Gets or sets the ReferencePoint of a place - /// + /// Gets or sets the ReferencePoint of a place. + /// The reference point. [XmlAttribute("refpoint")] public string RefPoint { get; set; } - /// Gets the geo reference point. - /// The geo reference point. + /// Gets the geo reference point. + /// The geo reference point. public GeoCoordinate GeoRefPoint { get @@ -77,38 +74,39 @@ namespace CampusAppWP8.Model.GeoDb } } - /// Gets or sets the information. - /// The information. + /// Gets or sets the information. + /// The information. [XmlElement("placeInformation")] public ObservableCollection Informations { get; set; } - /// Gets or sets the services. - /// The services. + /// Gets or sets the services. + /// The services. [XmlElement("placeService")] public ObservableCollection Services { get; set; } /// - /// Gets or sets a string, which is the caption of the place (e.g. for contents of UIElements) + /// Gets or sets a string, which is the caption of the place (e.g. for contents of UIElements) /// + /// The caption. public string Caption { get; set; } #endregion #region Method - /// Converts this object to a nfc string. - /// Stubbfel, 21.08.2013. - /// This object as a string. + /// Converts this object to a nfc string. + /// Stubbfel, 21.08.2013. + /// This object as a string. public string ToNfcString() { string nfcStr = "{\n\"url\":\"http://www.tu-cottbus.de/campusapp\",\n\"pid\":\"" + this.PlaceId + "\",\n\"parent\":\"" + this.ParentId + "\"\n}"; 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. + /// 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)) @@ -119,9 +117,9 @@ namespace CampusAppWP8.Model.GeoDb return false; } - /// Adds a place information. - /// Stubbfel, 09.09.2013. - /// The place information. + /// Adds a place information. + /// Stubbfel, 09.09.2013. + /// The place information. public void AddPlaceInformations(List placeInformations) { foreach (PlaceInformation info in placeInformations) @@ -138,9 +136,9 @@ namespace CampusAppWP8.Model.GeoDb } } - /// Adds a place services. - /// Stubbfel, 09.09.2013. - /// The place services. + /// Adds a place services. + /// Stubbfel, 09.09.2013. + /// The place services. public void AddPlaceServices(List placeServices) { foreach (PlaceService service in placeServices) @@ -158,10 +156,10 @@ namespace CampusAppWP8.Model.GeoDb } } - /// Query if 'names' contains information names. - /// Stubbfel, 09.09.2013. - /// The names. - /// true if it succeeds, false if it fails. + /// 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) @@ -185,10 +183,10 @@ namespace CampusAppWP8.Model.GeoDb return true; } - /// Query if 'services' contains service names. - /// Stubbfel, 09.09.2013. - /// The services. - /// true if it succeeds, false if it fails. + /// 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) @@ -212,11 +210,10 @@ namespace CampusAppWP8.Model.GeoDb return true; } - /// - /// Method gets the InformationValue of a certain InformationName - /// - /// string for InformationName - /// value of the information + /// Method gets the InformationValue of a certain InformationName. + /// Stubbfel, 15.10.2013. + /// string for InformationName. + /// value of the information. public string GetInformationsValue(string key) { foreach (PlaceInformation info in this.Informations) diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs index 9f318365..a4d00deb 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceService.cs @@ -1,34 +1,35 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 19.08.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the place service class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.GeoDb { using System; using System.Xml.Serialization; - /// Place service. - /// Stubbfel, 19.08.2013. + /// Place service. + /// Stubbfel, 19.08.2013. + /// public class PlaceService : IEquatable { #region Property - /// Gets or sets the name of the service. - /// The name of the service. + /// Gets or sets the name of the service. + /// The name of the service. [XmlAttribute("placeServiceName")] public string ServiceName { get; set; } - /// Gets or sets the SAP of an service. - /// The sap. + /// Gets or sets the SAP of an service. + /// The sap. [XmlElement("sap")] public string SAP { get; set; } - /// Gets or sets the request for a place. - /// The request. + /// Gets or sets the request for a place. + /// The request. [XmlElement("request")] public string Request { get; set; } @@ -36,8 +37,8 @@ namespace CampusAppWP8.Model.GeoDb #region Method - /// Gets the URL string. - /// The URL string. + /// Gets the URL string. + /// The URL string. public string URLString { get @@ -46,10 +47,10 @@ namespace CampusAppWP8.Model.GeoDb } } - /// 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. + /// 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)) diff --git a/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs b/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs index 4982eeb3..00219adc 100644 --- a/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsModel.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the sps model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.GeoDb { using System.Collections.Generic; @@ -13,16 +13,15 @@ namespace CampusAppWP8.Model.GeoDb using System.Linq; using System.Xml.Serialization; - /// - /// Model for a xml-response of the SPSService - /// + /// Model for a xml-response of the SPSService. + /// Stubbfel, 15.10.2013. [XmlRoot("root")] public class SpsModel { #region Constructor - /// Initializes a new instance of the SpsModel class. - /// Stubbfel, 20.08.2013. + /// Initializes a new instance of the SpsModel class. + /// Stubbfel, 20.08.2013. public SpsModel() { this.HasChanged = false; @@ -33,14 +32,13 @@ namespace CampusAppWP8.Model.GeoDb #region Property - /// - /// Gets or sets a list of places - /// + /// Gets or sets a list of places. + /// The 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. + /// 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 @@ -48,13 +46,13 @@ namespace CampusAppWP8.Model.GeoDb #region Method #region public - - /// Gets places by information. - /// Stubbfel, 19.08.2013. - /// The query. - /// (Optional) the ignore cases. - /// (Optional) name of the information. - /// The places by information. + + /// Gets places by information. + /// Stubbfel, 19.08.2013. + /// The query. + /// (Optional) the ignore cases. + /// (Optional) name of the information. + /// The places by information. public List GetPlacesByInformation(string query, bool ignoreCases = true, List informationNames = null) { string querryStr = string.Empty; @@ -71,9 +69,9 @@ namespace CampusAppWP8.Model.GeoDb return resultplaces; } - /// Adds the places. - /// Stubbfel, 09.09.2013. - /// A list of places. + /// Adds the places. + /// Stubbfel, 09.09.2013. + /// A list of places. public void AddPlaces(List places) { foreach (PlaceModel place in places) @@ -93,9 +91,9 @@ namespace CampusAppWP8.Model.GeoDb this.HasChanged = true; } - /// Creates PID list. - /// Stubbfel, 09.09.2013. - /// The new PID list. + /// Creates PID list. + /// Stubbfel, 09.09.2013. + /// The new PID list. public List CreatePidList() { List pidList = new List(); @@ -107,10 +105,10 @@ namespace CampusAppWP8.Model.GeoDb return pidList; } - /// Gets place by identifier. - /// Stubbfel, 09.09.2013. - /// The identifier. - /// The place by identifier. + /// 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) @@ -124,11 +122,11 @@ namespace CampusAppWP8.Model.GeoDb 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. + /// 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) @@ -143,11 +141,11 @@ namespace CampusAppWP8.Model.GeoDb 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. + /// 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) @@ -162,10 +160,10 @@ namespace CampusAppWP8.Model.GeoDb return true; } - /// Filter by PID. - /// Stubbfel, 11.09.2013. - /// List of pids. - /// filtered list of places. + /// Filter by PID. + /// Stubbfel, 11.09.2013. + /// List of pids. + /// filtered list of places. public List FilterByPid(List pidList) { List fitlerList = new List(); @@ -190,14 +188,13 @@ namespace CampusAppWP8.Model.GeoDb #region private - /// - /// Method check if a certain place matched by query string - /// - /// the Place - /// the Query - /// (Optional) the ignore cases. - /// (Optional) name of the information. - /// true if it match otherwise false + /// Method check if a certain place matched by query string. + /// Stubbfel, 15.10.2013. + /// the Place. + /// the Query. + /// (Optional) the ignore cases. + /// (Optional) name of the information. + /// true if it match otherwise false. private bool IsPlaceQueryMatched(PlaceModel place, string query, bool ignoreCases = true, List informationNames = null) { string queryString = query; diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs index 6afc7a82..62d7e7be 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 18.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture page model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { using System.Runtime.Serialization; @@ -12,79 +13,54 @@ namespace CampusAppWP8.Model.Lecture using CampusAppWP8.Model.Utility; using CampusAppWPortalLib8.Model.Utility; - /// - /// Model for the LecturePage - /// + /// Model for the LecturePage. + /// Stubbfel, 15.10.2013. [DataContract] public class LecturePageModel { #region Members - /// - /// Variable for the courseIndex - /// + /// Variable for the courseIndex. [DataMember] public int selectCourseIndex; - /// - /// Variable for the degreeIndex - /// + /// Variable for the degreeIndex. [DataMember] public int selectDegreeIndex; - /// - /// Variable for the semesterIndex - /// + /// Variable for the semesterIndex. [DataMember] public int selectSemesterIndex; - /// - /// Variable for the fromIndex - /// + /// Variable for the fromIndex. [DataMember] public int selectFromIndex; - /// - /// Variable for the toIndex - /// + /// Variable for the toIndex. [DataMember] public int selectToIndex; - /// - /// List for the courses of the BTU - /// - /// - /// need to be extend to full list - /// + /// List for the courses of the BTU. private CourseListPickerItemListWp8Model courseList; - /// - /// List of the degrees - /// + /// List of the degrees. private ListPickerItemListModel degreeList; - /// - /// List of the semester - /// + /// List of the semester. private ListPickerItemListModel semesterList; - /// - /// List for the number of semester (from) - /// + /// List for the number of semester (from) private ListPickerItemListModel fromNumberList; - /// - /// List for the number of semester (to) - /// + /// List for the number of semester (to) private ListPickerItemListModel toNumberList; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LecturePageModel() { } @@ -92,23 +68,19 @@ namespace CampusAppWP8.Model.Lecture #region events - /// - /// Delegate of the OnIO callback function. - /// + /// Delegate of the OnIO callback function. + /// Stubbfel, 15.10.2013. public delegate void OnIO(); - /// - /// Callback pointer, called after loading. - /// + /// Callback pointer, called after loading. public event OnIO OnLoaded = null; #endregion #region Proberty - /// - /// Gets or sets the selected course index - /// + /// Gets or sets the selected course index. + /// The select course index. public int SelectCourseIndex { get @@ -125,9 +97,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets or sets the selected degree index - /// + /// Gets or sets the selected degree index. + /// The select degree index. public int SelectDegreeIndex { get @@ -144,9 +115,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets or sets the selected semester-index - /// + /// Gets or sets the selected semester-index. + /// The select semester index. public int SelectSemesterIndex { get @@ -163,9 +133,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets or sets the selected from-index - /// + /// Gets or sets the selected from-index. + /// The select from index. public int SelectFromIndex { get @@ -182,9 +151,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets or sets the selected to-index - /// + /// Gets or sets the selected to-index. + /// The select to index. public int SelectToIndex { get @@ -201,9 +169,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets List for the courses of the BTU - /// + /// Gets List for the courses of the BTU. + /// A List of courses. public ListPickerItemListModel CourseList { get @@ -212,9 +179,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets List of the degrees - /// + /// Gets List of the degrees. + /// A List of degrees. public ListPickerItemListModel DegreeList { get @@ -223,9 +189,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets List of the semester - /// + /// Gets List of the semester. + /// A List of semesters. public ListPickerItemListModel SemesterList { get @@ -234,9 +199,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets List for the number of semester - /// + /// Gets List for the number of semester (from). + /// A List of from numbers. public ListPickerItemListModel FromNumberList { get @@ -245,9 +209,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets the NumberList - /// + /// Gets List for the number of semester (to). + /// A List of to numbers. public ListPickerItemListModel ToNumberList { get @@ -261,9 +224,8 @@ namespace CampusAppWP8.Model.Lecture #region public - /// - /// Load all ListPickerLists - /// + /// Load all ListPickerLists. + /// Stubbfel, 15.10.2013. public void LoadLists() { this.courseList = new CourseListPickerItemListWp8Model(); @@ -271,9 +233,8 @@ namespace CampusAppWP8.Model.Lecture this.courseList.LoadCourseList(); } - /// - /// Load the NumberList - /// + /// Load the NumberList. + /// Stubbfel, 15.10.2013. public void LoadFromNumberList() { string selectValue = null; @@ -286,9 +247,8 @@ namespace CampusAppWP8.Model.Lecture this.SelectFromIndex = this.fromNumberList.GetIndexOrDefault(selectValue); } - /// - /// Load the NumberList - /// + /// Load the NumberList. + /// Stubbfel, 15.10.2013. public void LoadToNumberList() { string selectValue = null; @@ -305,8 +265,8 @@ namespace CampusAppWP8.Model.Lecture #region private - /// Course list is ready. - /// Stubbfel, 10.09.2013. + /// Course list is ready. + /// Stubbfel, 10.09.2013. private void CourseListIsReady() { this.degreeList = new DegreeListPickerItemListModel(); @@ -324,12 +284,11 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Method create a NumberList - /// - /// startValue of the list - /// endValue of the list - /// return list + /// Method create a NumberList. + /// Stubbfel, 15.10.2013. + /// startValue of the list. + /// endValue of the list. + /// return list. private ListPickerItemListModel CreateNumberList(int startvalue, int endvalue) { ListPickerItemListModel list = new ListPickerItemListModel(); diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8Activity.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8Activity.cs index a0a3eb0e..cef0c89e 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8Activity.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8Activity.cs @@ -1,33 +1,34 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 13.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture wp 8 activity class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { + using System.Xml.Serialization; using CampusAppWP8.Resources; using CampusAppWP8.Utility; - using CampusAppWPortalLib8.Model.Lecture; - using System.Xml.Serialization; + using CampusAppWPortalLib8.Model.Lecture; - /// - /// Model for a Activity - /// + /// Model for a Activity. + /// Stubbfel, 15.10.2013. + /// public class LectureWp8Activity : LectureActivity { #region Members - /// URL of the icon. + /// URL of the icon. private string iconUrl; #endregion #region Proberty - /// Gets URL of the icon. - /// The icon URL. + /// Gets URL of the icon. + /// The icon URL. public string IconUrl { get @@ -37,9 +38,8 @@ namespace CampusAppWP8.Model.Lecture } } - /// - /// Gets or sets the topic of the Lecture - /// + /// Gets or sets the topic of the Lecture. + /// The topic. [XmlElement("lehrinhalt")] public new string Topic { @@ -62,8 +62,8 @@ namespace CampusAppWP8.Model.Lecture #region private - /// Creates icon URL. - /// Stubbfel, 12.09.2013. + /// Creates icon URL. + /// Stubbfel, 12.09.2013. private void CreateIconUrl() { string typeStr = this.Type; diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8List.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8List.cs index a2ca637d..92fa8c2e 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8List.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureWp8List.cs @@ -1,28 +1,28 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture wp 8 list class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { using System.Linq; using System.Xml.Serialization; - /// - /// Model for a List of LectureActivity - /// + /// Model for a List of LectureActivity. + /// Stubbfel, 15.10.2013. + /// [XmlRoot("lsf_auszug")] public class LectureWp8List : CampusAppWPortalLib8.Model.Lecture.LectureList { #region Methods - /// - /// Method return a certain activity - /// - /// id of the activity - /// the activity (FirstOrDefault) + /// Method return a certain activity. + /// Stubbfel, 15.10.2013. + /// id of the activity. + /// the activity (FirstOrDefault) public new LectureWp8Activity GetActivity(int id) { LectureWp8Activity activity = this.Activities.Where(p => p.Id == id).FirstOrDefault(); diff --git a/CampusAppWP8/CampusAppWP8/Model/MainModel.cs b/CampusAppWP8/CampusAppWP8/Model/MainModel.cs index 74abbcac..cbbc9b8a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/MainModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/MainModel.cs @@ -1,10 +1,11 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 05.07.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the main model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model { using System; @@ -13,30 +14,27 @@ namespace CampusAppWP8.Model using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model; - /// - /// Base model io handling class. - /// - /// model type + /// Base model io handling class. + /// fiedlchr, 15.10.2013. + /// public abstract class MainModel : AbstractMainModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// Model IO type - /// name of the file - /// url of the feed + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. + /// Model IO type. + /// name of the file. + /// url of the feed. public MainModel(ModelType modelType, string fileName, string url) : base(modelType, fileName, url) { } - /// - /// Initializes a new instance of the class. - /// - /// Model IO type - /// name of the file or the url of the feed + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. + /// Model IO type. + /// name of the file or the url of the feed. public MainModel(ModelType modelType, string sourceName) : base(modelType, sourceName) { @@ -46,31 +44,25 @@ namespace CampusAppWP8.Model #region Events - /// - /// Delegate of the IsFileUpToDate callback function. - /// - /// data model - /// info of the file - /// true, is file is up to date + /// Delegate of the IsFileUpToDate callback function. + /// fiedlchr, 15.10.2013. + /// data model. + /// info of the file. + /// true, is file is up to date. public delegate bool IsFileUpToDate(T model, FileInfo fileInfo); - /// - /// Callback pointer, for checking if file is up to date at loading. - /// + /// Callback pointer, for checking if file is up to date at loading. public event IsFileUpToDate IsFileUpToDateOnLoad = null; - /// - /// Callback pointer, for checking if file is up to date at saving. - /// + /// Callback pointer, for checking if file is up to date at saving. public event IsFileUpToDate IsFileUpToDateOnSave = null; #endregion #region property - /// - /// Gets or sets the file - /// + /// Gets the file. + /// The file. public new CampusAppWP8.Utility.File File { get @@ -84,9 +76,8 @@ namespace CampusAppWP8.Model } } - /// - /// Gets or sets the api - /// + /// Gets the api. + /// The API. public new HttpRequest Api { get @@ -105,36 +96,32 @@ namespace CampusAppWP8.Model #region protected - /// - /// Method overrides the base CheckLoadFileIsNotUpToDate Method - /// - /// true if it is not up-to-date, otherwise false + /// Method overrides the base CheckLoadFileIsNotUpToDate Method. + /// fiedlchr, 15.10.2013. + /// true if it is not up-to-date, otherwise false. protected override bool CheckLoadFileIsNotUpToDate() { return this.CheckIsNotUpToDate(this.IsFileUpToDateOnLoad); } - /// - /// Method overrides the base CheckSaveFileIsNotUpToDate Method - /// - /// true if it is not up-to-date, otherwise false + /// Method overrides the base CheckSaveFileIsNotUpToDate Method. + /// fiedlchr, 15.10.2013. + /// true if it is not up-to-date, otherwise false. protected override bool CheckSaveFileIsNotUpToDate() { return this.CheckIsNotUpToDate(this.IsFileUpToDateOnSave); } - /// - /// Method overrides the base SendHttpGet Method - /// - /// the url + /// Method overrides the base SendHttpGet Method. + /// fiedlchr, 15.10.2013. + /// the url. protected override void SendHttpGet(Uri url) { ((HttpRequest)this.Api).HttpGet(url, this.OnLoadDataComplete); } - /// - /// Initializes the file object. - /// + /// Initializes the file object. + /// fiedlchr, 15.10.2013. protected override void InitFile() { if ((this.IsFile() == true) @@ -144,9 +131,8 @@ namespace CampusAppWP8.Model } } - /// - /// Initializes the web object. - /// + /// Initializes the web object. + /// fiedlchr, 15.10.2013. protected override void InitHttpApi() { if ((this.IsHttpApi() == true) @@ -156,9 +142,10 @@ namespace CampusAppWP8.Model } } - /// Check if model or file is not up to date. - /// The check function. - /// true if model or file is not up to date, false if it is. + /// Check if model or file is not up to date. + /// fiedlchr, 15.10.2013. + /// The check function. + /// true if model or file is not up to date, false if it is. protected override bool CheckIsNotUpToDate(object checkFunc) { bool retValue = false; @@ -189,11 +176,10 @@ namespace CampusAppWP8.Model #region private - /// - /// Is called after the loading from web is complete. - /// - /// sending object - /// event args + /// Is called after the loading from web is complete. + /// fiedlchr, 15.10.2013. + /// sending object. + /// event args. private void OnLoadDataComplete(object sender, OpenReadCompletedEventArgs e) { Exception downloadError = e.Error; diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionWp8Model.cs index 944cf9e1..62eb6b32 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionWp8Model.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonFunctionWp8Model.cs @@ -1,23 +1,25 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 05.09.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the person function wp 8 model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Person { using System.Xml.Serialization; using CampusAppWP8.Utility; - /// Person function model. - /// Stubbfel, 05.09.2013. + /// Person function model. + /// Stubbfel, 05.09.2013. + /// public class PersonFunctionWp8Model : CampusAppWPortalLib8.Model.Person.PersonFunctionModel { #region Property - /// Gets or sets the function. - /// The function. + /// Gets or sets the function. + /// The function. [XmlAttribute("funktion")] public new string Function { @@ -35,8 +37,8 @@ namespace CampusAppWP8.Model.Person } } - /// Gets or sets the appointment. - /// The appointment. + /// Gets or sets the appointment. + /// The appointment. [XmlAttribute("einrichtung")] public new string Appointment { @@ -54,8 +56,8 @@ namespace CampusAppWP8.Model.Person } } - /// Gets or sets the building. - /// The building. + /// Gets or sets the building. + /// The building. [XmlAttribute("gebaeude")] public new string Building { diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs index fe47181e..5e64ccdc 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs @@ -1,30 +1,27 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 05.09.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the person list wp 8 model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Person { using System.Xml.Serialization; using CampusAppWPortalLib8.Model.Person; using System.Collections.Generic; - /// Person list model. - /// Stubbfel, 05.09.2013. + /// Person list model. + /// Stubbfel, 05.09.2013. + /// [XmlRoot("Uebersicht")] public class PersonListWp8Model : CampusAppWPortalLib8.Model.Person.PersonListModel { - /// Gets a person. - /// Stubbfel, 05.09.2013. - /// The identifier. - /// The person. - /// Gets a person. - /// Stubbfel, 05.09.2013. - /// The identifier. - /// The person. + /// Gets a person. + /// Stubbfel, 15.10.2013. + /// The identifier. + /// The person. public override PersonWp8Model GetPerson(string id) { foreach (PersonWp8Model tmpPerson in this.Persons) @@ -38,9 +35,8 @@ namespace CampusAppWP8.Model.Person return null; } - - /// Removes the non function person. - /// Stubbfel, 05.09.2013. + /// Removes the non function person. + /// Stubbfel, 05.09.2013. public override void RemoveNonFunctionPerson() { List removeList = new List(); @@ -58,8 +54,8 @@ namespace CampusAppWP8.Model.Person } } - /// Sets person identifier to function. - /// Stubbfel, 05.09.2013. + /// Sets person identifier to function. + /// Stubbfel, 05.09.2013. public override void SetPersonIdToFunction() { foreach (PersonWp8Model person in this.Persons) diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonWp8Model.cs index ccceb929..ccc49410 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonWp8Model.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonWp8Model.cs @@ -1,23 +1,25 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 05.09.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the person wp 8 model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Person { using System.Xml.Serialization; using CampusAppWP8.Utility; - /// Person model. - /// Stubbfel, 05.09.2013. + /// Person model. + /// Stubbfel, 05.09.2013. + /// public class PersonWp8Model : CampusAppWPortalLib8.Model.Person.PersonModel { #region property - /// Gets or sets the akadgrad. - /// The akadgrad. + /// Gets or sets the akadgrad. + /// The akadgrad. [XmlAttribute("akadgrad")] public new string Akadgrad { @@ -35,8 +37,8 @@ namespace CampusAppWP8.Model.Person } } - /// Gets or sets the name of the sur. - /// The name of the sur. + /// Gets or sets the name of the sur. + /// The name of the sur. [XmlAttribute("nachname")] public new string SurName { @@ -54,8 +56,8 @@ namespace CampusAppWP8.Model.Person } } - /// Gets or sets the person's first name. - /// The name of the first. + /// Gets or sets the person's first name. + /// The name of the first. [XmlAttribute("vorname")] public new string FirstName { diff --git a/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs b/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs index af3dd11e..b1a1b976 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Setting/AppSettings.cs @@ -1,35 +1,37 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the application settings class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Setting { using CampusAppWP8.Resources; - /// - /// Model for settings of the app - /// + /// Model for settings of the app. + /// Stubbfel, 15.10.2013. public class AppSettings { - #region Enum + /// Values that represent BTUTagDefaultHandler. + /// Stubbfel, 15.10.2013. public enum BTUTagDefaultHandler { + /// An enum constant representing the information page option. InfoPage = 0, + + /// An enum constant representing the campus map option. CampusMap = 1 } #endregion #region Property - /// - /// Gets or sets a value indicating whether the GeoWatch-Flag - /// + /// Gets or sets a value indicating whether the GeoWatch-Flag. + /// true if geo watch enable, false if not. public bool GeoWatchEnable { get @@ -43,9 +45,8 @@ namespace CampusAppWP8.Model.Setting } } - /// - /// Gets or sets a value indicating whether the InitializationApp-Flag - /// + /// Gets or sets a value indicating whether the InitializationApp-Flag. + /// true if initialise application, false if not. public bool InitApp { get @@ -59,8 +60,8 @@ namespace CampusAppWP8.Model.Setting } } - /// Gets or sets a value indicating whether the development mode. - /// true if development mode, false if not. + /// Gets or sets a value indicating whether the development mode. + /// true if development mode, false if not. public bool DevMode { get @@ -74,8 +75,8 @@ namespace CampusAppWP8.Model.Setting } } - /// Gets or sets a value indicating whether the uni network. - /// true if uni network, false if not. + /// Gets or sets a value indicating whether the uni network. + /// true if uni network, false if not. public bool UniNetwork { get @@ -89,8 +90,8 @@ namespace CampusAppWP8.Model.Setting } } - /// Gets or sets a value indicating whether this object is WiFi enable. - /// true if WiFi enable, false if not. + /// Gets or sets a value indicating whether this object is WiFi enable. + /// true if WiFi enable, false if not. public bool WifiEnable { get @@ -104,8 +105,8 @@ namespace CampusAppWP8.Model.Setting } } - /// Gets or sets a value indicating whether the only WiFi. - /// true if only wifi, false if not. + /// Gets or sets a value indicating whether the only WiFi. + /// true if only wifi, false if not. public bool OnlyWifi { get @@ -119,28 +120,30 @@ namespace CampusAppWP8.Model.Setting } } - /// - /// Gets or sets the DeploymentNumber of the app - /// + /// Gets or sets the DeploymentNumber of the app. + /// The deployment number. public int DeploymentNumber { get { return App.LoadFromAppState(Constants.AppSetting_DeploymentNumber); } + set { - App.SaveToAppState(Constants.AppSetting_DeploymentNumber,value); + App.SaveToAppState(Constants.AppSetting_DeploymentNumber, value); } } - + /// Gets or sets the tag default handler. + /// The tag default handler. public BTUTagDefaultHandler TagDefaultHandler { get { return App.LoadFromAppState(Constants.AppSetting_BTUTagDefaultHandler); } + set { App.SaveToAppState(Constants.AppSetting_BTUTagDefaultHandler, value); diff --git a/CampusAppWP8/CampusAppWP8/Model/Setting/BTUTagHandlerTypes.cs b/CampusAppWP8/CampusAppWP8/Model/Setting/BTUTagHandlerTypes.cs new file mode 100644 index 00000000..1967f073 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Model/Setting/BTUTagHandlerTypes.cs @@ -0,0 +1,21 @@ +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// Stubbfel +// 15.10.2013 +// Implements the btu tag handler types class +//----------------------------------------------------------------------- +namespace CampusAppWP8.Model.Setting +{ + /// Values that represent BTUTagDefaultHandler. + /// Stubbfel, 15.10.2013. + public enum BTUTagDefaultHandler + { + /// An enum constant representing the information page option. + InfoPage = 0, + + /// An enum constant representing the campus map option. + CampusMap = 1 + } +} diff --git a/CampusAppWP8/CampusAppWP8/Model/Setting/TagHandlerListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Setting/TagHandlerListPickerItemListModel.cs index 96eec5f6..645a2bc7 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Setting/TagHandlerListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Setting/TagHandlerListPickerItemListModel.cs @@ -1,25 +1,28 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the tag handler list picker item list model class +//----------------------------------------------------------------------- namespace CampusApp8.Model.Setting { - using CampusAppWPortalLib8.Model.Utility; using CampusAppWP8.Model.Setting; using CampusAppWP8.Resources; + using CampusAppWPortalLib8.Model.Utility; - /// - /// Class for the RoleList - /// + /// A data Model for the tag handler list picker item list. + /// Stubbfel, 15.10.2013. + /// public class TagHandlerListPickerItemListModel : ListPickerItemListModel { #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the TagHandlerListPickerItemListModel class. /// + /// Stubbfel, 15.10.2013. public TagHandlerListPickerItemListModel() : base() { @@ -30,9 +33,9 @@ namespace CampusApp8.Model.Setting #region Method - /// - /// Overrides the LoadList-Method - /// + /// Overrides the LoadList-Method + /// Stubbfel, 15.10.2013. + /// protected override void LoadList() { this.AddItem(new ListPickerItemModel(AppSettings.BTUTagDefaultHandler.InfoPage.ToString(), AppResources.Setting_TagHandlerInfo)); diff --git a/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs b/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs index f61df5a4..2951d780 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs @@ -1,46 +1,39 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 23.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the user profil model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Setting { using System.Xml.Serialization; using CampusAppWP8.Resources; using CampusAppWPortalLib8.Model.Settings; - /// - /// Model for the profile of an user - /// + /// Model for the profile of an user. + /// Stubbfel, 15.10.2013. [XmlRoot("root")] public class UserProfilModel { #region Members - /// - /// constant for the first validate semester - /// + /// constant for the first validate semester. private static readonly int FirstSemester = int.Parse(Constants.Valid_FirstSemseter); - /// - /// constant for the last validate semester - /// + /// constant for the last validate semester. private static readonly int LastSemester = int.Parse(Constants.Valid_LastSemseter); - /// - /// constant for the max. number of a validate course - /// + /// constant for the max. number of a validate course. private static readonly int MaxCourseNumber = int.Parse(Constants.Valid_MaxCourseNumber); #endregion #region Proberties - /// - /// Gets or sets the course of the user - /// + /// Gets or sets the course of the user. + /// The course. public int Course { get @@ -57,9 +50,8 @@ namespace CampusAppWP8.Model.Setting } } - /// - /// Gets or sets the defaultCampus of the user - /// + /// Gets or sets the defaultCampus of the user. + /// The default campus. public Campus DefaultCampus { get @@ -73,9 +65,8 @@ namespace CampusAppWP8.Model.Setting } } - /// - /// Gets or sets the role of the user - /// + /// Gets or sets the role of the user. + /// The role. public RoleType Role { get @@ -89,9 +80,8 @@ namespace CampusAppWP8.Model.Setting } } - /// - /// Gets or sets the degree of the user - /// + /// Gets or sets the degree of the user. + /// The degree. public DegreeType Degree { get @@ -105,9 +95,8 @@ namespace CampusAppWP8.Model.Setting } } - /// - /// Gets or sets the semester of the user - /// + /// Gets or sets the semester of the user. + /// The semester. public int Semester { get @@ -127,11 +116,10 @@ namespace CampusAppWP8.Model.Setting #region Methods - /// - /// Methods check if a value could be a valid semester - /// - /// value which has to be checked - /// true if it is an valid semester, otherwise false + /// Methods check if a value could be a valid semester. + /// Stubbfel, 15.10.2013. + /// value which has to be checked. + /// true if it is an valid semester, otherwise false. private bool ValditateSemester(int possibleSemester) { if (possibleSemester < UserProfilModel.FirstSemester || possibleSemester > UserProfilModel.LastSemester) @@ -142,11 +130,10 @@ namespace CampusAppWP8.Model.Setting return true; } - /// - /// Methods check if a value could be a valid course - /// - /// value which has to be checked - /// true if it is an valid course, otherwise false + /// Methods check if a value could be a valid course. + /// Stubbfel, 15.10.2013. + /// value which has to be checked. + /// true if it is an valid course, otherwise false. private bool ValditateCourse(int possibleCourse) { if (possibleCourse > UserProfilModel.MaxCourseNumber) diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListWp8Model.cs index d520b49d..d7437a86 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListWp8Model.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListWp8Model.cs @@ -1,9 +1,11 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the course list picker item list wp 8 model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model.Utility { using System.Collections.Generic; @@ -12,14 +14,14 @@ namespace CampusAppWP8.Model.Utility using CampusAppWP8.Utility; using CampusAppWPortalLib8.Model.Utility; - /// - /// This is a class for the courseList - /// + /// This is a class for the courseList. + /// Stubbfel, 15.10.2013. + /// public class CourseListPickerItemListWp8Model : CampusAppWPortalLib8.Model.Utility.CourseListPickerItemListModel { #region Member - /// List of courses. + /// List of courses. private CourseFeed courseList; #endregion @@ -27,8 +29,9 @@ namespace CampusAppWP8.Model.Utility #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public CourseListPickerItemListWp8Model() { } @@ -37,14 +40,11 @@ namespace CampusAppWP8.Model.Utility #region Events - /// - /// Delegate of the OnIO callback function. - /// + /// Delegate of the OnIO callback function. + /// Stubbfel, 15.10.2013. public delegate void OnIO(); - /// - /// Callback pointer, called after loading. - /// + /// Callback pointer, called after loading. public event OnIO OnLoaded = null; #endregion @@ -53,9 +53,8 @@ namespace CampusAppWP8.Model.Utility #region public - /// - /// Overrides the LoadList-Method - /// + /// Overrides the LoadList-Method + /// Stubbfel, 15.10.2013. public void LoadCourseList() { if (this.courseList == null || this.courseList.Model == null) @@ -76,25 +75,25 @@ namespace CampusAppWP8.Model.Utility #region private - /// Feed is fail. - /// Stubbfel, 10.09.2013. + /// Feed is fail. + /// Stubbfel, 10.09.2013. private void FeedIsFail() { this.FallBackList(); this.CallOnLoaded(); } - /// Feed is ready. - /// Stubbfel, 10.09.2013. + /// Feed is ready. + /// Stubbfel, 10.09.2013. private void FeedIsReady() { this.ConvertToListPickerItemModel(this.courseList.Model.CreateCourseList()); this.CallOnLoaded(); } - /// Converts a courseList to a list picker item model. - /// Stubbfel, 10.09.2013. - /// List of courses. + /// Converts a courseList to a list picker item model. + /// Stubbfel, 10.09.2013. + /// List of courses. private void ConvertToListPickerItemModel(List courseList) { foreach (CourseModel course in courseList) @@ -106,8 +105,8 @@ namespace CampusAppWP8.Model.Utility this.courseList.SaveData(); } - /// Call on loaded. - /// Stubbfel, 10.09.2013. + /// Call on loaded. + /// Stubbfel, 10.09.2013. private void CallOnLoaded() { if (this.OnLoaded != null) diff --git a/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs b/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs index c0a24f9d..958f118a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs @@ -1,31 +1,31 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 05.07.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the XML model class +//----------------------------------------------------------------------- namespace CampusAppWP8.Model { using System.Text; using CampusAppWPortalLib8.Utility; using CampusAppWPortalLib8.Model; using CampusAppWPortalLib8.Resources; - - /// - /// Xml model io handler class. - /// - /// model type + + /// Xml model io handler class. + /// fiedlchr, 15.10.2013. + /// + /// public abstract class XmlModel : MainModel, IXmlModel { #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// model io type - /// filename of the data file - /// url of the feed data + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. + /// model io type. + /// filename of the data file. + /// url of the feed data. public XmlModel(ModelType modelType, string fileName, string url) : base(modelType, fileName, url) { @@ -33,11 +33,12 @@ namespace CampusAppWP8.Model } /// - /// Initializes a new instance of the class. - /// Use only if the model io type is file or feed, not both. + /// Initializes a new instance of the class. Use only if the model + /// io type is file or feed, not both. /// - /// model io type - /// name of the file or the url of the feed + /// fiedlchr, 15.10.2013. + /// model io type. + /// name of the file or the url of the feed. public XmlModel(ModelType modelType, string sourceName) : base(modelType, sourceName) { @@ -48,20 +49,18 @@ namespace CampusAppWP8.Model #region Property - /// - /// Gets or sets for the name of the root-tag - /// + /// Gets or sets for the name of the root-tag. + /// public string ValidRootName { get; set; } #endregion #region Method - /// - /// Create the model from a xml byte array. - /// - /// model data - /// true, if succeeded + /// Create the model from a xml byte array. + /// fiedlchr, 15.10.2013. + /// model data. + /// true, if succeeded. protected override bool DeserializeModel(byte[] modelData) { bool retValue = true; @@ -81,10 +80,9 @@ namespace CampusAppWP8.Model return retValue; } - /// - /// Serializes the model to a byte array. - /// - /// model data + /// Serializes the model to a byte array. + /// fiedlchr, 15.10.2013. + /// model data. protected override byte[] SerializeModel() { byte[] retValue = null; diff --git a/CampusAppWP8/CampusAppWP8/Pages/BTUTag/BTUTagInfo.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/BTUTag/BTUTagInfo.xaml.cs index 954a455e..8bf66f31 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/BTUTag/BTUTagInfo.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/BTUTag/BTUTagInfo.xaml.cs @@ -1,4 +1,11 @@ - +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// Stubbfel +// 15.10.2013 +// Implements the btu tag info.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.BTTTag { using System; @@ -6,15 +13,21 @@ namespace CampusAppWP8.Pages.BTTTag using CampusApp8.Model.Setting; using Microsoft.Phone.Controls; + /// Information about the btu tag. + /// Stubbfel, 15.10.2013. + /// public partial class BTUTagInfo : PhoneApplicationPage { #region Member + /// The taghandler model. private TagHandlerListPickerItemListModel taghandlerModel; #endregion #region Constructor + /// Initializes a new instance of the BTUTagInfo class. + /// Stubbfel, 15.10.2013. public BTUTagInfo() { InitializeComponent(); @@ -28,10 +41,9 @@ namespace CampusAppWP8.Pages.BTTTag #region Method - /// - /// Override the OnNavigatedFrom method - /// - /// Arguments of navigation + /// Override the OnNavigatedFrom method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { if (NavigationMode.Back == e.NavigationMode) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs index 8a9b7ab1..0ee3bd2a 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs @@ -1,10 +1,11 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// fiedlchr -// 13.08.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the campus map page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Campusmap { using System; @@ -29,51 +30,43 @@ namespace CampusAppWP8.Pages.Campusmap using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; - /// Class for the campusMap page. - /// Stubbfel, 19.08.2013. + /// Class for the campusMap page. + /// Stubbfel, 19.08.2013. + /// public partial class CampusMapPage : PhoneApplicationPage { #region Member - /// The device. + /// The device. private readonly ProximityDevice device = ProximityDevice.GetDefault(); - /// Variable for the map model. + /// Variable for the map model. private CampusMapModel campusMap; - /// - /// Variable for the PlaceFile - /// + /// Variable for the PlaceFile. private PlacesFile file; - /// - /// List of information names - /// + /// List of information names. private List informationsNames; - /// - /// Flag which indicates if an qrCode scan is running - /// + /// Flag which indicates if an qrCode scan is running. private bool qrcodeScan = false; - /// - /// Variable for the last query - /// + /// Variable for the last query. private string lastQuery; - /// - /// Flag which indicates the map show information of all buildings - /// + /// Flag which indicates the map show information of all buildings. private bool buildInfoEnable; + /// Identifier for the ndef. private long ndefId; #endregion #region Constructor - /// Initializes a new instance of the class. - /// Stubbfel, 19.08.2013. + /// Initializes a new instance of the class. + /// Stubbfel, 19.08.2013. public CampusMapPage() { this.InitializeComponent(); @@ -110,15 +103,12 @@ namespace CampusAppWP8.Pages.Campusmap #region Events - /// - /// Delegate for LoadingPlace events - /// - /// the events args + /// Delegate for LoadingPlace events. + /// Stubbfel, 15.10.2013. + /// the events args. public delegate void LoadingPlace(string args); - /// - /// Event for loading places - /// + /// Event for loading places. public event LoadingPlace OnLoadingPlace; #endregion @@ -127,9 +117,9 @@ namespace CampusAppWP8.Pages.Campusmap #region protected - /// Methods overrides the OnNavigatedTo-Method. - /// Stubbfel, 19.08.2013. - /// some NavigationEventArgs. + /// Methods overrides the OnNavigatedTo-Method. + /// Stubbfel, 19.08.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -189,10 +179,9 @@ namespace CampusAppWP8.Pages.Campusmap ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler); } - /// - /// Methods overrides the OnNavigatedFrom-Method - /// - /// some NavigationEventArgs + /// Methods overrides the OnNavigatedFrom-Method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { this.device.StopSubscribingForMessage(ndefId); @@ -205,21 +194,19 @@ namespace CampusAppWP8.Pages.Campusmap #region private - /// - /// Method set the lastQuery and register to OnLoadingPlace-Event - /// - /// the query string - /// the event callback + /// Method set the lastQuery and register to OnLoadingPlace-Event. + /// Stubbfel, 15.10.2013. + /// the query string. + /// the event callback. private void SetLastQuery(string query, Action action) { this.lastQuery = query; this.OnLoadingPlace = new CampusMapPage.LoadingPlace(action); } - /// - /// Method shows certain places as hidden Pin - /// - /// the query string + /// Method shows certain places as hidden Pin. + /// Stubbfel, 15.10.2013. + /// the query string. private void ShowPlacesByQueryAsHiddenPin(string query) { if (!this.IsMapReady()) @@ -232,10 +219,9 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// - /// Method shows certain places as search Pin - /// - /// the query string + /// Method shows certain places as search Pin. + /// Stubbfel, 15.10.2013. + /// the query string. private void ShowPlacesByQueryAsSearchPin(string query) { if (!this.IsMapReady()) @@ -254,32 +240,33 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// - /// Method show all places, which match with the query as a pin - /// - /// the query string - /// the type of the pin - /// if its true then send query to the place file otherwise to the CampusMapModel + /// Method show all places, which match with the query as a pin. + /// Stubbfel, 15.10.2013. + /// the query string. + /// the type of the pin. + /// + /// if its true then send query to the place file otherwise to the CampusMapModel. + /// private void ShowPlacesByQuery(string query, MapPinModel.PinType pintype, bool allPlaces) { this.AddPins(this.SearchPlaces(query, allPlaces), pintype); } - /// - /// Method show all places by placeId - /// - /// the placeId - /// the type of the pin - /// if its true then send query to the place file otherwise to the CampusMapModel + /// Method show all places by placeId. + /// Stubbfel, 15.10.2013. + /// the placeId. + /// the type of the pin. + /// + /// if its true then send query to the place file otherwise to the CampusMapModel. + /// private void ShowPlacesByPlaceId(string placeId, MapPinModel.PinType pintype, bool allPlaces) { this.AddPinsByPids(new List() { placeId }, pintype, false, allPlaces); } - /// - /// Method shows places by placeId from place file as search Pin - /// - /// the placeId + /// Method shows places by placeId from place file as search Pin. + /// Stubbfel, 15.10.2013. + /// the placeId. private void ShowAllPlacesByPlaceIdAsSearchPin(string placeId) { if (!this.IsMapReady()) @@ -292,10 +279,9 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// - /// Method shows places by placeId from CampusMapModel as search Pin - /// - /// the placeId + /// Method shows places by placeId from CampusMapModel as search Pin. + /// Stubbfel, 15.10.2013. + /// the placeId. private void ShowPlacesByPlaceIdAsSearchPin(string placeId) { if (!this.IsMapReady()) @@ -308,10 +294,9 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// - /// Method show all buildings of a campus - /// - /// the id of the campus + /// Method show all buildings of a campus. + /// Stubbfel, 15.10.2013. + /// the id of the campus. private void ShowAllCampusBuilding(string campusId) { if (!this.IsMapReady()) @@ -324,10 +309,9 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// - /// Method check if the map loading is finish - /// - /// true, if the map is ready to use, otherwise false + /// Method check if the map loading is finish. + /// Stubbfel, 15.10.2013. + /// true, if the map is ready to use, otherwise false. private bool IsMapReady() { if (this.campusMap == null || !this.campusMap.IsReady) @@ -338,9 +322,8 @@ namespace CampusAppWP8.Pages.Campusmap return true; } - /// - /// Method will be execute if the place file is ready - /// + /// Method will be execute if the place file is ready. + /// Stubbfel, 15.10.2013. private void FileIsReady() { this.campusMap = new CBMainMapModel(this.file.Model.Places.ToList()); @@ -352,10 +335,10 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// TextSearch click method. - /// Stubbfel, 19.08.2013. - /// caller object. - /// some EventArgs. + /// TextSearch click method. + /// Stubbfel, 19.08.2013. + /// caller object. + /// some EventArgs. private void SearchByText(object sender, RoutedEventArgs e) { string query = QString.Text.Trim(); @@ -369,11 +352,10 @@ namespace CampusAppWP8.Pages.Campusmap this.ShowPlacesByQueryAsSearchPin(query); } - /// - /// Method insert or remove the buildings pins - /// - /// caller object. - /// some EventArgs. + /// Method insert or remove the buildings pins. + /// Stubbfel, 15.10.2013. + /// caller object. + /// some EventArgs. private void ShowBuildingsInformation(object sender, EventArgs e) { string menuText; @@ -394,10 +376,9 @@ namespace CampusAppWP8.Pages.Campusmap item.Text = menuText; } - /// - /// Method clear the Map - /// - /// (optional) tags of the UIElement + /// Method clear the Map. + /// Stubbfel, 15.10.2013. + /// (optional) tags of the UIElement. private void ClearMap(List removeTags = null) { if (removeTags == null) @@ -424,13 +405,14 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// - /// Method adds pin to the map by given list of placeId - /// - /// list of placeId - /// type of pin - /// (optional) if its true, clear canvas before adding - /// (optional) if its true, load place from place file, otherwise from CampusMapModel + /// Method adds pin to the map by given list of placeId. + /// Stubbfel, 15.10.2013. + /// list of placeId. + /// type of pin. + /// (optional) if its true, clear canvas before adding. + /// + /// (optional) if its true, load place from place file, otherwise from CampusMapModel. + /// private void AddPinsByPids(List pidList, MapPinModel.PinType pinType, bool clearCanvas = true, bool allPlaces = false) { // clear canvas @@ -477,11 +459,10 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// - /// Method start a NFCScan - /// - /// sender of event - /// the event args + /// Method start a NFCScan. + /// Stubbfel, 15.10.2013. + /// sender of event. + /// the event args. private void SearchPlaceByNFC_Click(object sender, EventArgs e) { MessageBoxes.ShowMainModelInfoMessageBox(AppResources.ScarNfc_Search); @@ -490,11 +471,10 @@ namespace CampusAppWP8.Pages.Campusmap this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler); } - /// - /// Method start a QRCodeScan - /// - /// sender of event - /// the event args + /// Method start a QRCodeScan. + /// Stubbfel, 15.10.2013. + /// sender of event. + /// the event args. private void SearchPlaceByQR_Click(object sender, EventArgs e) { this.qrcodeScan = true; @@ -504,11 +484,10 @@ namespace CampusAppWP8.Pages.Campusmap this.NavigationService.Navigate(url); } - /// - /// Method handle the result of a NFCScan - /// - /// the sender device - /// the message of the device + /// Method handle the result of a NFCScan. + /// Stubbfel, 15.10.2013. + /// the sender device. + /// the message of the device. private void NDEFHandler(ProximityDevice sender, ProximityMessage message) { // create ndefMessage @@ -575,11 +554,13 @@ namespace CampusAppWP8.Pages.Campusmap } - /// Searches for the first places. - /// Stubbfel, 19.08.2013. - /// The query. - /// (optional) if its true, search places in place file, otherwise in CampusMapModel - /// The found places. + /// Searches for the first places. + /// Stubbfel, 19.08.2013. + /// The query. + /// + /// (optional) if its true, search places in place file, otherwise in CampusMapModel. + /// + /// The found places. private List SearchPlaces(string query, bool allPlaces = false) { SpsModel spatial; @@ -609,11 +590,11 @@ namespace CampusAppWP8.Pages.Campusmap return spatial.GetPlacesByInformation(query, true, this.informationsNames); } - /// Adds the pins. - /// Stubbfel, 19.08.2013. - /// The places. - /// The type. - /// (Optional) the scroll. + /// Adds the pins. + /// Stubbfel, 19.08.2013. + /// The places. + /// The type. + /// (Optional) the scroll. private void AddPins(List places, MapPinModel.PinType type, bool scroll = true) { foreach (PlaceModel place in places) @@ -633,13 +614,15 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// Add Pin to an certain position. - /// Stubbfel, 19.08.2013. - /// longitude parameter. - /// latitude parameter. - /// The type. - /// (Optional) the scroll. - /// (Optional) List of places, whose are associative with the pin + /// Add Pin to an certain position. + /// Stubbfel, 19.08.2013. + /// longitude parameter. + /// latitude parameter. + /// The type. + /// (Optional) the scroll. + /// + /// (Optional) List of places, whose are associative with the pin. + /// private void AddPin(double x, double y, MapPinModel.PinType type, bool scroll = true, List assocPlaces = null) { Point scrollPoint = this.campusMap.GetScrollPoint(this.campusMap.ConverToPixelPoint(this.campusMap.ConverToMapPoint(x, y))); @@ -670,18 +653,18 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// On clicking the update button in the ApplicationBar. - /// Stubbfel, 19.08.2013. - /// caller object. - /// some EventArgs. + /// On clicking the update button in the ApplicationBar. + /// Stubbfel, 19.08.2013. + /// caller object. + /// some EventArgs. private void UpdateButtonAppBar_Click(object sender, System.EventArgs e) { this.ShowCurrentPositionDispatcher(); } - /// execute ShowCurrentPosition-Method via Dispatcher. - /// Stubbfel, 19.08.2013. - /// (Optional) the scroll. + /// execute ShowCurrentPosition-Method via Dispatcher. + /// Stubbfel, 19.08.2013. + /// (Optional) the scroll. private void ShowCurrentPositionDispatcher(bool scroll = true) { this.DefHeader.ProgressVisibility = Visibility.Visible; @@ -690,9 +673,9 @@ namespace CampusAppWP8.Pages.Campusmap thread.Start(); } - /// Method add a pin on the at the position of the phone. - /// Stubbfel, 19.08.2013. - /// (Optional) the scroll. + /// Method add a pin on the at the position of the phone. + /// Stubbfel, 19.08.2013. + /// (Optional) the scroll. private void ShowCurrentPosition(bool scroll = true) { if (Settings.AppSetting.GeoWatchEnable) @@ -720,9 +703,9 @@ namespace CampusAppWP8.Pages.Campusmap } } - /// Sets pin to current position. - /// Stubbfel, 19.08.2013. - /// (Optional) the scroll. + /// Sets pin to current position. + /// Stubbfel, 19.08.2013. + /// (Optional) the scroll. private void SetPinToCurrentPosition(bool scroll = true) { string lat = App.LoadFromAppState(Constants.GeoWatch_CurrentPosition_Lat); @@ -738,17 +721,17 @@ namespace CampusAppWP8.Pages.Campusmap } else { - this.ClearMap(new List() { MapPinModel.CurrendPositionPlacePinString }); + this.ClearMap(new List() { MapPinModel.CurrentPositionPlacePinString }); this.SetPinToPosition(lat, log, MapPinModel.PinType.CurrentPosition, scroll); } } - /// Sets pin to position. - /// Stubbfel, 27.08.2013. - /// The latitude. - /// The longitude. - /// The type. - /// (Optional) the scroll. + /// Sets pin to position. + /// Stubbfel, 27.08.2013. + /// The latitude. + /// The longitude. + /// The type. + /// (Optional) the scroll. private void SetPinToPosition(string latitude, string longitude, MapPinModel.PinType type, bool scroll = true) { double x; @@ -762,10 +745,9 @@ namespace CampusAppWP8.Pages.Campusmap this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// - /// Method show same PlaceInformation - /// - /// List of places + /// Method show same PlaceInformation. + /// Stubbfel, 15.10.2013. + /// List of places. private void ShowMapInfo(List places) { if (places == null) @@ -821,6 +803,10 @@ namespace CampusAppWP8.Pages.Campusmap } } + /// Go to room list. + /// Stubbfel, 15.10.2013. + /// Identifier for the building. + /// (Optional) identifier for the room. private void GoToRoomList(string buildingId, string roomId = null) { string urlString = Constants.PathCampusmap_RoomListPage; @@ -833,12 +819,10 @@ namespace CampusAppWP8.Pages.Campusmap this.NavigationService.Navigate(url); } - - /// - /// Method check if a certain place has some rooms - /// - /// the place id - /// true, if the place has got rooms, otherwise false + /// Method check if a certain place has some rooms. + /// Stubbfel, 15.10.2013. + /// the place id. + /// true, if the place has got rooms, otherwise false. private bool HasRooms(string placeId) { foreach (PlaceModel place in this.file.Model.Places) @@ -852,7 +836,10 @@ namespace CampusAppWP8.Pages.Campusmap return false; } - + /// Event handler. Called by Button for key down events. + /// Stubbfel, 15.10.2013. + /// caller object. + /// Key event information. private void Button_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Enter) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs index daa0a1aa..70ca3d7b 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs @@ -1,29 +1,28 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 23.09.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the room list page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Campusmap { - using System; using System.Collections.Generic; using System.Linq; - using System.Windows.Navigation; - using CampusAppWP8.File.Places; - using CampusAppWP8.Model.GeoDb; - using CampusAppWP8.Resources; - using Microsoft.Phone.Controls; - using CampusAppWP8.Utility.Lui.MessageBoxes; - using CampusAppWP8.Model.Campusmap; using System.Windows; using System.Windows.Controls; - using CampusAppWP8.Utility; using System.Windows.Input; using System.Windows.Media; + using System.Windows.Navigation; + using CampusAppWP8.File.Places; + using CampusAppWP8.Model.Campusmap; + using CampusAppWP8.Model.GeoDb; + using CampusAppWP8.Resources; + using CampusAppWP8.Utility; + using CampusAppWP8.Utility.Lui.MessageBoxes; using CampusAppWPortalLib8.Model.Utility; + using Microsoft.Phone.Controls; /// Class of the RoomListPage. /// Stubbfel, 14.10.2013. @@ -42,10 +41,13 @@ namespace CampusAppWP8.Pages.Campusmap /// true to pinch run. private bool pinchRun = false; - /// The mappoint. + + /// The MapPoint. private Point mappoint; + /// The offset point. private Point offsetPoint; + /// The layer list picker. private ListPickerItemListModel layerListPicker; @@ -109,8 +111,8 @@ namespace CampusAppWP8.Pages.Campusmap { if (NavigationContext.QueryString.ContainsKey(Constants.ParamBuildingId)) { - this.setupCanvas(NavigationContext.QueryString[Constants.ParamBuildingId]); - this.createLayerListPicker(); + this.SetupCanvas(NavigationContext.QueryString[Constants.ParamBuildingId]); + this.CreateLayerListPicker(); if (this.building != null && this.building.Layers != null && this.building.Layers.Count > 0) { @@ -120,10 +122,11 @@ namespace CampusAppWP8.Pages.Campusmap if (layerKey != null) { this.Layer.SelectedIndex = this.layerListPicker.GetIndexOrDefault(layerKey); - this.showCurrentRoom(NavigationContext.QueryString[Constants.ParamRoomId]); + this.ShowCurrentRoom(NavigationContext.QueryString[Constants.ParamRoomId]); } } - this.showLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value); + + this.ShowLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value); } else { @@ -134,15 +137,13 @@ namespace CampusAppWP8.Pages.Campusmap { MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad); } - } /// Shows the current room. /// Stubbfel, 14.10.2013. /// Identifier for the place. - private void showCurrentRoom(string placeId) + private void ShowCurrentRoom(string placeId) { - double x; double y; @@ -153,7 +154,7 @@ namespace CampusAppWP8.Pages.Campusmap x = room.GeoRefPoint.Longitude; y = room.GeoRefPoint.Latitude; Point roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y))); - Point viewPoint = new Point(roompoint.X - mappoint.X + offsetPoint.X, roompoint.Y - mappoint.Y + offsetPoint.Y); + Point viewPoint = new Point(roompoint.X - this.mappoint.X + this.offsetPoint.X, roompoint.Y - this.mappoint.Y + this.offsetPoint.Y); MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, MapPinModel.PinType.InfoRedPlace, new List { room })); } @@ -167,11 +168,13 @@ namespace CampusAppWP8.Pages.Campusmap { return; } + string msgText = string.Empty; if (places == null) { return; } + foreach (PlaceModel place in places) { msgText += AppResources.PlaceLabel_Name + ": "; @@ -228,7 +231,6 @@ namespace CampusAppWP8.Pages.Campusmap double scaleVal = pinch.CumulativeScale; if (scaleVal < 1) { - scaleVal = 1; } else if (scaleVal > 1.5) @@ -239,8 +241,6 @@ namespace CampusAppWP8.Pages.Campusmap scale.ScaleX = scaleVal; scale.ScaleY = scaleVal; - - var newCenter = e.PinchManipulation.Current.Center; scale.CenterX = newCenter.X; scale.CenterY = newCenter.Y; @@ -266,21 +266,22 @@ namespace CampusAppWP8.Pages.Campusmap /// Creates layer list picker. /// Stubbfel, 14.10.2013. - private void createLayerListPicker() + private void CreateLayerListPicker() { - layerListPicker = new ListPickerItemListModel(); + this.layerListPicker = new ListPickerItemListModel(); foreach (string layername in this.building.Layers.Keys) { - layerListPicker.AddItem(layername, layername); + this.layerListPicker.AddItem(layername, layername); } - this.Layer.ItemsSource = layerListPicker.List; + + this.Layer.ItemsSource = this.layerListPicker.List; } /// Shows the layer places. /// Stubbfel, 14.10.2013. /// (Optional) the layer key. - private void showLayerPlaces(string layerKey = null) + private void ShowLayerPlaces(string layerKey = null) { if (layerKey == null) { @@ -298,7 +299,7 @@ namespace CampusAppWP8.Pages.Campusmap x = room.GeoRefPoint.Longitude; y = room.GeoRefPoint.Latitude; Point roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y))); - Point viewPoint = new Point(roompoint.X - mappoint.X + offsetPoint.X, roompoint.Y - mappoint.Y + offsetPoint.Y); + Point viewPoint = new Point(roompoint.X - this.mappoint.X + this.offsetPoint.X, roompoint.Y - this.mappoint.Y + this.offsetPoint.Y); MapPinModel.PinType type; @@ -318,8 +319,8 @@ namespace CampusAppWP8.Pages.Campusmap default: type = MapPinModel.PinType.InfoPlace; break; - } + MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, type, new List { room })); } @@ -329,16 +330,16 @@ namespace CampusAppWP8.Pages.Campusmap /// Shows the layer places. /// Stubbfel, 14.10.2013. /// (Optional) zero-based index of the. - private void showLayerPlaces(int index = 0) + private void ShowLayerPlaces(int index = 0) { string layerKey = this.building.Layers.Keys.ElementAt(index); - this.showLayerPlaces(layerKey); + this.ShowLayerPlaces(layerKey); } /// Sets up the canvas. /// Stubbfel, 14.10.2013. /// Identifier for the building. - private void setupCanvas(string buildingId) + private void SetupCanvas(string buildingId) { this.building = new CampusBuildingModel(buildingId, this.placeFile.Model.Places.ToList()); @@ -348,13 +349,13 @@ namespace CampusAppWP8.Pages.Campusmap double y = this.building.Building.GeoRefPoint.Latitude; double x = this.building.Building.GeoRefPoint.Longitude; - mappoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y))); - offsetPoint = new Point(-this.buildingMap.MapImageOffsetX, -this.buildingMap.MapImageOffsetY); + this.mappoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y))); + this.offsetPoint = new Point(-this.buildingMap.MapImageOffsetX, -this.buildingMap.MapImageOffsetY); - this.MapCanvas.DataContext = buildingMap; + this.MapCanvas.DataContext = this.buildingMap; - Canvas.SetLeft(this.imgMap, -1 * mappoint.X); - Canvas.SetTop(this.imgMap, -1 * mappoint.Y); + Canvas.SetLeft(this.imgMap, -1 * this.mappoint.X); + Canvas.SetTop(this.imgMap, -1 * this.mappoint.Y); Canvas.SetZIndex(this.imgMap, 0); } @@ -364,7 +365,7 @@ namespace CampusAppWP8.Pages.Campusmap /// Selection changed event information. private void Layer_SelectionChanged(object sender, SelectionChangedEventArgs e) { - this.showLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value); + this.ShowLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value); } /// Clears the map described by removeTags. diff --git a/CampusAppWP8/CampusAppWP8/Pages/Dev/NFC.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Dev/NFC.xaml.cs index 228bef0c..ca19f7d8 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Dev/NFC.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Dev/NFC.xaml.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.08.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the nfc .xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Dev { using System; @@ -14,36 +14,37 @@ namespace CampusAppWP8.Pages.Dev using System.Runtime.InteropServices.WindowsRuntime; using System.Windows; using System.Windows.Navigation; - using CampusAppWP8.Model.Campusmap; + using CampusAppWP8.File.Places; using CampusAppWP8.Model.GeoDb; using CampusAppWP8.Utility.NDEF; using Microsoft.Phone.Controls; using Windows.Networking.Proximity; - using CampusAppWP8.File.Places; - /// Nfc page. - /// Stubbfel, 22.08.2013. + /// Nfc page. + /// Stubbfel, 22.08.2013. + /// public partial class NFC : PhoneApplicationPage { #region Member - /// The device. + /// The device. private readonly ProximityDevice device = ProximityDevice.GetDefault(); - /// Zero-based index of the act ndef. + /// Zero-based index of the act ndef. private int actNDEFIndex; - /// List of ndefs. + /// List of ndefs. private List ndefList; + /// The file. private PlacesFile file; #endregion #region Constructor - /// Initializes a new instance of the NFC class. - /// Stubbfel, 22.08.2013. + /// Initializes a new instance of the NFC class. + /// Stubbfel, 22.08.2013. public NFC() { this.InitializeComponent(); @@ -56,32 +57,18 @@ namespace CampusAppWP8.Pages.Dev this.file.OnLoaded += new PlacesFile.OnIO(this.FileIsReady); this.file.LoadData(); - - this.actNDEFIndex = 0; } - private void FileIsReady() - { - this.ndefList = new List(); - //MapModel map = new CBMainMapModel(this.file.Model.Places.ToList()); - foreach (PlaceModel place in this.file.Model.Places.ToList()) - { - this.ndefList.Add(new NDEFMessage(place.ToNfcString(), NDEFMessage.TYPEVAL.TEXT)); - } - - this.Writecontent.Text = this.ndefList[this.actNDEFIndex].GetContent(); - } - #endregion #region Method #region protected - /// Override the OnNavigatedTo method. - /// Stubbfel, 22.08.2013. - /// Arguments of navigation. + /// Override the OnNavigatedTo method. + /// Stubbfel, 22.08.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -91,20 +78,35 @@ namespace CampusAppWP8.Pages.Dev #region private - /// Handler, called when the publish. - /// Stubbfel, 22.08.2013. - /// The sender. - /// Identifier for the message. + /// File is ready. + /// Stubbfel, 15.10.2013. + private void FileIsReady() + { + this.ndefList = new List(); + + // MapModel map = new CBMainMapModel(this.file.Model.Places.ToList()); + foreach (PlaceModel place in this.file.Model.Places.ToList()) + { + this.ndefList.Add(new NDEFMessage(place.ToNfcString(), NDEFMessage.TYPEVAL.TEXT)); + } + + this.Writecontent.Text = this.ndefList[this.actNDEFIndex].GetContent(); + } + + /// Handler, called when the publish. + /// Stubbfel, 22.08.2013. + /// The sender. + /// Identifier for the message. private void PublishHandler(ProximityDevice sender, long messageId) { this.device.StopPublishingMessage(messageId); this.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show("Writed:" + this.actNDEFIndex))); } - /// Handler, called when the ndef. - /// Stubbfel, 22.08.2013. - /// The sender. - /// The message. + /// Handler, called when the ndef. + /// Stubbfel, 22.08.2013. + /// The sender. + /// The message. private void NDEFHandler(ProximityDevice sender, ProximityMessage message) { this.device.StopSubscribingForMessage(message.SubscriptionId); @@ -115,19 +117,19 @@ namespace CampusAppWP8.Pages.Dev this.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show(ndef.GetContent()))); } - /// Event handler. Called by Read for click events. - /// Stubbfel, 22.08.2013. - /// The sender. - /// Routed event information. + /// Event handler. Called by Read for click events. + /// Stubbfel, 22.08.2013. + /// The sender. + /// Routed event information. private void Read_Click(object sender, RoutedEventArgs e) { this.device.SubscribeForMessage("NDEF", this.NDEFHandler); } - /// Event handler. Called by Next for click events. - /// Stubbfel, 22.08.2013. - /// The sender. - /// Routed event information. + /// Event handler. Called by Next for click events. + /// Stubbfel, 22.08.2013. + /// The sender. + /// Routed event information. private void Next_Click(object sender, RoutedEventArgs e) { if (this.actNDEFIndex < this.ndefList.Count - 1) @@ -137,10 +139,10 @@ namespace CampusAppWP8.Pages.Dev } } - /// Event handler. Called by Prev for click events. - /// Stubbfel, 22.08.2013. - /// The sender. - /// Routed event information. + /// Event handler. Called by Prev for click events. + /// Stubbfel, 22.08.2013. + /// The sender. + /// Routed event information. private void Prev_Click(object sender, RoutedEventArgs e) { if (this.actNDEFIndex > 0) @@ -150,10 +152,10 @@ namespace CampusAppWP8.Pages.Dev } } - /// Event handler. Called by Write for click events. - /// Stubbfel, 22.08.2013. - /// The sender. - /// Routed event information. + /// Event handler. Called by Write for click events. + /// Stubbfel, 22.08.2013. + /// The sender. + /// Routed event information. private void Write_Click(object sender, RoutedEventArgs e) { this.device.PublishBinaryMessage("NDEF:WriteTag", this.ndefList[this.actNDEFIndex].ToByteArray().AsBuffer(), this.PublishHandler); diff --git a/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs index 8c7c9b23..00fc417d 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs @@ -1,66 +1,67 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 15.08.2013 -// +// 15.10.2013 +// Implements the qr scanner.xaml class +// // This Class uses the ZXing library, which is under the Apache License 2.0. -// +// // Therefor, see: // http://zxingnet.codeplex.com/license // http://www.apache.org/licenses/LICENSE-2.0 // -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- + namespace CampusAppWP8.Pages.Dev { using System; using System.Threading; using System.Windows; - using System.Windows.Media.Imaging; + using System.Windows.Media.Imaging; + using CampusAppWP8.Model.Setting; using CampusAppWP8.Resources; using CampusAppWP8.Utility; + using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Devices; using Microsoft.Phone.Controls; using ZXing; - using CampusAppWP8.Utility.Lui.MessageBoxes; - using CampusAppWP8.Model.Setting; - /// - /// QR Code scanner. - /// + /// QR Code scanner. + /// fiedlchr, 15.10.2013. + /// public partial class QRScanner : PhoneApplicationPage { #region Member - /// The camera object. + /// The camera object. private PhotoCamera cam = null; - /// Thread for transfer the preview image to the reader. + /// Thread for transfer the preview image to the reader. private Thread captureThread = null; - /// For ending the thread. + /// For ending the thread. private volatile bool captureThreadExit = false; - /// QR reader object. + /// QR reader object. private IBarcodeReader barcodeReader = null; - /// Bitmap for transfer the camera image to the reader. + /// Bitmap for transfer the camera image to the reader. private WriteableBitmap bit = null; - /// true if this object is in autofocus. + /// true if this object is in autofocus. private bool isInAutofocus = false; - /// - /// Variable for the storage key of the result - /// + /// Variable for the storage key of the result. private string resultAppStoreKey; #endregion #region Constructor - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. public QRScanner() { this.InitializeComponent(); @@ -73,10 +74,9 @@ namespace CampusAppWP8.Pages.Dev #region protected - /// - /// Is called when this page will become the current page of a frame. - /// - /// event args. + /// Is called when this page will become the current page of a frame. + /// fiedlchr, 15.10.2013. + /// protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { if (PhotoCamera.IsCameraTypeSupported(CameraType.Primary) == true) @@ -85,6 +85,7 @@ namespace CampusAppWP8.Pages.Dev { this.resultAppStoreKey = NavigationContext.QueryString[Constants.ParamQRResultKey]; } + this.isInAutofocus = true; this.cam = new PhotoCamera(CameraType.Primary); this.cam.Initialized += new EventHandler(this.Cam_Initialized); @@ -102,10 +103,9 @@ namespace CampusAppWP8.Pages.Dev } } - /// - /// Is called when this page will not be the current page of a frame. - /// - /// event args. + /// Is called when this page will not be the current page of a frame. + /// fiedlchr, 15.10.2013. + /// protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e) { if (this.cam != null) @@ -116,7 +116,6 @@ namespace CampusAppWP8.Pages.Dev { this.captureThread.Join(); } - this.cam.Dispose(); @@ -124,10 +123,9 @@ namespace CampusAppWP8.Pages.Dev } } - /// - /// Is called after the orientation has changed. - /// - /// event args. + /// Is called after the orientation has changed. + /// fiedlchr, 15.10.2013. + /// protected override void OnOrientationChanged(OrientationChangedEventArgs e) { base.OnOrientationChanged(e); @@ -159,11 +157,10 @@ namespace CampusAppWP8.Pages.Dev #region private - /// - /// Event handler. Called by Cam for initialized events. - /// - /// Source of the event. - /// Camera operation completed event information. + /// Event handler. Called by Cam for initialized events. + /// fiedlchr, 15.10.2013. + /// Source of the event. + /// Camera operation completed event information. private void Cam_Initialized(object sender, Microsoft.Devices.CameraOperationCompletedEventArgs e) { if (e.Succeeded) @@ -179,21 +176,18 @@ namespace CampusAppWP8.Pages.Dev } } - /// - /// Event handler. Called by Cam for automatic focus completed events. - /// - /// Source of the event. - /// Camera operation completed event information. + /// Event handler. Called by Cam for automatic focus completed events. + /// fiedlchr, 15.10.2013. + /// Source of the event. + /// Camera operation completed event information. private void Cam_AutoFocusCompl(object sender, CameraOperationCompletedEventArgs e) { - //this.isInAutofocus = false; } - /// - /// Event handler. Called by CamView for tap events. - /// - /// Source of the event. - /// Gesture event information. + /// Event handler. Called by CamView for tap events. + /// fiedlchr, 15.10.2013. + /// Source of the event. + /// Gesture event information. private void CamView_Tap(object sender, System.Windows.Input.GestureEventArgs e) { if (this.cam != null && this.isInAutofocus == false) @@ -213,12 +207,11 @@ namespace CampusAppWP8.Pages.Dev } } - /// - /// Executes the capture image action. - /// - /// The image. - /// The width. - /// The height. + /// Executes the capture image action. + /// fiedlchr, 15.10.2013. + /// The image. + /// The width. + /// The height. private void OnCaptureImage(int[] img, int width, int height) { Array.Copy(img, this.bit.Pixels, img.Length); @@ -266,6 +259,9 @@ namespace CampusAppWP8.Pages.Dev } } + /// Go to campus-mappage. + /// fiedlchr, 15.10.2013. + /// The tag content. private void GoToCampusMappage(string tagContent) { string pid = Wp8StringManager.FilterPlaceIdinQRResultString(tagContent); @@ -275,9 +271,8 @@ namespace CampusAppWP8.Pages.Dev NavigationService.Navigate(url); } - /// - /// Capture thread function. - /// + /// Capture thread function. + /// fiedlchr, 15.10.2013. private void CaptureThreadFunc() { Size resolution = this.cam.PreviewResolution; @@ -285,13 +280,10 @@ namespace CampusAppWP8.Pages.Dev while (!this.captureThreadExit) { - //if (this.isInAutofocus == false) - //{ this.cam.GetPreviewBufferArgb32(buffer); this.OnCaptureImage(buffer, (int)resolution.Width, (int)resolution.Height); this.isInAutofocus = true; - //} System.Threading.Thread.Sleep(1000); } diff --git a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs index cf2c0e0a..afca0713 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs @@ -1,12 +1,16 @@ -// -// Company copyright tag. +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.09.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the exams.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Exams { + using System; using System.Linq; + using System.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; @@ -16,27 +20,26 @@ namespace CampusAppWP8.Pages.Exams using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; - using System.Threading; - using System; - /// class of ExamsPage. - /// Stubbfel, 02.09.2013. + /// class of ExamsPage. + /// Stubbfel, 02.09.2013. + /// public partial class Exams : PhoneApplicationPage { #region Member - /// The feed. + /// The feed. private ExamFeed feed; - /// The exam file. + /// The exam file. private ExamFile file; #endregion #region Constructor - /// Initializes a new instance of the Exams class. - /// Stubbfel, 02.09.2013. + /// Initializes a new instance of the Exams class. + /// Stubbfel, 02.09.2013. public Exams() { this.InitializeComponent(); @@ -52,9 +55,9 @@ namespace CampusAppWP8.Pages.Exams #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. + /// Is called when this page will become the current page of a frame. + /// stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -67,14 +70,11 @@ namespace CampusAppWP8.Pages.Exams this.DefHeader.ProgressVisibility = Visibility.Visible; Thread thread = new Thread(new ThreadStart(this.LoadingFeed)); thread.Start(); - } - /// - /// Wird aufgerufen, wenn eine Seite nicht mehr die aktive Seite in einem Frame ist. - /// - /// Stubbfel, 02.09.2013. - /// Ein Objekt, das die Ereignisdaten enthält. + /// Is called when this page will not be the current page of a frame. + /// stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { if (NavigationMode.Back == e.NavigationMode) @@ -99,9 +99,8 @@ namespace CampusAppWP8.Pages.Exams this.feed.LoadData(Utilities.GetLoadModus()); } - - /// Method initialize the Feed. - /// Stubbfel, 02.09.2013. + /// Method initialize the Feed. + /// Stubbfel, 02.09.2013. private void InitializeFeed() { this.feed = new ExamFeed(); @@ -110,8 +109,8 @@ namespace CampusAppWP8.Pages.Exams this.feed.OnFailedFile += new ExamFeed.OnFailed(this.FeedIsFailFile); } - /// Method will be execute if the feed is ready. - /// Stubbfel, 02.09.2013. + /// Method will be execute if the feed is ready. + /// Stubbfel, 02.09.2013. private void FeedIsReady() { if (this.Dispatcher != null) @@ -124,16 +123,16 @@ namespace CampusAppWP8.Pages.Exams } } - /// Executes the PDF reader operation. - /// Stubbfel, 03.09.2013. + /// Executes the PDF reader operation. + /// Stubbfel, 03.09.2013. private void LaunchPDFReader() { this.DefHeader.ProgressVisibility = Visibility.Collapsed; this.file.SaveAndLaunchFile(); } - /// Sets up the exam list. - /// Stubbfel, 02.09.2013. + /// Sets up the exam list. + /// Stubbfel, 02.09.2013. private void SetupExamList() { var bachelorList = from exam in this.feed.Model.Exams @@ -158,9 +157,9 @@ namespace CampusAppWP8.Pages.Exams this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// Calculates the selected index. - /// Stubbfel, 02.09.2013. - /// The calculated selected index. + /// Calculates the selected index. + /// Stubbfel, 02.09.2013. + /// The calculated selected index. private int CalcSelectedIndex() { int result = App.LoadFromIsolatedStorage(Constants.ExamPageModelKey); @@ -184,12 +183,12 @@ namespace CampusAppWP8.Pages.Exams break; } } - + return result; } - /// Method will be execute if the feed is failed. - /// Stubbfel, 02.09.2013. + /// Method will be execute if the feed is failed. + /// Stubbfel, 02.09.2013. private void FeedIsFailWeb() { if (this.Dispatcher != null) @@ -200,29 +199,30 @@ namespace CampusAppWP8.Pages.Exams { MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb); } + this.feed.ForceReadFile(); } - /// Method will be execute if the feed is failed. - /// Stubbfel, 02.09.2013. + /// Method will be execute if the feed is failed. + /// Stubbfel, 02.09.2013. private void FeedIsFailFile() { if (this.Dispatcher != null) { - this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile))); + this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile))); this.Dispatcher.BeginInvoke(new Action(() => this.DefHeader.ProgressVisibility = Visibility.Collapsed)); } else { - MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile); + MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile); this.DefHeader.ProgressVisibility = Visibility.Collapsed; } } - /// Event handler. Called by Button for click events. - /// Stubbfel, 03.09.2013. - /// Source of the event. - /// Routed event information. + /// Event handler. Called by Button for click events. + /// Stubbfel, 03.09.2013. + /// Source of the event. + /// Routed event information. private void Button_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs index 606a9366..87ae249c 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 13.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Lecture { using System; @@ -18,38 +19,28 @@ namespace CampusAppWP8.Pages.Lecture using CampusAppWPortalLib8.Model.Utility; using Microsoft.Phone.Controls; - - /// - /// Class for the LecturePage - /// + /// Class for the LecturePage. + /// Stubbfel, 15.10.2013. + /// public partial class LecturePage : PhoneApplicationPage { #region Member - /// - /// actual LectureAPI - /// + /// actual LectureAPI. private LectureApi api; - /// - /// List for the courses of the BTU - /// - /// - /// need to be extend to full list - /// + /// List for the courses of the BTU. private LecturePageModel pageModel; - /// - /// flag for initialed page - /// + /// flag for initialed page. private bool init; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LecturePage() { this.InitializeComponent(); @@ -63,10 +54,9 @@ namespace CampusAppWP8.Pages.Lecture #region protected - /// - /// Methods overrides the OnNavigatedFrom-Method - /// - /// some NavigationEventArgs + /// Methods overrides the OnNavigatedFrom-Method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { if (NavigationMode.Back == e.NavigationMode) @@ -88,9 +78,8 @@ namespace CampusAppWP8.Pages.Lecture #region private - /// - /// Load the PageModel - /// + /// Load the PageModel. + /// Stubbfel, 15.10.2013. private void LoadPageModel() { this.DefHeader.ProgressVisibility = Visibility.Visible; @@ -99,9 +88,8 @@ namespace CampusAppWP8.Pages.Lecture this.pageModel.LoadLists(); } - /// - /// Method sets the ItemSource of the ListPickers - /// + /// Method sets the ItemSource of the ListPickers. + /// Stubbfel, 15.10.2013. private void SetupListPickers() { this.Course.ItemsSource = this.pageModel.CourseList.List; @@ -122,10 +110,9 @@ namespace CampusAppWP8.Pages.Lecture this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// - /// Method set the last selected index of the ListPickers - /// - /// Last PageModel + /// Method set the last selected index of the ListPickers. + /// Stubbfel, 15.10.2013. + /// Last PageModel. private void SetLastSelectedIndex(LecturePageModel lastPageModel) { this.pageModel.SelectCourseIndex = lastPageModel.SelectCourseIndex; @@ -135,9 +122,8 @@ namespace CampusAppWP8.Pages.Lecture this.pageModel.SelectSemesterIndex = lastPageModel.SelectSemesterIndex; } - /// - /// Method set the last selected index of the ListPickers - /// + /// Method set the last selected index of the ListPickers. + /// Stubbfel, 15.10.2013. private void SetSelectedIndex() { this.Course.SelectedIndex = this.pageModel.SelectCourseIndex; @@ -147,9 +133,8 @@ namespace CampusAppWP8.Pages.Lecture this.To.SelectedIndex = this.pageModel.SelectToIndex; } - /// - /// Method store the actual selectIndex to the models - /// + /// Method store the actual selectIndex to the models. + /// Stubbfel, 15.10.2013. private void StoreSelectedIndex() { this.pageModel.SelectCourseIndex = this.Course.SelectedIndex; @@ -159,11 +144,10 @@ namespace CampusAppWP8.Pages.Lecture this.pageModel.SelectToIndex = this.To.SelectedIndex; } - /// - /// Method send a request to the Feed - /// - /// sender of this event - /// events arguments + /// Method send a request to the Feed. + /// Stubbfel, 15.10.2013. + /// sender of this event. + /// events arguments. private void SendRequest(object sender, RoutedEventArgs e) { this.api = new LectureApi(); @@ -176,9 +160,10 @@ namespace CampusAppWP8.Pages.Lecture } /// - /// Method read the values from the inputs and put them in a list of parameters + /// Method read the values from the inputs and put them in a list of parameters. /// - /// a list of parameters + /// Stubbfel, 15.10.2013. + /// a list of parameters. private List CreateUrlParameter() { ListPickerItemModel semester = (ListPickerItemModel)this.Semester.SelectedItem; @@ -196,9 +181,8 @@ namespace CampusAppWP8.Pages.Lecture return parameterList; } - /// - /// Method will be execute if the feed is ready - /// + /// Method will be execute if the feed is ready. + /// Stubbfel, 15.10.2013. private void ApiIsReady() { string query = this.ActivtyName.Text; @@ -213,11 +197,10 @@ namespace CampusAppWP8.Pages.Lecture NavigationService.Navigate(url); } - /// - /// EventHandler for changed degree selection - /// - /// sender object - /// some args + /// EventHandler for changed degree selection. + /// Stubbfel, 15.10.2013. + /// sender object. + /// some args. private void DegreeSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (!this.init) @@ -230,11 +213,10 @@ namespace CampusAppWP8.Pages.Lecture this.From.ItemsSource = this.pageModel.FromNumberList.List; } - /// - /// EventHandler for changed from selection - /// - /// sender object - /// some args + /// EventHandler for changed from selection. + /// Stubbfel, 15.10.2013. + /// sender object. + /// some args. private void FromSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (!this.init) @@ -248,9 +230,8 @@ namespace CampusAppWP8.Pages.Lecture this.To.ItemsSource = this.pageModel.ToNumberList.List; } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void ApiIsFail() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad); diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs index b7a08572..4864a549 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 11.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the modul web page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Lecture { using System; @@ -12,16 +13,15 @@ namespace CampusAppWP8.Pages.Lecture using CampusAppWP8.Resources; using Microsoft.Phone.Controls; - /// - /// Class for the page which shows Webpages from the BaseAddress - /// + /// A modul web page. + /// Stubbfel, 15.10.2013. + /// public partial class ModulWebPage : PhoneApplicationPage { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public ModulWebPage() { this.InitializeComponent(); @@ -31,10 +31,9 @@ namespace CampusAppWP8.Pages.Lecture #region Method - /// - /// Override the OnNavigatedTo method - /// - /// Arguments of navigation + /// Override the OnNavigatedTo method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ModulNumber)) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs index 30de8370..dd005180 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 11.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the result detail page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Lecture { using System.Windows.Navigation; @@ -12,16 +13,15 @@ namespace CampusAppWP8.Pages.Lecture using CampusAppWP8.Resources; using Microsoft.Phone.Controls; - /// - /// Class for the page which shows details of an activity - /// + /// Class for the page which shows details of an activity. + /// Stubbfel, 15.10.2013. + /// public partial class ResultDetailPage : PhoneApplicationPage { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public ResultDetailPage() { this.InitializeComponent(); @@ -32,10 +32,10 @@ namespace CampusAppWP8.Pages.Lecture #region Method #region protected - /// - /// Override the OnNavigatedTo method - /// - /// Arguments of navigation + + /// Override the OnNavigatedTo method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ActivityId)) @@ -51,10 +51,9 @@ namespace CampusAppWP8.Pages.Lecture #region private - /// - /// Method load a certain Activity from the model - /// - /// id of the activity + /// Method load a certain Activity from the model. + /// Stubbfel, 15.10.2013. + /// id of the activity. private void LoadActivity(int activityId) { LectureWp8List list = App.LoadFromIsolatedStorage(Constants.IsolatedStorage_LectureModel); diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs index 296593b0..4a99fffb 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 11.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the result page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Lecture { using System; @@ -16,16 +17,15 @@ namespace CampusAppWP8.Pages.Lecture using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; - /// - /// Class for the page which shows the results of an LectureRequest - /// + /// Class for the page which shows the results of an LectureRequest. + /// Stubbfel, 15.10.2013. + /// public partial class ResultPage : PhoneApplicationPage { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public ResultPage() { this.InitializeComponent(); @@ -35,10 +35,9 @@ namespace CampusAppWP8.Pages.Lecture #region Method - /// - /// Override the OnNavigatedTo method - /// - /// Arguments of navigation + /// Override the OnNavigatedTo method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); diff --git a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs index b4962976..0e3a5bac 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the link page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Links { using System; @@ -16,35 +17,28 @@ namespace CampusAppWP8.Pages.Links using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; - /// - /// Class for the LinkPage - /// + /// Class for the LinkPage. + /// Stubbfel, 15.10.2013. + /// public partial class LinkPage : PhoneApplicationPage { #region Members - /// - /// the feed of the CommonLinks - /// + /// the feed of the CommonLinks. private CommonLinkFeed commonLinkFeed; - /// - /// the feed of the ClubLinks - /// + /// the feed of the ClubLinks. private ClubLinkFeed clubLinkFeed; - /// - /// how many feeds are currently loading - /// + /// how many feeds are currently loading. private int loadingFeeds; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LinkPage() { this.InitializeComponent(); @@ -56,10 +50,9 @@ namespace CampusAppWP8.Pages.Links #region protected - /// - /// Override the OnNavigatedTo method - /// - /// Arguments of navigation + /// Override the OnNavigatedTo method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -77,10 +70,9 @@ namespace CampusAppWP8.Pages.Links this.clubLinkFeed.LoadData(Utilities.GetLoadModus()); } - /// - /// Override the OnNavigatedFrom method - /// - /// Arguments of navigation + /// Override the OnNavigatedFrom method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { this.clubLinkFeed.SaveData(); @@ -90,9 +82,8 @@ namespace CampusAppWP8.Pages.Links #endregion #region private - /// - /// Method initialize the Feeds - /// + /// Method initialize the Feeds. + /// Stubbfel, 15.10.2013. private void InitializeFeeds() { if (this.commonLinkFeed == null) @@ -106,9 +97,8 @@ namespace CampusAppWP8.Pages.Links } } - /// - /// Method initialize the CommonLinkFeed - /// + /// Method initialize the CommonLinkFeed. + /// Stubbfel, 15.10.2013. private void InitializeCommonLinkFeed() { this.commonLinkFeed = new CommonLinkFeed(); @@ -117,9 +107,8 @@ namespace CampusAppWP8.Pages.Links this.commonLinkFeed.OnFailedFile += new CommonLinkFeed.OnFailed(this.FeedIsFailFile); } - /// - /// Method initialize the ClubLinkFeed - /// + /// Method initialize the ClubLinkFeed. + /// Stubbfel, 15.10.2013. private void InitializeClubLinkFeed() { this.clubLinkFeed = new ClubLinkFeed(); @@ -128,46 +117,42 @@ namespace CampusAppWP8.Pages.Links this.clubLinkFeed.OnFailedFile += new ClubLinkFeed.OnFailed(this.FeedIsFailFile); } - /// - /// Method will be execute if the CommonLinkFeed is ready - /// + /// Method will be execute if the CommonLinkFeed is ready. + /// Stubbfel, 15.10.2013. private void CommonLinkFeedIsReady() { this.SetupCommonPivot(); this.SetupProgressBarVisibilityCollapsed(); } - /// - /// Method will be execute if the ClubLinkFeed is ready - /// + /// Method will be execute if the ClubLinkFeed is ready. + /// Stubbfel, 15.10.2013. private void ClubLinkFeedIsReady() { this.SetupClubPivot(); this.SetupProgressBarVisibilityCollapsed(); } - /// - /// Method set ItemSource for the CommonLinkPanel - /// + /// Method set ItemSource for the CommonLinkPanel. + /// Stubbfel, 15.10.2013. private void SetupCommonPivot() { this.CommonLinkPanel.ItemsSource = this.commonLinkFeed.Model.Links; } - /// - /// Method set ItemSource for the ClubLinkPanel - /// + /// Method set ItemSource for the ClubLinkPanel. + /// Stubbfel, 15.10.2013. private void SetupClubPivot() { this.ClubLinkPanel.ItemsSource = this.clubLinkFeed.Model.Links; } /// - /// On clicking the update button in the ApplicationBar. - /// Force a data update from the web. + /// On clicking the update button in the ApplicationBar. Force a data update from the web. /// - /// button object - /// event args + /// Stubbfel, 15.10.2013. + /// button object. + /// event args. private void LinkForceUpdate_Click(object sender, EventArgs e) { this.loadingFeeds = 2; @@ -177,27 +162,24 @@ namespace CampusAppWP8.Pages.Links this.clubLinkFeed.ForceWebUpdate(); } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void ClubLinkFeedIsFailWeb() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb); this.clubLinkFeed.ForceReadFile(); } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void CommonLinkFeedIsFailWeb() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb); this.commonLinkFeed.ForceReadFile(); } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void FeedIsFailFile() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile); @@ -205,8 +187,9 @@ namespace CampusAppWP8.Pages.Links } /// - /// Method set the visibility of the ProgressBar to Collapsed if loadingFeeds less then 1 + /// Method set the visibility of the ProgressBar to Collapsed if loadingFeeds less then 1. /// + /// Stubbfel, 15.10.2013. private void SetupProgressBarVisibilityCollapsed() { this.loadingFeeds--; @@ -216,11 +199,10 @@ namespace CampusAppWP8.Pages.Links } } - /// - /// Method handle OrientationPage - /// - /// Caller of the function - /// some EventArgs + /// Method handle OrientationPage. + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// some EventArgs. private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) { if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs index 0ee00176..ac8acaec 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs @@ -1,51 +1,43 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 04.05.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the mensa page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Mensa { using System; using System.Threading; using System.Windows; using System.Windows.Navigation; - using CampusAppWP8.Api.GeoApi; using CampusAppWP8.Feed.Mensa; using CampusAppWP8.Resources; using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; using CampusAppWPortalLib8.Model.Mensa; + using CampusAppWPortalLib8.Model.Settings; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; - using CampusAppWPortalLib8.Model.Settings; - /// - /// Class for the MensaPage - /// + /// Class for the MensaPage. + /// Stubbfel, 15.10.2013. + /// public partial class MensaPage : PhoneApplicationPage { #region Members - /// - /// the feed of the mensa - /// + /// the feed of the mensa. private MensaFeed feed; /// - /// Index representing the weekday of today - /// 0 - Monday(Default) - /// 1 - Tuesday - /// 2 - Wednesday - /// 3 - Thursday - /// 4 - Friday + /// Index representing the weekday of today 0 - Monday(Default) + /// 1 - Tuesday 2 - Wednesday 3 - Thursday 4 - Friday. /// private int selectedIndex; - /// - /// Flag indicate that the feed was refreshed - /// + /// Flag indicate that the feed was refreshed. private bool refreshed = false; /// @@ -53,18 +45,15 @@ namespace CampusAppWP8.Pages.Mensa /// // private CampusSpsApi campusApi; - /// - /// Flag for forcing webLoad - /// + /// Flag for forcing webLoad. private bool forceLoad = false; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public MensaPage() { this.InitializeComponent(); @@ -96,10 +85,9 @@ namespace CampusAppWP8.Pages.Mensa #region protected - /// - /// Override the OnNavigatedTo method - /// - /// Arguments of navigation + /// Override the OnNavigatedTo method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -108,13 +96,13 @@ namespace CampusAppWP8.Pages.Mensa { ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; } + this.InitializeFeed(); } - /// - /// Override the OnNavigatedFrom method - /// - /// Arguments of navigation + /// Override the OnNavigatedFrom method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { if (this.feed != null) @@ -154,9 +142,8 @@ namespace CampusAppWP8.Pages.Mensa } }*/ - /// - /// Method determine campus and load data from correct feed - /// + /// Method determine campus and load data from correct feed. + /// Stubbfel, 15.10.2013. private void DeterminCurrentCampusAndLoadFeed() { Campus mensaCampus = Utilities.DetermineCampus(); @@ -171,7 +158,6 @@ namespace CampusAppWP8.Pages.Mensa { this.Dispatcher.BeginInvoke(new Action(() => this.InitializeFeed(mensaCampus))); } - } else { @@ -192,10 +178,9 @@ namespace CampusAppWP8.Pages.Mensa this.campusApi.LoadData();*/ } - /// - /// Method initialize the Feed depends of a campus - /// - /// campus parameter + /// Method initialize the Feed depends of a campus. + /// Stubbfel, 15.10.2013. + /// campus parameter. private void InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus campus) { this.feed = MensaFeed.CreateCampusMensaFeed(campus); @@ -215,9 +200,8 @@ namespace CampusAppWP8.Pages.Mensa } } - /// - /// Method initialize the Feed - /// + /// Method initialize the Feed. + /// Stubbfel, 15.10.2013. private void InitializeFeed() { if (Settings.AppSetting.GeoWatchEnable) @@ -231,36 +215,32 @@ namespace CampusAppWP8.Pages.Mensa } } - /// - /// Method will be execute if the feed is ready - /// + /// Method will be execute if the feed is ready. + /// Stubbfel, 15.10.2013. private void FeedIsReady() { this.SetupMensaPivot(); this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void FeedIsFailWeb() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb); this.feed.ForceReadFile(); } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void FeedIsFailFile() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile); this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// - /// Method set ItemSource and SelectedIndex for the pivot - /// + /// Method set ItemSource and SelectedIndex for the pivot. + /// Stubbfel, 15.10.2013. private void SetupMensaPivot() { this.DefHeader.HeaderName = AppResources.MensaApp_Title + ": " + this.feed.Title; @@ -270,9 +250,8 @@ namespace CampusAppWP8.Pages.Mensa this.MensaPivot.SelectedIndex = this.selectedIndex; } - /// - /// Method create the IconsUrl for the meals - /// + /// Method create the IconsUrl for the meals. + /// Stubbfel, 15.10.2013. private void CreatesMealIcons() { foreach (MenuModel menus in this.feed.Model.Menus) @@ -316,9 +295,8 @@ namespace CampusAppWP8.Pages.Mensa } } - /// - /// Method calculate which pivot has to be selected - /// + /// Method calculate which pivot has to be selected. + /// Stubbfel, 15.10.2013. private void CalcSelectedIndex() { DayOfWeek today = DateTime.Now.DayOfWeek; @@ -349,11 +327,11 @@ namespace CampusAppWP8.Pages.Mensa } /// - /// On clicking the update button in the ApplicationBar. - /// Force a data update from the web. + /// On clicking the update button in the ApplicationBar. Force a data update from the web. /// - /// button object - /// event args + /// Stubbfel, 15.10.2013. + /// button object. + /// event args. private void MensaForceUpdate_Click(object sender, EventArgs e) { this.DefHeader.ProgressVisibility = Visibility.Visible; @@ -362,41 +340,40 @@ namespace CampusAppWP8.Pages.Mensa this.refreshed = true; } - /// Event handler. Called by ApplicationBarMenuItem for click events. - /// Stubbfel, 26.08.2013. - /// button object. - /// Event information. + /// Event handler. Called by ApplicationBarMenuItem for click events. + /// Stubbfel, 26.08.2013. + /// button object. + /// Event information. private void ApplicationBarMenuItem_Click(object sender, EventArgs e) { this.DefHeader.ProgressVisibility = Visibility.Visible; this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.CB_MAIN); } - /// Event handler. Called by ApplicationBarMenuItem2 for click events. - /// Stubbfel, 26.08.2013. - /// button object. - /// Event information. + /// Event handler. Called by ApplicationBarMenuItem2 for click events. + /// Stubbfel, 26.08.2013. + /// button object. + /// Event information. private void ApplicationBarMenuItem2_Click(object sender, EventArgs e) { this.DefHeader.ProgressVisibility = Visibility.Visible; this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.CB_SOUTH); } - /// Event handler. Called by ApplicationBarMenuItem3 for click events. - /// Stubbfel, 26.08.2013. - /// button object. - /// Event information. + /// Event handler. Called by ApplicationBarMenuItem3 for click events. + /// Stubbfel, 26.08.2013. + /// button object. + /// Event information. private void ApplicationBarMenuItem3_Click(object sender, EventArgs e) { this.DefHeader.ProgressVisibility = Visibility.Visible; this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.SFB_MAIN); } - /// - /// Method handle OrientationPage - /// - /// Caller of the function - /// some EventArgs + /// Method handle OrientationPage. + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// some EventArgs. private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) { if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) @@ -418,8 +395,9 @@ namespace CampusAppWP8.Pages.Mensa FrameworkElement frameelement = sender as FrameworkElement; if (frameelement == null) { - + return; } + string copyText = frameelement.Tag.ToString() + " (" + AppResources.Setting_UserCampus + " " + this.feed.Title + ")"; Clipboard.SetText(copyText); } diff --git a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs index 520f1d88..886c8239 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs @@ -1,14 +1,16 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 09.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the person page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Person { + using System.Collections.Generic; using System.Windows; + using System.Windows.Controls; using System.Windows.Input; using CampusAppWP8.Api.Person; using CampusAppWP8.Model.Person; @@ -18,24 +20,23 @@ namespace CampusAppWP8.Pages.Person using CampusAppWPortalLib8.Model.Utility; using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; - using System.Collections.Generic; - using System.Windows.Controls; - /// Person page. - /// Stubbfel, 09.09.2013. + /// Person page. + /// Stubbfel, 09.09.2013. + /// public partial class PersonPage : PhoneApplicationPage { #region Member - /// The API. + /// The API. private PersonSearchApi api; #endregion #region Constructor - /// Initializes a new instance of the PersonPage class. - /// Stubbfel, 09.09.2013. + /// Initializes a new instance of the PersonPage class. + /// Stubbfel, 09.09.2013. public PersonPage() { this.InitializeComponent(); @@ -45,10 +46,10 @@ namespace CampusAppWP8.Pages.Person #region Method - /// Sends a request. - /// Stubbfel, 09.09.2013. - /// Source of the event. - /// Routed event information. + /// Sends a request. + /// Stubbfel, 09.09.2013. + /// Source of the event. + /// Routed event information. private void SendRequest(object sender, RoutedEventArgs e) { string query = this.SearchName.Text.Trim(); @@ -66,10 +67,10 @@ namespace CampusAppWP8.Pages.Person this.api.LoadData(); } - /// Creates URL parameter. - /// Stubbfel, 09.09.2013. - /// The name. - /// The new URL parameter. + /// Creates URL parameter. + /// Stubbfel, 09.09.2013. + /// The name. + /// The new URL parameter. private List CreateUrlParameter(string name) { List parameterList = new List(); @@ -77,24 +78,24 @@ namespace CampusAppWP8.Pages.Person return parameterList; } - /// API is fail. - /// Stubbfel, 09.09.2013. + /// API is fail. + /// Stubbfel, 09.09.2013. private void ApiIsFail() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad); this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// API is ready. - /// Stubbfel, 09.09.2013. + /// API is ready. + /// Stubbfel, 09.09.2013. private void ApiIsReady() { this.SetupResultBox(); this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// Sets up the result box. - /// Stubbfel, 09.09.2013. + /// Sets up the result box. + /// Stubbfel, 09.09.2013. private void SetupResultBox() { this.api.Model.RemoveNonFunctionAndSetIdsPerson(); @@ -105,10 +106,10 @@ namespace CampusAppWP8.Pages.Person } } - /// Event handler. Called by Button for click events. - /// Stubbfel, 09.09.2013. - /// Source of the event. - /// Routed event information. + /// Event handler. Called by Button for click events. + /// Stubbfel, 09.09.2013. + /// Source of the event. + /// Routed event information. private void Button_Click(object sender, RoutedEventArgs e) { AddPersonButton btn = sender as AddPersonButton; @@ -144,20 +145,23 @@ namespace CampusAppWP8.Pages.Person saveContactTask.Show(); } + /// Event handler. Called by SearchName for key down events. + /// Stubbfel, 15.10.2013. + /// Source of the event. + /// Key event information. private void SearchName_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Enter) { - this.SendRequest(sender,e); + this.SendRequest(sender, e); this.ResultBox.Focus(); } } - /// - /// Method is called when the selection in the listbox is changed. - /// - /// listbox object. - /// event args. + /// Method is called when the selection in the ListBox is changed. + /// Stubbfel, 15.10.2013. + /// ListBox object. + /// event args. private void Box_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { (sender as ListBox).SelectedIndex = -1; diff --git a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs index e4a529f5..0bd1f127 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs @@ -1,16 +1,17 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 09.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the place news.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.PlaceNews { using System; using System.Collections.Generic; using System.Linq; + using System.Runtime.InteropServices.WindowsRuntime; using System.Threading; using System.Windows; using System.Windows.Controls; @@ -21,49 +22,50 @@ namespace CampusAppWP8.Pages.PlaceNews using CampusAppWP8.Resources; using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; + using CampusAppWP8.Utility.NDEF; using Microsoft.Phone.Controls; using Windows.Networking.Proximity; - using CampusAppWP8.Utility.NDEF; - using System.Runtime.InteropServices.WindowsRuntime; - using Microsoft.Phone.Shell; - /// Place news. - /// Stubbfel, 09.09.2013. + /// Place news. + /// Stubbfel, 09.09.2013. + /// public partial class PlaceNews : PhoneApplicationPage { #region Member - /// The sps API. + + /// The device. + private readonly ProximityDevice device = ProximityDevice.GetDefault(); + + /// The sps API. private SpsApi spsApi; - /// The pis API. + /// The pis API. private PisApi pisApi; - /// The pss API. + /// The pss API. private PssApi pssApi; - /// The places. + /// The places. private PlacesFile places; - /// variable indicates how many apis are running. + /// variable indicates how many apis are running. private int waitForApi; - /// true to force request. + /// true to force request. private bool forceRequest; - /// List of search pids. + /// List of search pids. private List searchPidList; + /// true to qr scan. private bool qrScan = false; - /// The device. - private readonly ProximityDevice device = ProximityDevice.GetDefault(); - #endregion #region Constructor - /// Initializes a new instance of the PlaceNews class. - /// Stubbfel, 09.09.2013. + /// Initializes a new instance of the PlaceNews class. + /// Stubbfel, 09.09.2013. public PlaceNews() { this.InitializeComponent(); @@ -76,9 +78,9 @@ namespace CampusAppWP8.Pages.PlaceNews #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. + /// Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. + /// Stubbfel, 09.09.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -91,9 +93,9 @@ namespace CampusAppWP8.Pages.PlaceNews this.places.Model = App.LoadFromIsolatedStorage(Constants.IsolatedStorage_AllPlaces); } - if (qrScan) + if (this.qrScan) { - qrScan = false; + this.qrScan = false; string qrResult = App.LoadFromIsolatedStorage("PlaceNewsQCCode"); App.SaveToIsolatedStorage("PlaceNewsQCCode", null); @@ -108,7 +110,6 @@ namespace CampusAppWP8.Pages.PlaceNews { this.SetupResultBox(); } - } else { @@ -124,8 +125,8 @@ namespace CampusAppWP8.Pages.PlaceNews /// /// Wird aufgerufen, wenn eine Seite nicht mehr die aktive Seite in einem Frame ist. /// - /// Stubbfel, 09.09.2013. - /// Ein Objekt, das die Ereignisdaten enthält. + /// Stubbfel, 09.09.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { if (NavigationMode.Back == e.NavigationMode) @@ -138,8 +139,8 @@ namespace CampusAppWP8.Pages.PlaceNews #region private - /// Initializes the API. - /// Stubbfel, 09.09.2013. + /// Initializes the API. + /// Stubbfel, 09.09.2013. private void InitializeApi() { // init place file @@ -158,7 +159,6 @@ 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); - } if (this.forceRequest) @@ -195,8 +195,8 @@ namespace CampusAppWP8.Pages.PlaceNews } } - /// Places file is fail. - /// Stubbfel, 09.09.2013. + /// Places file is fail. + /// Stubbfel, 09.09.2013. private void PlacesFileIsFail() { this.places.Model = new SpsModel(); @@ -212,8 +212,8 @@ namespace CampusAppWP8.Pages.PlaceNews this.waitForApi++; } - /// Places file is ready. - /// Stubbfel, 09.09.2013. + /// Places file is ready. + /// Stubbfel, 09.09.2013. private void PlacesFileIsReady() { if (this.spsApi == null) @@ -228,8 +228,8 @@ namespace CampusAppWP8.Pages.PlaceNews this.waitForApi++; } - /// Pss API is ready. - /// Stubbfel, 09.09.2013. + /// Pss API is ready. + /// Stubbfel, 09.09.2013. private void PssApiIsReady() { this.waitForApi--; @@ -238,8 +238,8 @@ namespace CampusAppWP8.Pages.PlaceNews this.CheckedSetupResultBox(); } - /// Pis API is ready. - /// Stubbfel, 09.09.2013. + /// Pis API is ready. + /// Stubbfel, 09.09.2013. private void PisApiIsReady() { this.waitForApi--; @@ -248,8 +248,8 @@ namespace CampusAppWP8.Pages.PlaceNews this.CheckedSetupResultBox(); } - /// API is fail. - /// Stubbfel, 09.09.2013. + /// API is fail. + /// Stubbfel, 09.09.2013. private void ApiIsFail() { if (this.Dispatcher != null) @@ -259,25 +259,26 @@ namespace CampusAppWP8.Pages.PlaceNews } } - /// Sps API is ready. - /// Stubbfel, 09.09.2013. + /// Sps API is ready. + /// Stubbfel, 09.09.2013. private void SpsApiIsReady() { this.waitForApi--; - if (spsApi.Model.Places.Count > 0) + if (this.spsApi.Model.Places.Count > 0) { this.places.Model.AddPlaces(this.spsApi.Model.Places.ToList()); this.searchPidList = this.spsApi.Model.CreatePidList(); this.SendGetPisPssForPlacenews(this.searchPidList); } + this.CheckedSetupResultBox(); } - - /// - /// send get request to pis andd pss for PlaceNews service - /// - /// list of place id - private void SendGetPisPssForPlacenews(List pidList) { + + /// send get request to pis and pss for PlaceNews service. + /// Stubbfel, 15.10.2013. + /// list of place id. + private void SendGetPisPssForPlacenews(List pidList) + { List infoNames = new List() { Constants.PisInformationName_Name }; List serviceNames = new List() { Constants.PssServiceName_PlaceNews }; @@ -288,14 +289,13 @@ namespace CampusAppWP8.Pages.PlaceNews this.SendGetPlaceService(this.searchPidList, serviceNames); this.CheckedSetupResultBox(); - } - /// - /// Method send get for PlaceInformation of certain places - /// - /// list of place id - /// list of informations name - /// if its true then force api load + + /// Method send get for PlaceInformation of certain places. + /// Stubbfel, 15.10.2013. + /// list of place id. + /// list of information names. + /// (Optional) if its true then force api load. private void SendGetPlaceInformation(List pidList, List infoNames, bool force = false) { if (force || !this.places.Model.ContainsInformationNames(pidList, infoNames)) @@ -306,12 +306,11 @@ namespace CampusAppWP8.Pages.PlaceNews } } - /// - /// Method send get for PlaceSetvice of certain places - /// - /// list of place id - /// list of service name - /// if its true then force api load + /// Method send get for PlaceService of certain places. + /// Stubbfel, 15.10.2013. + /// list of place id. + /// list of service name. + /// (Optional) if its true then force api load. private void SendGetPlaceService(List pidList, List serviceNames, bool force = false) { if (this.forceRequest || !this.places.Model.ContainsServiceNames(pidList, serviceNames)) @@ -322,8 +321,8 @@ namespace CampusAppWP8.Pages.PlaceNews } } - /// Sets up the result box. - /// Stubbfel, 09.09.2013. + /// Sets up the result box. + /// Stubbfel, 09.09.2013. private void SetupResultBox() { this.ResultBox.ItemsSource = this.places.Model.FilterByPid(this.searchPidList); @@ -333,10 +332,10 @@ namespace CampusAppWP8.Pages.PlaceNews this.forceRequest = false; } - /// Event handler. Called by UpdateButtonAppBar for click events. - /// Stubbfel, 09.09.2013. - /// Source of the event. - /// Event information. + /// Event handler. Called by UpdateButtonAppBar for click events. + /// Stubbfel, 09.09.2013. + /// Source of the event. + /// Event information. private void UpdateButtonAppBar_Click(object sender, EventArgs e) { this.ProgressBar.Visibility = Visibility.Visible; @@ -344,8 +343,8 @@ namespace CampusAppWP8.Pages.PlaceNews thread.Start(); } - /// Initialises the API current position force. - /// Stubbfel, 09.09.2013. + /// Initialises the API current position force. + /// Stubbfel, 09.09.2013. private void InitApiCurrentPositionForce() { Utilities.DetermineAndStoreCurrentPositionForce(); @@ -353,10 +352,10 @@ namespace CampusAppWP8.Pages.PlaceNews this.InitializeApi(); } - /// Event handler. Called by ApplicationBarMenuItem for click events. - /// Stubbfel, 09.09.2013. - /// Source of the event. - /// Event information. + /// Event handler. Called by ApplicationBarMenuItem for click events. + /// Stubbfel, 09.09.2013. + /// Source of the event. + /// Event information. private void ApplicationBarMenuItem_Click(object sender, EventArgs e) { this.qrScan = true; @@ -366,18 +365,18 @@ namespace CampusAppWP8.Pages.PlaceNews this.NavigationService.Navigate(url); } - /// Event handler. Called by ApplicationBarMenuItem_Click for 1 events. - /// Stubbfel, 09.09.2013. - /// Source of the event. - /// Event information. + /// Event handler. Called by ApplicationBarMenuItem_Click for 1 events. + /// Stubbfel, 09.09.2013. + /// Source of the event. + /// Event information. private void ApplicationBarMenuItem_Click_1(object sender, EventArgs e) { this.ProgressBar.Visibility = Visibility.Visible; this.device.SubscribeForMessage("NDEF", this.NDEFHandler); } - /// Checked setup result box. - /// Stubbfel, 10.09.2013. + /// Checked setup result box. + /// Stubbfel, 10.09.2013. private void CheckedSetupResultBox() { if (this.waitForApi < 1) @@ -395,11 +394,10 @@ namespace CampusAppWP8.Pages.PlaceNews #endregion - /// - /// Method set correct text of the TextBlock - /// - /// sender of the event - /// some args + /// Method set correct text of the TextBlock. + /// Stubbfel, 15.10.2013. + /// sender of the event. + /// some args. private void TextBlock_Loaded(object sender, RoutedEventArgs e) { TextBlock txt = sender as TextBlock; @@ -418,10 +416,10 @@ namespace CampusAppWP8.Pages.PlaceNews txt.Text = place.GetInformationsValue(Constants.PisInformationName_Name); } - /// Handler, called when the ndef. - /// Stubbfel, 22.08.2013. - /// The sender. - /// The message. + /// Handler, called when the ndef. + /// Stubbfel, 22.08.2013. + /// The sender. + /// The message. private void NDEFHandler(ProximityDevice sender, ProximityMessage message) { this.device.StopSubscribingForMessage(message.SubscriptionId); @@ -436,6 +434,7 @@ namespace CampusAppWP8.Pages.PlaceNews this.searchPidList = new List() { pid }; this.SendGetPisPssForPlacenews(this.searchPidList); } + // this.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show(ndef.GetContent()))); } #endregion diff --git a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs index 31828bcc..d26c4b46 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/ShowPad.xaml.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 09.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the show pad.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.PlaceNews { using System; @@ -14,14 +14,15 @@ namespace CampusAppWP8.Pages.PlaceNews using CampusAppWP8.Resources; using Microsoft.Phone.Controls; - /// Show pad. - /// Stubbfel, 09.09.2013. + /// Show pad. + /// Stubbfel, 09.09.2013. + /// public partial class ShowPad : PhoneApplicationPage { #region Constructor - /// Initializes a new instance of the ShowPad class. - /// Stubbfel, 09.09.2013. + /// Initializes a new instance of the ShowPad class. + /// Stubbfel, 09.09.2013. public ShowPad() { this.InitializeComponent(); @@ -31,9 +32,9 @@ namespace CampusAppWP8.Pages.PlaceNews #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. + /// Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. + /// Stubbfel, 09.09.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { if (NavigationContext.QueryString.ContainsKey(Constants.ParamPlaceID)) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml index 1f9a6b1a..86a74b13 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml @@ -46,7 +46,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs index 9239915d..1537d0a4 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs @@ -1,30 +1,31 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 12.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the application setting page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Setting { - using System.Windows.Navigation; - using Microsoft.Phone.Controls; + using System; + using System.Windows.Navigation; using CampusApp8.Model.Setting; - using System; + using Microsoft.Phone.Controls; - /// - /// Class for the AppSettingPage - /// + /// Class for the AppSettingPage. + /// Stubbfel, 15.10.2013. + /// public partial class AppSettingPage : PhoneApplicationPage { #region Member + /// The TagHandler model. private TagHandlerListPickerItemListModel taghandlerModel; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public AppSettingPage() { this.InitializeComponent(); @@ -40,10 +41,9 @@ namespace CampusAppWP8.Pages.Setting #region Method - /// - /// Override the OnNavigatedFrom method - /// - /// Arguments of navigation + /// Override the OnNavigatedFrom method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { if (NavigationMode.Back == e.NavigationMode) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/Impressum.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Setting/Impressum.xaml.cs index 539a75dd..2adc476f 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Setting/Impressum.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/Impressum.xaml.cs @@ -1,17 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Navigation; +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// Stubbfel +// 15.10.2013 +// Implements the impressum.xaml class +//----------------------------------------------------------------------- using Microsoft.Phone.Controls; -using Microsoft.Phone.Shell; namespace CampusAppWP8.Pages.Setting { + /// An impressum. + /// Stubbfel, 15.10.2013. + /// public partial class Impressum : PhoneApplicationPage { + /// Initializes a new instance of the Impressum class. + /// Stubbfel, 15.10.2013. public Impressum() { InitializeComponent(); diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs index 6436902b..95dcd530 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 23.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the user profil.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Setting { using System; @@ -12,32 +13,29 @@ namespace CampusAppWP8.Pages.Setting using System.Windows.Navigation; using CampusAppWP8.Model.Setting; using CampusAppWP8.Model.Utility; + using CampusAppWPortalLib8.Model.Utility; using CampusAppWPortalLib8.Utility; using Microsoft.Phone.Controls; - using CampusAppWPortalLib8.Model.Utility; - /// - /// Class for the UserProfilePage - /// + /// Class for the UserProfilePage. + /// Stubbfel, 15.10.2013. + /// public partial class UserProfil : PhoneApplicationPage { #region Member - /// - /// Reference of the profileFile - /// + /// Reference of the profileFile. private UserProfilModel userProfil; - /// List of courses. + /// List of courses. private CourseListPickerItemListWp8Model courseList; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public UserProfil() { this.InitializeComponent(); @@ -51,10 +49,9 @@ namespace CampusAppWP8.Pages.Setting #region protected - /// - /// Override the OnNavigatedFrom method - /// - /// Arguments of navigation + /// Override the OnNavigatedFrom method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { if (NavigationMode.Back == e.NavigationMode) @@ -67,8 +64,8 @@ namespace CampusAppWP8.Pages.Setting #region private - /// Loads list picker. - /// Stubbfel, 10.09.2013. + /// Loads list picker. + /// Stubbfel, 10.09.2013. private void LoadListPicker() { this.DefHeader.ProgressVisibility = Visibility.Visible; @@ -77,9 +74,8 @@ namespace CampusAppWP8.Pages.Setting this.courseList.LoadCourseList(); } - /// - /// Method sets the ItemSource of the ListPickers - /// + /// Method sets the ItemSource of the ListPickers. + /// Stubbfel, 15.10.2013. private void SetupListPickers() { DegreeListPickerItemListModel degreeList = new DegreeListPickerItemListModel(); @@ -101,9 +97,8 @@ namespace CampusAppWP8.Pages.Setting this.DefHeader.ProgressVisibility = Visibility.Collapsed; } - /// - /// Method save the current profile - /// + /// Method save the current profile. + /// Stubbfel, 15.10.2013. private void SaveProfile() { try diff --git a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs index 8e0c4389..d7d1ba75 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs @@ -1,22 +1,22 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 21.05.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the start page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages { using System; - using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using System.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; - using Windows.Networking.Proximity; using CampusAppWP8.Feed.Utility; using CampusAppWP8.File.Places; + using CampusAppWP8.Model.Setting; using CampusAppWP8.Resources; using CampusAppWP8.Utility; using CampusAppWP8.Utility.Lui.MessageBoxes; @@ -24,30 +24,33 @@ namespace CampusAppWP8.Pages using CampusAppWP8.Utility.NDEF; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; - using CampusAppWP8.Model.Setting; + using Windows.Networking.Proximity; - /// - /// Class for the StartPage - /// + /// Class for the StartPage. + /// Stubbfel, 15.10.2013. + /// public partial class StartPage : PhoneApplicationPage { #region Member - /// The device. + /// The device. private readonly ProximityDevice device = ProximityDevice.GetDefault(); - /// List of initialise courses. + /// List of initialise courses. private CourseFeed initCourseList; + /// The previous orientation. private PageOrientation prevOrientation; + /// Identifier for the ndef. + private long ndefId; + #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public StartPage() { this.InitializeComponent(); @@ -82,7 +85,6 @@ namespace CampusAppWP8.Pages { menuItem5.Text = AppResources.Setting_ImpressumTitle; } - else { ApplicationBar.MenuItems.RemoveAt(ApplicationBar.MenuItems.Count - 1); @@ -91,7 +93,7 @@ namespace CampusAppWP8.Pages if (!Settings.AppSetting.InitApp) { - this.initPlaceFile(); + this.InitPlaceFile(); this.initCourseList = new CourseFeed(); this.initCourseList.OnLoaded += new CourseFeed.OnIO(this.StoreCourseFeed); this.initCourseList.LoadData(); @@ -107,24 +109,15 @@ namespace CampusAppWP8.Pages } } - private void initPlaceFile() - { - PlacesFile file = new PlacesFile(); - file.LoadData(); - } - - private long ndefId; - #endregion #region Method #region protected - /// - /// Methods overrides the OnNavigatedTo-Method - /// - /// some NavigationEventArgs + /// Methods overrides the OnNavigatedTo-Method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -137,16 +130,15 @@ namespace CampusAppWP8.Pages this.prevOrientation = PageOrientation.Landscape; } - ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler); + this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler); } - /// - /// Methods overrides the OnNavigatedFrom-Method - /// - /// some NavigationEventArgs + /// Methods overrides the OnNavigatedFrom-Method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { - this.device.StopSubscribingForMessage(ndefId); + this.device.StopSubscribingForMessage(this.ndefId); base.OnNavigatedFrom(e); } @@ -155,18 +147,25 @@ namespace CampusAppWP8.Pages #region private - /// Stores course feed. - /// Stubbfel, 10.09.2013. + /// Initialises the place file. + /// Stubbfel, 15.10.2013. + private void InitPlaceFile() + { + PlacesFile file = new PlacesFile(); + file.LoadData(); + } + + /// Stores course feed. + /// Stubbfel, 10.09.2013. private void StoreCourseFeed() { this.initCourseList.SaveData(); } - /// - /// Method handle OrientationPage - /// - /// Caller of the function - /// some EventArgs + /// Method handle OrientationPage. + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// some EventArgs. private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) { // Switch the placement of the buttons based on an orientation change. @@ -203,8 +202,8 @@ namespace CampusAppWP8.Pages } } - /// Move to Portrait format. - /// Stubbfel, 27.08.2013. + /// Move to Portrait format. + /// Stubbfel, 27.08.2013. private void MoveToPortrait() { if (!this.Row0.Children.Contains(this.MailAppButton) @@ -213,6 +212,7 @@ namespace CampusAppWP8.Pages { return; } + this.Row0.Children.Remove(this.MailAppButton); this.Row3.Children.Add(this.MailAppButton); this.MailAppButton.SetValue(Grid.ColumnProperty, 0); @@ -226,8 +226,8 @@ namespace CampusAppWP8.Pages this.LinkAppButton.SetValue(Grid.ColumnProperty, 2); } - /// Move Grid to landscape format. - /// Stubbfel, 27.08.2013. + /// Move Grid to landscape format. + /// Stubbfel, 27.08.2013. private void MoveGridToLandscape() { if (!this.Row3.Children.Contains(this.MailAppButton) @@ -238,7 +238,7 @@ namespace CampusAppWP8.Pages } this.Row3.Children.Remove(this.MailAppButton); - this.Row0.Children.Add(this.MailAppButton); ; + this.Row0.Children.Add(this.MailAppButton); this.MailAppButton.SetValue(Grid.ColumnProperty, 3); this.Row3.Children.Remove(this.OpenHoursAppButton); @@ -250,33 +250,30 @@ namespace CampusAppWP8.Pages this.LinkAppButton.SetValue(Grid.ColumnProperty, 3); } - /// - /// Method Navigate to - /// - /// Caller of the function - /// some EventArgs + /// Method Navigate to + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// some EventArgs. private void ApplicationBarMenuItem_Click(object sender, EventArgs e) { Uri url = new Uri(Constants.PathSetting_User, UriKind.Relative); NavigationService.Navigate(url); } - /// - /// Method Navigate to - /// - /// Caller of the function - /// some EventArgs + /// Method Navigate to + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// some EventArgs. private void ApplicationBarMenuItem2_Click(object sender, EventArgs e) { Uri url = new Uri(Constants.PathSetting_App, UriKind.Relative); NavigationService.Navigate(url); } - /// - /// Method Navigate to - /// - /// Caller of the function - /// some EventArgs + /// Method Navigate to + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// some EventArgs. private void ApplicationBarMenuItem4_Click(object sender, EventArgs e) { this.device.StopSubscribingForMessage(this.ndefId); @@ -290,25 +287,23 @@ namespace CampusAppWP8.Pages private void ApplicationBarMenuItem5_Click(object sender, EventArgs e) { Uri url = new Uri("/Pages/Setting/Impressum.xaml", UriKind.Relative); - NavigationService.Navigate(url); + NavigationService.Navigate(url); } - /// - /// Event handler. Called by ApplicationBarMenuItem4 for click events. - /// - /// Caller of the function. - /// Event information. + /// Event handler. Called by ApplicationBarMenuItem4 for click events. + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// Event information. private void ApplicationBarMenuItem3_Click(object sender, EventArgs e) { Uri url = new Uri("/Pages/Dev/QRScanner.xaml", UriKind.Relative); NavigationService.Navigate(url); } - /// - /// Method change the Opacity of the ApplicationBar - /// - /// Caller of the function - /// some EventArgs + /// Method change the Opacity of the ApplicationBar. + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// some EventArgs. private void ApplicationBar_StateChanged(object sender, ApplicationBarStateChangedEventArgs e) { if (e.IsMenuVisible) @@ -321,17 +316,15 @@ namespace CampusAppWP8.Pages } } - /// - /// Method show all OptIns - /// + /// Method show all OptIns. + /// Stubbfel, 15.10.2013. private void ShowOptIns() { this.GeoWatchOptIN(); } - /// - /// Method show the GeoWatchOptIn in a MessageBox - /// + /// Method show the GeoWatchOptIn in a MessageBox. + /// Stubbfel, 15.10.2013. private void GeoWatchOptIN() { MessageBoxResult result = MessageBoxes.ShowGoeWatchOptInBox(); @@ -348,6 +341,10 @@ namespace CampusAppWP8.Pages } } + /// Event handler. Called by PintoStart for click events. + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// Routed event information. private void PintoStart_Click(object sender, RoutedEventArgs e) { FrameworkElement elment = sender as FrameworkElement; @@ -404,9 +401,12 @@ namespace CampusAppWP8.Pages TileCreator.CreatePlaceNewsTile(); break; } - } + /// Handler, called when the ndef. + /// Stubbfel, 15.10.2013. + /// Caller of the function. + /// The message. private void NDEFHandler(ProximityDevice sender, ProximityMessage message) { // create ndefMessage @@ -433,10 +433,13 @@ namespace CampusAppWP8.Pages this.ShowBtuTagMessageBox(); } } - - ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler); + + this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler); } + /// Go to campus MapPage. + /// Stubbfel, 15.10.2013. + /// The tag content. private void GoToCampusMappage(string tagContent) { string pid = Wp8StringManager.FilterPlaceIdinNFCResultString(tagContent); @@ -452,9 +455,10 @@ namespace CampusAppWP8.Pages { NavigationService.Navigate(url); } - } + /// Shows the btu tag message box. + /// Stubbfel, 15.10.2013. private void ShowBtuTagMessageBox() { MessageBoxResult msgResult = MessageBoxes.ShowBtuTagInfoOkCancelMessageBox(); diff --git a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs index a1ea39e0..81615043 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 03.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the student council page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.StudentCouncil { using System; @@ -16,25 +17,22 @@ namespace CampusAppWP8.Pages.StudentCouncil using CampusAppWP8.Utility.Lui.MessageBoxes; using Microsoft.Phone.Controls; - /// - /// Class for the StudentCouncilPage - /// + /// Class for the StudentCouncilPage. + /// Stubbfel, 15.10.2013. + /// public partial class StudentCouncilPage : PhoneApplicationPage { #region Members - /// - /// the feed of the StudentCouncil - /// + /// the feed of the StudentCouncil. private StudentCouncilFeed feed; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public StudentCouncilPage() { this.InitializeComponent(); @@ -47,10 +45,9 @@ namespace CampusAppWP8.Pages.StudentCouncil #region protected - /// - /// Override the OnNavigatedTo method - /// - /// Arguments of navigation + /// Override the OnNavigatedTo method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); @@ -69,19 +66,17 @@ namespace CampusAppWP8.Pages.StudentCouncil this.feed.LoadData(Utilities.GetLoadModus()); } - /// - /// Override the OnNavigatedFrom method - /// - /// Arguments of navigation + /// Override the OnNavigatedFrom method. + /// Stubbfel, 15.10.2013. + /// protected override void OnNavigatedFrom(NavigationEventArgs e) { this.feed.SaveData(); } - /// - /// Override the OnOrientationChanged method. - /// - /// orientation changed args. + /// Override the OnOrientationChanged method. + /// Stubbfel, 15.10.2013. + /// protected override void OnOrientationChanged(OrientationChangedEventArgs e) { if (e.Orientation == PageOrientation.Landscape @@ -101,9 +96,8 @@ namespace CampusAppWP8.Pages.StudentCouncil #endregion #region private - /// - /// Method initialize the Feed - /// + /// Method initialize the Feed. + /// Stubbfel, 15.10.2013. private void InitializeFeed() { this.feed = new StudentCouncilFeed(); @@ -112,47 +106,43 @@ namespace CampusAppWP8.Pages.StudentCouncil this.feed.OnFailedFile += new StudentCouncilFeed.OnFailed(this.FeedIsFailFile); } - /// - /// Method will be execute if the feed is ready - /// + /// Method will be execute if the feed is ready. + /// Stubbfel, 15.10.2013. private void FeedIsReady() { this.SetupStudentCouncilPivot(); this.DefHeader.ProgressVisibility = System.Windows.Visibility.Collapsed; } - /// - /// Method set ItemSource - /// + /// Method set ItemSource. + /// Stubbfel, 15.10.2013. private void SetupStudentCouncilPivot() { this.StudentCouncilPivot.ItemsSource = this.feed.Model.GetStudentCouncilsGroupByFaculty(); } /// - /// On clicking the update button in the ApplicationBar. - /// Force a data update from the web. + /// On clicking the update button in the ApplicationBar. Force a data update from the web. /// - /// button object - /// event args + /// Stubbfel, 15.10.2013. + /// button object. + /// event args. private void StudentForceUpdate_Click(object sender, EventArgs e) { this.DefHeader.ProgressVisibility = System.Windows.Visibility.Visible; this.feed.ForceWebUpdate(); } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void FeedIsFailWeb() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb); this.feed.ForceReadFile(); } - /// - /// Method will be execute if the feed is failed - /// + /// Method will be execute if the feed is failed. + /// Stubbfel, 15.10.2013. private void FeedIsFailFile() { MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile); diff --git a/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs index 0344e9d7..af68dc3e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs @@ -1,26 +1,26 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 12.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the webmail page.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Pages.Webmail { using System; using CampusAppWP8.Resources; using Microsoft.Phone.Controls; - /// - /// Class for the WebmailPage - /// + /// Class for the WebmailPage. + /// Stubbfel, 15.10.2013. + /// public partial class WebmailPage : PhoneApplicationPage { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public WebmailPage() { this.InitializeComponent(); @@ -31,9 +31,8 @@ namespace CampusAppWP8.Pages.Webmail #region Method - /// - /// Method load WebmailPage - /// + /// Method load WebmailPage. + /// Stubbfel, 15.10.2013. private void LoadWebmailPage() { this.WebmailBrowser.Navigate(new Uri(Constants.UrlWebMail_Addr, UriKind.Absolute)); diff --git a/CampusAppWP8/CampusAppWP8/Settings.StyleCop b/CampusAppWP8/CampusAppWP8/Settings.StyleCop index bf58560e..8c4162bf 100644 --- a/CampusAppWP8/CampusAppWP8/Settings.StyleCop +++ b/CampusAppWP8/CampusAppWP8/Settings.StyleCop @@ -5,6 +5,7 @@ api apis enum + fiedlchr initialise initialises ndef @@ -22,11 +23,19 @@ sps Stubbfel uni + wc wifi + + + + False + + + BTU/IIT The MIT License (MIT). Copyright (c) 2013 BTU/IIT. diff --git a/CampusAppWP8/CampusAppWP8/Utility/AppUriMapper.cs b/CampusAppWP8/CampusAppWP8/Utility/AppUriMapper.cs index c37ee3c8..16a95862 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/AppUriMapper.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/AppUriMapper.cs @@ -1,28 +1,25 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 26.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the application URI mapper class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility { using System; using System.Windows.Navigation; using CampusAppWP8.Resources; - using System.Windows.Controls; - - /// - /// Class map Uri to AppPages - /// + + /// Class map Uri to AppPages. + /// Stubbfel, 15.10.2013. + /// public class AppUriMapper : UriMapperBase { - /// - /// Method overrides MapUri from UriMapperBase - /// - /// the url - /// the mapped url + /// Method overrides MapUri from UriMapperBase. + /// Stubbfel, 15.10.2013. + /// public override Uri MapUri(Uri uri) { string tempUri = uri.ToString(); diff --git a/CampusAppWP8/CampusAppWP8/Utility/BackgroundTasks.cs b/CampusAppWP8/CampusAppWP8/Utility/BackgroundTasks.cs index 753d7939..940b7ce9 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/BackgroundTasks.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/BackgroundTasks.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 18.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the background tasks class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility { using System; @@ -13,16 +13,15 @@ namespace CampusAppWP8.Utility using CampusAppWPortalLib8.Utility; using Microsoft.Phone.Scheduler; - /// - /// Class provide some static methods for background tasks - /// + /// Class provide some static methods for background tasks. + /// Stubbfel, 15.10.2013. + /// public class BackgroundTasks : AbstractBackgroundTasks { - /// - /// Method start a certain PerodicTask - /// - /// name of the task - /// description of the task + /// Method start a certain PerodicTask. + /// Stubbfel, 15.10.2013. + /// name of the task. + /// description of the task. public static void StartPerodicTask(string taskName, string taskDesc) { BackgroundTasks.StopPerodicTask(BackgroundTasks.LastAddedTaskName); @@ -48,10 +47,9 @@ namespace CampusAppWP8.Utility BackgroundTasks.LastAddedTaskName = taskName; } - /// - /// Method stop a certain PerodicTask - /// - /// name of the task + /// Method stop a certain PerodicTask. + /// Stubbfel, 15.10.2013. + /// name of the task. public static void StopPerodicTask(string taskName) { if (taskName == null) @@ -73,22 +71,19 @@ namespace CampusAppWP8.Utility } } - /// - /// Method start BTUCampusAppBackgroundTask - /// + /// Method start BTUCampusAppBackgroundTask. + /// Stubbfel, 15.10.2013. public static void StartBTUCampusAppTask() { int campusId = (int)Settings.UserProfil.DefaultCampus; BackgroundTasks.StartPerodicTask(Constants.BackgroundTask_BTUCampusApp, AppResources.BackGroundTaskDesc_BTUCampusApp + " - Feed " + campusId); } - /// - /// Method stop BTUCampusAppBackgroundTask - /// + /// Method stop BTUCampusAppBackgroundTask. + /// Stubbfel, 15.10.2013. public static void StopBTUCampusAppTask() { BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_BTUCampusApp); } - } } diff --git a/CampusAppWP8/CampusAppWP8/Utility/BoolToVisibilityConverter.cs b/CampusAppWP8/CampusAppWP8/Utility/BoolToVisibilityConverter.cs index 83ed3adc..c8723978 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/BoolToVisibilityConverter.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/BoolToVisibilityConverter.cs @@ -1,23 +1,38 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 10.10.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements to visibility converter class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility { using System; using System.Windows; using System.Windows.Data; + /// to visibility converter. + /// fiedlchr, 15.10.2013. + /// public sealed class BoolToVisibilityConverter : IValueConverter { + /// + /// Ändert die Quelldaten vor der Übergabe an das Ziel zur Anzeige in der Benutzeroberfläche. + /// + /// fiedlchr, 15.10.2013. + /// public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo language) { return (value is bool && (bool)value) ? Visibility.Visible : Visibility.Collapsed; } + /// + /// Ändert die Zieldaten vor der Übergabe an das Quellobjekt. Diese Methode wird nur in + /// -Bindungen aufgerufen. + /// + /// fiedlchr, 15.10.2013. + /// public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo language) { return (value is Visibility && (Visibility)value == Visibility.Visible); diff --git a/CampusAppWP8/CampusAppWP8/Utility/File.cs b/CampusAppWP8/CampusAppWP8/Utility/File.cs index b247c0e7..f3e40167 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/File.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/File.cs @@ -1,10 +1,11 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 03.05.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the file class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility { using System; @@ -14,30 +15,26 @@ namespace CampusAppWP8.Utility using CampusAppWPortalLib8.Utility; using Windows.Storage; - /// - /// File class. - /// + /// File class. + /// fiedlchr, 15.10.2013. + /// public class File : AbstractFile { #region Member - /// - /// Folder object. - /// + /// Folder object. private static readonly IStorageFolder LocalFolder = ApplicationData.Current.LocalFolder; - /// - /// File name. - /// + /// File name. private string filename = string.Empty; #endregion #region Constructor - /// Initializes a new instance of the class. - /// Stubbfel, 03.09.2013. - /// file name. + /// Initializes a new instance of the class. + /// fiedlchr, 03.09.2013. + /// file name. public File(string filename) { this.filename = filename; @@ -49,9 +46,9 @@ namespace CampusAppWP8.Utility #region public - /// Read data from file to a string. - /// Stubbfel, 03.09.2013. - /// data string. + /// Read data from file to a string. + /// fiedlchr, 03.09.2013. + /// public override byte[] ReadFile() { byte[] retValue = null; @@ -64,31 +61,27 @@ namespace CampusAppWP8.Utility return retValue; } - /// Write bytes to the file. - /// Stubbfel, 03.09.2013. - /// data byte array. - /// callback function, called after writing is done. - /// callback function, called when writing failed. + /// Write bytes to the file. + /// fiedlchr, 03.09.2013. + /// public override void WriteFile(byte[] data, WriteCallbackFunc onSavedCallback, WriteCallbackFunc onFailedCallback) { Thread th = new Thread(delegate() { this.WriteAsync(data, onSavedCallback, onFailedCallback); }); th.Start(); } - /// - /// Return a info object of the file. - /// - /// info of the file + /// Return a info object of the file. + /// fiedlchr, 15.10.2013. + /// info of the file. public FileInfo GetFileInfo() { FileInfo info = new FileInfo(File.LocalFolder.Path + "\\" + this.filename); return info; } - /// - /// Check if a file is existing. - /// - /// true, if file exists, otherwise false + /// Check if a file is existing. + /// fiedlchr, 15.10.2013. + /// public override bool Exist() { FileInfo info = this.GetFileInfo(); @@ -102,9 +95,9 @@ namespace CampusAppWP8.Utility } } - /// Converts this object to a storage file. - /// Stubbfel, 03.09.2013. - /// Storage File + /// Converts this object to a storage file. + /// fiedlchr, 03.09.2013. + /// Storage File. public async Task AsStorageFile() { if (this.Exist()) @@ -119,10 +112,9 @@ namespace CampusAppWP8.Utility #region private - /// - /// Read data synchronous from file. - /// - /// data string + /// Read data synchronous from file. + /// fiedlchr, 15.10.2013. + /// data string. private byte[] ReadSync() { byte[] retValue = null; @@ -139,12 +131,11 @@ namespace CampusAppWP8.Utility return retValue; } - /// - /// Write data asynchronous to file. - /// - /// data array. - /// callback function, called when writing is done. - /// callback function, called when writing failed. + /// Write data asynchronous to file. + /// fiedlchr, 15.10.2013. + /// data array. + /// callback function, called when writing is done. + /// callback function, called when writing failed. private async void WriteAsync(byte[] data, WriteCallbackFunc onSavedCallback, WriteCallbackFunc onFailedCallback) { Logger.LogMsg("writeasync file: " + this.filename); diff --git a/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs b/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs index 3d1b2ae5..dfa6104f 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs @@ -1,37 +1,33 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//----------------------------------------------------------------------using System; +// Stubbfel +// 15.10.2013 +// Implements the HTTP request class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility { using System; - using System.Collections.Generic; using System.Net; - using CampusAppWP8.Model.Utility; - using CampusAppWPortalLib8.Model.Utility; using CampusAppWPortalLib8.Utility; - /// - /// Class realize the access of restful HttpRequest - /// + /// Class realize the access of restful HttpRequest. + /// Stubbfel, 15.10.2013. + /// public class HttpRequest : AbstractHttpRequest { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public HttpRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// the url of the HttpRequest base address + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. + /// the url of the HttpRequest base address. public HttpRequest(Uri apiBaseAddress) { this.BaseAddress = apiBaseAddress.AbsoluteUri; @@ -42,11 +38,10 @@ namespace CampusAppWP8.Utility #region Methods #region public - /// - /// Method realize the http-get-method resource - /// - /// Url of the resource - /// callback method + /// Method realize the http-get-method resource. + /// Stubbfel, 15.10.2013. + /// Url of the resource. + /// callback method. public void HttpGet(Uri url, Action action) { WebClient client = new WebClient(); @@ -54,10 +49,10 @@ namespace CampusAppWP8.Utility client.DownloadStringAsync(url); } - /// Method realize the http-get-method resource. - /// Stubbfel, 03.09.2013. - /// Url of the resource. - /// The action. + /// Method realize the http-get-method resource. + /// Stubbfel, 03.09.2013. + /// Url of the resource. + /// The action. public void HttpGet(Uri url, Action action) { WebClient client = new WebClient(); @@ -65,99 +60,91 @@ namespace CampusAppWP8.Utility client.OpenReadAsync(url); } - /// - /// Method realize the http-delete-method - /// - /// - /// is not supported by WebClient - /// - /// Url of the resource - /// callback method + /// Method realize the http-delete-method. + /// is not supported by WebClient. + /// + /// Thrown when the requested operation is not supported. + /// + /// Url of the resource. + /// callback method. public void HttpDelete(Uri url, Action action) { throw new NotSupportedException(); } - /// - /// Method realize the http-head-method - /// - /// - /// is not supported by WebClient - /// - /// Url of the resource - /// callback method + /// Method realize the http-head-method. + /// is not supported by WebClient. + /// + /// Thrown when the requested operation is not supported. + /// + /// Url of the resource. + /// callback method. public void HttpHead(Uri url, Action action) { throw new NotSupportedException(); } - /// - /// Method realize the http-options-method - /// - /// - /// is not supported by WebClient - /// - /// Url of the resource - /// callback method + /// Method realize the http-options-method. + /// is not supported by WebClient. + /// + /// Thrown when the requested operation is not supported. + /// + /// Url of the resource. + /// callback method. public void HttpOptions(Uri url, Action action) { throw new NotSupportedException(); } - /// - /// Method realize the http-connect-method - /// - /// - /// is not supported by WebClient - /// - /// Url of the resource - /// callback method + /// Method realize the http-connect-method. + /// is not supported by WebClient. + /// + /// Thrown when the requested operation is not supported. + /// + /// Url of the resource. + /// callback method. public void HttpConnect(Uri url, Action action) { throw new NotSupportedException(); } - /// - /// Method realize the http-trace-method - /// - /// - /// is not supported by WebClient - /// - /// Url of the resource - /// callback method + /// Method realize the http-trace-method. + /// is not supported by WebClient. + /// + /// Thrown when the requested operation is not supported. + /// + /// Url of the resource. + /// callback method. public void HttpTrace(Uri url, Action action) { throw new NotSupportedException(); } - /// - /// Method realize the http-post-method - /// - /// Url of the resource - /// callback method - /// Data which are sending via post to the HttpRequest + /// Method realize the http-post-method. + /// Stubbfel, 15.10.2013. + /// Url of the resource. + /// callback method. + /// Data which are sending via post to the HttpRequest. public void HttpPost(Uri url, Action action, string postData) { this.UploadData(url, action, "POST", postData); } - /// - /// Method realize the http-put-method - /// - /// Url of the resource - /// callback method - /// Data which are sending via put to the HttpRequest + /// Method realize the http-put-method. + /// Stubbfel, 15.10.2013. + /// Url of the resource. + /// callback method. + /// Data which are sending via put to the HttpRequest. public void HttpPut(Uri url, Action action, string putData) { this.UploadData(url, action, "PUT", putData); } - /// - /// Method realize the http-patch-method - /// - /// Url of the resource - /// callback method - /// Data which are sending via patch to the HttpRequest + /// Method realize the http-patch-method. + /// Stubbfel, 15.10.2013. + /// Url of the resource. + /// callback method. + /// Data which are sending via patch to the HttpRequest. public void HttpPatch(Uri url, Action action, string patchData) { this.UploadData(url, action, "PATCH", patchData); @@ -167,13 +154,12 @@ namespace CampusAppWP8.Utility #region private - /// - /// Method uploaded Data to the HttpRequest - /// - /// Url of the resource - /// callback method - /// name of APIMethod, how the data will be uploaded - /// Data which are sending to the HttpRequest + /// Method uploaded Data to the HttpRequest. + /// Stubbfel, 15.10.2013. + /// Url of the resource. + /// callback method. + /// name of APIMethod, how the data will be uploaded. + /// Data which are sending to the HttpRequest. private void UploadData(Uri url, Action action, string method, string data) { WebClient client = new WebClient(); diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs index f02e2040..2233786e 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/AddPersonButton.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 09.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the add person button class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System; @@ -14,27 +14,28 @@ namespace CampusAppWP8.Utility.Lui.Button using System.Windows.Media.Imaging; using CampusAppWP8.Resources; - /// Add person button. - /// Stubbfel, 12.09.2013. + /// Add person button. + /// Stubbfel, 12.09.2013. + /// public class AddPersonButton : System.Windows.Controls.Button { #region Member - /// The person identifier property. + /// The person identifier property. public static readonly DependencyProperty PersonIdProperty = DependencyProperty.Register("PersonID", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false)); - /// The function index property. + /// The function index property. public static readonly DependencyProperty FunctionIndexProperty = DependencyProperty.Register("FunctionIndex", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false)); - /// The icon. + /// 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. + /// Initializes a new instance of the AddPersonButton class. + /// Stubbfel, 12.09.2013. public AddPersonButton() : base() { @@ -48,16 +49,16 @@ namespace CampusAppWP8.Utility.Lui.Button #region Property - /// Gets or sets the identifier of the person. - /// The identifier of the person. + /// 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. + /// Gets or sets zero-based index of the function. + /// The function index. public object FunctionIndex { get { return (object)this.GetValue(FunctionIndexProperty); } diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/EmailButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/EmailButton.cs index e5be0944..925288f9 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/EmailButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/EmailButton.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 04.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the email button class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System; @@ -14,30 +15,25 @@ namespace CampusAppWP8.Utility.Lui.Button using CampusAppWP8.Resources; using Microsoft.Phone.Tasks; - /// - /// This class create an Button which start the Email-Client - /// + /// This class create an Button which start the Email-Client. + /// Stubbfel, 15.10.2013. + /// public class EmailButton : System.Windows.Controls.Button { #region Members - /// - /// Register the EmailProperty - /// + /// Register the EmailProperty. public static readonly DependencyProperty EmailProperty = DependencyProperty.Register("EmailAddress", typeof(object), typeof(EmailButton), new PropertyMetadata(false)); - /// - /// Icon of the Button - /// + /// Icon of the Button. private static BitmapImage icon = new BitmapImage(new Uri(Icons.WebMail, UriKind.Relative)); #endregion #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public EmailButton() : base() { @@ -51,9 +47,8 @@ namespace CampusAppWP8.Utility.Lui.Button #region Proberties - /// - /// Gets or sets the EmailAddress - /// + /// Gets or sets the EmailAddress. + /// The email address. public object EmailAddress { get { return (object)this.GetValue(EmailProperty); } @@ -64,12 +59,9 @@ namespace CampusAppWP8.Utility.Lui.Button #region Methods - /// - /// Overrides the OnClick-Method from button - /// - /// - /// now method start the EmailComposeTask - /// + /// Overrides the OnClick-Method from button. + /// now method start the EmailComposeTask. + /// protected override void OnClick() { EmailComposeTask emailTask = new EmailComposeTask(); diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs index 7247612e..c0859710 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the go to map button class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System; @@ -15,30 +16,25 @@ namespace CampusAppWP8.Utility.Lui.Button using CampusAppWP8.Resources; using Microsoft.Phone.Tasks; - /// - /// This class create an Button which open a Map - /// + /// This class create an Button which open a Map. + /// Stubbfel, 15.10.2013. + /// public class GoToMapButton : System.Windows.Controls.Button { #region Members - /// - /// Register the SearchTermProperty - /// + /// Register the SearchTermProperty. public static readonly DependencyProperty SearchTermProperty = DependencyProperty.Register("SearchTerm", typeof(object), typeof(GoToMapButton), new PropertyMetadata(false)); - /// - /// Icon of the Button - /// + /// Icon of the Button. private static BitmapImage icon = new BitmapImage(new Uri(Icons.Campus, UriKind.Relative)); #endregion #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public GoToMapButton() : base() { @@ -52,9 +48,8 @@ namespace CampusAppWP8.Utility.Lui.Button #region Proberties - /// - /// Gets or sets the Url - /// + /// Gets or sets the Url. + /// The search term. public object SearchTerm { get { return (object)this.GetValue(SearchTermProperty); } @@ -65,12 +60,9 @@ namespace CampusAppWP8.Utility.Lui.Button #region Methods - /// - /// Overrides the OnClick-Method from button - /// - /// - /// now method start the MapTask - /// + /// Overrides the OnClick-Method from button. + /// now method start the MapTask. + /// protected override void OnClick() { string urlString = Constants.PathCampusmap_Campusmap; diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/LinkButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/LinkButton.cs index e2adeeb2..e1b292cd 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/LinkButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/LinkButton.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the link button class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System; @@ -15,29 +16,26 @@ namespace CampusAppWP8.Utility.Lui.Button using Microsoft.Phone.Tasks; /// - /// This class create an Button which start the WebBrowser, which an certain url + /// This class create an Button which start the WebBrowser, which an certain url. /// + /// Stubbfel, 15.10.2013. + /// public class LinkButton : System.Windows.Controls.Button { #region Members - /// - /// Register the EmailProperty - /// + /// Register the EmailProperty. public static readonly DependencyProperty LinkProperty = DependencyProperty.Register("Url", typeof(object), typeof(LinkButton), new PropertyMetadata(false)); - /// - /// Icon of the Button - /// + /// Icon of the Button. private static BitmapImage icon = new BitmapImage(new Uri(Icons.Link, UriKind.Relative)); #endregion #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LinkButton() : base() { @@ -51,9 +49,8 @@ namespace CampusAppWP8.Utility.Lui.Button #region Proberties - /// - /// Gets or sets the Url - /// + /// Gets or sets the Url. + /// The URL. public object Url { get { return (object)this.GetValue(LinkProperty); } @@ -64,12 +61,9 @@ namespace CampusAppWP8.Utility.Lui.Button #region Methods - /// - /// Overrides the OnClick-Method from button - /// - /// - /// now method start the WebBrowserTask - /// + /// Overrides the OnClick-Method from button. + /// now method start the WebBrowserTask. + /// protected override void OnClick() { Uri linkUrl = new Uri(this.Url as string, UriKind.Absolute); diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/NavigateButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/NavigateButton.cs index 2f0a02a5..9a03e8a9 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/NavigateButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/NavigateButton.cs @@ -1,45 +1,39 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the navigate button class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System; using System.Windows; using System.Windows.Controls; - /// - /// This class create an Button which navigate to a certain page - /// + /// This class create an Button which navigate to a certain page. + /// Stubbfel, 15.10.2013. + /// public class NavigateButton : System.Windows.Controls.Button { #region Members - /// - /// Register the UrlProperty - /// + /// Register the UrlProperty. public static readonly DependencyProperty NavigateProperty = DependencyProperty.Register("Url", typeof(object), typeof(NavigateButton), new PropertyMetadata(false)); - /// - /// Register the QueryValueProperty - /// + /// Register the QueryValueProperty. public static readonly DependencyProperty QueryValueProperty = DependencyProperty.Register("QuerryStringValue", typeof(object), typeof(NavigateButton), new PropertyMetadata(false)); - /// - /// Register the QueryNameProperty - /// + /// Register the QueryNameProperty. public static readonly DependencyProperty QueryNameProperty = DependencyProperty.Register("QuerryStringName", typeof(object), typeof(NavigateButton), new PropertyMetadata(false)); #endregion #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public NavigateButton() : base() { @@ -49,27 +43,24 @@ namespace CampusAppWP8.Utility.Lui.Button #region Proberties - /// - /// Gets or sets the Url - /// + /// Gets or sets the Url. + /// The URL. public object Url { get { return (object)this.GetValue(NavigateProperty); } set { this.SetValue(NavigateProperty, value); } } - /// - /// Gets or sets the QueryStringName - /// + /// Gets or sets the QueryStringName. + /// The name of the query string. public object QuerryStringName { get { return (object)this.GetValue(QueryNameProperty); } set { this.SetValue(QueryNameProperty, value); } } - /// - /// Gets or sets the QueryStringValue - /// + /// Gets or sets the QueryStringValue. + /// The query string value. public object QuerryStringValue { get { return (object)this.GetValue(QueryValueProperty); } @@ -80,12 +71,9 @@ namespace CampusAppWP8.Utility.Lui.Button #region Methods - /// - /// Overrides the OnClick-Method from button - /// - /// - /// now method navigate to a certain page - /// + /// Overrides the OnClick-Method from button. + /// now method navigate to a certain page. + /// protected override void OnClick() { string urlString = this.Url as string; diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/PhoneButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/PhoneButton.cs index a65f0a4e..32033122 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/PhoneButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/PhoneButton.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the phone button class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System; @@ -14,35 +15,28 @@ namespace CampusAppWP8.Utility.Lui.Button using CampusAppWP8.Resources; using Microsoft.Phone.Tasks; - /// - /// This class create an Button which start a PhoneCall - /// + /// This class create an Button which start a PhoneCall. + /// Stubbfel, 15.10.2013. + /// public class PhoneButton : System.Windows.Controls.Button { #region Members - /// - /// Register the PhoneProperty - /// + /// Register the PhoneProperty. public static readonly DependencyProperty PhoneProperty = DependencyProperty.Register("Number", typeof(object), typeof(PhoneButton), new PropertyMetadata(false)); - /// - /// Register the DisplayNameProperty - /// + /// Register the DisplayNameProperty. public static readonly DependencyProperty DisplayNameProperty = DependencyProperty.Register("DisplayName", typeof(object), typeof(PhoneButton), new PropertyMetadata(false)); - /// - /// Icon of the Button - /// + /// Icon of the Button. private static BitmapImage icon = new BitmapImage(new Uri(Icons.Phone, UriKind.Relative)); #endregion #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public PhoneButton() : base() { @@ -56,18 +50,16 @@ namespace CampusAppWP8.Utility.Lui.Button #region Proberties - /// - /// Gets or sets the PhoneNumber - /// + /// Gets or sets the PhoneNumber. + /// The new PhoneNumber. public object Number { get { return (object)this.GetValue(PhoneProperty); } set { this.SetValue(PhoneProperty, value); } } - /// - /// Gets or sets the DisplayName - /// + /// Gets or sets the DisplayName. + /// The name which is showing on the display public object DisplayName { get { return (object)this.GetValue(DisplayNameProperty); } @@ -78,12 +70,9 @@ namespace CampusAppWP8.Utility.Lui.Button #region Methods - /// - /// Overrides the OnClick-Method from button - /// - /// - /// now method start the PhoneTask - /// + /// Overrides the OnClick-Method from button. + /// now method start the PhoneTask. + /// protected override void OnClick() { PhoneCallTask phoneCallTask = new PhoneCallTask(); diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/ToggleButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/ToggleButton.cs index b59f43ad..0f738929 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/ToggleButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/ToggleButton.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the toggle button class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System.Collections.Generic; @@ -12,29 +13,25 @@ namespace CampusAppWP8.Utility.Lui.Button using System.Windows.Controls; /// - /// This class create an Button which can toggle the Visibility of certain FrameworkElements + /// This class create an Button which can toggle the Visibility of certain FrameworkElements. /// + /// Stubbfel, 15.10.2013. + /// public class ToggleButton : System.Windows.Controls.Button { #region Members #region public - /// - /// Register the ToggleContentTag - /// + /// Register the ToggleContentTag. public static readonly DependencyProperty ToggleContentTagProperty = DependencyProperty.Register("ToggleContentTag", typeof(object), typeof(ToggleButton), new PropertyMetadata(false)); #endregion #region private - /// - /// List of FrameworkElement which can change their Visibility by this button - /// + /// List of FrameworkElement which can change their Visibility by this button. private List toggleElements = null; - /// - /// EventHandler of the ToggleButton - /// + /// EventHandler of the ToggleButton. private ToggleButtonHandler eventHandler; #endregion @@ -43,9 +40,8 @@ namespace CampusAppWP8.Utility.Lui.Button #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public ToggleButton() : base() { @@ -55,22 +51,18 @@ namespace CampusAppWP8.Utility.Lui.Button #region Events - /// - /// Delegate for the ToggleButton events - /// + /// Delegate for the ToggleButton events. + /// Stubbfel, 15.10.2013. private delegate void ToggleButtonHandler(); - /// - /// The closeButtonEvent - /// + /// The closeButtonEvent. private static event ToggleButtonHandler CloseButtonEvent; #endregion #region Proberties - /// - /// Gets or sets the ToggleContentTag - /// + /// Gets or sets the ToggleContentTag. + /// The toggle content tag. public object ToggleContentTag { get { return (object)this.GetValue(ToggleContentTagProperty); } @@ -84,8 +76,9 @@ namespace CampusAppWP8.Utility.Lui.Button #region public /// - /// Method close the ToggleContent of the old ToggleContent and then show the new one + /// Method close the ToggleContent of the old ToggleContent and then show the new one. /// + /// Stubbfel, 15.10.2013. public void ToggleToggleContent() { if (this.toggleElements != null) @@ -103,9 +96,8 @@ namespace CampusAppWP8.Utility.Lui.Button } } - /// - /// Method show all Element of the ToggleContent - /// + /// Method show all Element of the ToggleContent. + /// Stubbfel, 15.10.2013. public void ShowToggleContent() { if (this.toggleElements != null) @@ -117,9 +109,8 @@ namespace CampusAppWP8.Utility.Lui.Button } } - /// - /// Method show all Element of the ToggleContent - /// + /// Method show all Element of the ToggleContent. + /// Stubbfel, 15.10.2013. public void HideToggleContent() { if (this.toggleElements != null) @@ -134,12 +125,9 @@ namespace CampusAppWP8.Utility.Lui.Button #region protected - /// - /// Overrides the OnClick-Method from button - /// - /// - /// now method toggle the visibility of some FrameWorkElements - /// + /// Overrides the OnClick-Method from button. + /// now method toggle the visibility of some FrameWorkElements. + /// protected override void OnClick() { if (this.toggleElements == null) @@ -154,9 +142,8 @@ namespace CampusAppWP8.Utility.Lui.Button #region private - /// - /// Method look for some ToggleContent - /// + /// Method look for some ToggleContent. + /// Stubbfel, 15.10.2013. private void SetupToggleElements() { this.toggleElements = new List(); @@ -177,10 +164,9 @@ namespace CampusAppWP8.Utility.Lui.Button } } - /// - /// Gets the first panel, which is a parent of this button - /// - /// first panel of the parents + /// Gets the first panel, which is a parent of this button. + /// Stubbfel, 15.10.2013. + /// first panel of the parents. private Panel GetFirstParentPanel() { FrameworkElement parentElement = this.Parent as FrameworkElement; @@ -199,10 +185,9 @@ namespace CampusAppWP8.Utility.Lui.Button return parentPanel; } - /// - /// Method toggle the visibility of a certain element - /// - /// element of the ToggleContent + /// Method toggle the visibility of a certain element. + /// Stubbfel, 15.10.2013. + /// element of the ToggleContent. private void ToggleToggleContentElement(UIElement element) { if (element != null) @@ -218,10 +203,9 @@ namespace CampusAppWP8.Utility.Lui.Button } } - /// - /// Method show the visibility of a certain element - /// - /// element of the ToggleContent + /// Method show the visibility of a certain element. + /// Stubbfel, 15.10.2013. + /// element of the ToggleContent. private void ShowToggleContentElement(UIElement element) { if (element != null) @@ -235,10 +219,9 @@ namespace CampusAppWP8.Utility.Lui.Button } } - /// - /// Method hide the visibility of a certain element - /// - /// element of the ToggleContent + /// Method hide the visibility of a certain element. + /// Stubbfel, 15.10.2013. + /// element of the ToggleContent. private void HideToggleContentElement(UIElement element) { if (element != null) diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/UpdateButtonAppBar.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/UpdateButtonAppBar.cs index 466ac72c..b94d306a 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/UpdateButtonAppBar.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/UpdateButtonAppBar.cs @@ -1,40 +1,36 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 22.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the update button application bar class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Button { using System; using CampusAppWP8.Resources; using Microsoft.Phone.Shell; - /// - /// This class create an Button which start the Email-Client - /// + /// This class create an Button which start the Email-Client. + /// Stubbfel, 15.10.2013. + /// public class UpdateButtonAppBar : ApplicationBarIconButton { #region Members - /// - /// IconUri of the Button - /// + /// IconUri of the Button. private static Uri iconUri = new Uri(Icons.Update, UriKind.Relative); - /// - /// Text of the Button - /// + /// Text of the Button. private static string text = AppResources.UpdateBtn; #endregion #region Constructors - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public UpdateButtonAppBar() : base() { diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Header/DefaultHeader.xaml.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Header/DefaultHeader.xaml.cs index 8604b6cd..7d5ec48d 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Header/DefaultHeader.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Header/DefaultHeader.xaml.cs @@ -1,33 +1,33 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 07.10.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the default header.xaml class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Header { using System.Windows; using System.Windows.Controls; using CampusAppWP8.Resources; - /// - /// Default Header Template. - /// + /// Default Header Template. + /// fiedlchr, 15.10.2013. + /// public partial class DefaultHeader : UserControl { - /// AppTitle property object. + /// AppTitle property object. public static readonly DependencyProperty AppTitleProperty = DependencyProperty.Register("AppTitle", typeof(string), typeof(DefaultHeader), new PropertyMetadata(null)); - /// HeaderName property object. + /// HeaderName property object. public static readonly DependencyProperty HeaderNameProperty = DependencyProperty.Register("HeaderName", typeof(string), typeof(DefaultHeader), new PropertyMetadata(null)); - /// ProgressVisibility property object. + /// ProgressVisibility property object. public static readonly DependencyProperty ProgressVisibilityProperty = DependencyProperty.Register("ProgressVisibility", typeof(Visibility), typeof(DefaultHeader), new PropertyMetadata(null)); - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. public DefaultHeader() { this.InitializeComponent(); @@ -35,9 +35,8 @@ namespace CampusAppWP8.Utility.Lui.Header this.ProgressVisibility = Visibility.Collapsed; } - /// - /// Gets or sets the AppTitle property. - /// + /// Gets or sets the AppTitle property. + /// The application title. public string AppTitle { get @@ -51,9 +50,8 @@ namespace CampusAppWP8.Utility.Lui.Header } } - /// - /// Gets or sets the HeaderName property. - /// + /// Gets or sets the HeaderName property. + /// The name of the header. public string HeaderName { get @@ -67,6 +65,8 @@ namespace CampusAppWP8.Utility.Lui.Header } } + /// Gets or sets the progress visibility. + /// The progress visibility. public Visibility ProgressVisibility { get diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs index 21fcefc1..e9851bbb 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/MessageBoxes/MessageBoxes.cs @@ -1,80 +1,82 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 15.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the message boxes class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.MessageBoxes { using System.Windows; using CampusAppWP8.Resources; - /// - /// Class creates some MessageBoxes - /// + /// Class creates some MessageBoxes. + /// Stubbfel, 15.10.2013. public class MessageBoxes { #region Method - /// - /// Method show the MessageBox for the GeoWatch-OptIn - /// - /// result of the UserInteraction + /// Method show the MessageBox for the GeoWatch-OptIn. + /// Stubbfel, 15.10.2013. + /// result of the UserInteraction. public static MessageBoxResult ShowGoeWatchOptInBox() { return MessageBox.Show(AppResources.MsgBox_GeoWatchOptInText, AppResources.MsgBox_GeoWatchOptInHeader, MessageBoxButton.OKCancel); } - /// - /// Method show the MessageBox for the ErrorMessageBox - /// - /// custom text for the box - /// result of the UserInteraction + /// Method show the MessageBox for the ErrorMessageBox. + /// Stubbfel, 15.10.2013. + /// custom text for the box. + /// result of the UserInteraction. public static MessageBoxResult ShowMainModelErrorMessageBox(string text) { return MessageBox.Show(text, AppResources.MsgBox_ErrorHeader, MessageBoxButton.OK); } - /// Shows the main model information message box. - /// Stubbfel, 10.09.2013. - /// custom text for the box. - /// result of the UserInteraction + /// 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); } - /// Shows the place information message box. - /// Stubbfel, 10.09.2013. - /// custom text for the box. - /// result of the UserInteraction + /// Shows the place information message box. + /// Stubbfel, 10.09.2013. + /// custom text for the box. + /// result of the UserInteraction. public static MessageBoxResult ShowPlaceInfoMessageBox(string text) { return MessageBox.Show(text, AppResources.MsgBox_PlaceInfoHeader, MessageBoxButton.OK); } - /// Shows the place information message box (OKCancel-Box). - /// Stubbfel, 10.09.2013. - /// custom text for the box. - /// result of the UserInteraction + /// Shows the place information message box (OKCancel-Box). + /// Stubbfel, 10.09.2013. + /// custom text for the box. + /// result of the UserInteraction. public static MessageBoxResult ShowPlaceInfoOkCancelMessageBox(string text) { return MessageBox.Show(text, AppResources.MsgBox_PlaceInfoHeader, MessageBoxButton.OKCancel); } + /// Shows the btu tag information ok cancel message box. + /// Stubbfel, 15.10.2013. + /// (Optional) custom text for the box. + /// A MessageBoxResult. public static MessageBoxResult ShowBtuTagInfoOkCancelMessageBox(string text = null) { - string tagString; if (text != null) { - tagString = ":\n" + Wp8StringManager.ToShortString(text, 160, "..."); + tagString = ":\n" + Wp8StringManager.ToShortString(text, 160, "..."); } else { tagString = "!"; } + string btuString = AppResources.BTUTag_Prefix + tagString + "\n" + AppResources.BTUTag_Suffix; return MessageBox.Show(btuString, AppResources.MsgBox_BtuInfoHeader, MessageBoxButton.OKCancel); } diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Tiles/TileCreator.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Tiles/TileCreator.cs index 3745abfa..ba0fe5aa 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Tiles/TileCreator.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Tiles/TileCreator.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 18.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the tile creator class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.Lui.Tiles { using System; @@ -13,21 +13,19 @@ namespace CampusAppWP8.Utility.Lui.Tiles using CampusAppWP8.Resources; using Microsoft.Phone.Shell; - /// - /// Class creates different live tiles - /// + /// Class creates different live tiles. + /// Stubbfel, 15.10.2013. public class TileCreator { - /// - /// Method creates an IconicTile - /// - /// title of the tile - /// path the the page - /// icon url of the main icon - /// icon url of the small icon - /// string for the wide content 1 - /// string for the wide content 2 - /// string for the wide content 3 + /// Method creates an IconicTile. + /// Stubbfel, 15.10.2013. + /// title of the tile. + /// path the the page. + /// icon url of the main icon. + /// icon url of the small icon. + /// (Optional) string for the wide content 1. + /// (Optional) string for the wide content 2. + /// (Optional) string for the wide content 3. public static void CreateIconicTile(string title, string path, string iconUrl, string smallIcon, string wideContent1 = null, string wideContent2 = null, string wideContent3 = null) { IconicTileData iconTile = new IconicTileData(); @@ -50,9 +48,8 @@ namespace CampusAppWP8.Utility.Lui.Tiles ShellTile.Create(new Uri(path, UriKind.Relative), iconTile, true); } - /// - /// Method creates the MensaTile - /// + /// Method creates the MensaTile. + /// Stubbfel, 15.10.2013. public static void CreateMensaTile() { TileCreator.CreateIconicTile(AppResources.MensaApp_Title, Constants.PathMensa_MensaPage, Icons.Mensa, Icons.Mensa); @@ -61,17 +58,15 @@ namespace CampusAppWP8.Utility.Lui.Tiles BackgroundTasks.StartBTUCampusAppTask(); } - /// - /// Method creates the MailTile - /// + /// Method creates the MailTile. + /// Stubbfel, 15.10.2013. public static void CreateWebMailTile() { TileCreator.CreateIconicTile(AppResources.MailApp_Title, Constants.PathMail_WebMailPage, Icons.WebMail, Icons.WebMail); } - /// - /// Method creates the NewsTile - /// + /// Method creates the NewsTile. + /// Stubbfel, 15.10.2013. public static void CreateNewsTile() { TileCreator.CreateIconicTile(AppResources.NewsApp_Title, Constants.PathNews_NewsIndexPage, Icons.News, Icons.News); @@ -80,17 +75,15 @@ namespace CampusAppWP8.Utility.Lui.Tiles BackgroundTasks.StartBTUCampusAppTask(); } - /// - /// Method creates the LectureTile - /// + /// Method creates the LectureTile. + /// Stubbfel, 15.10.2013. public static void CreateLectureTile() { TileCreator.CreateIconicTile(AppResources.LectureApp_Title, Constants.PathLecture_LecturePage, Icons.Lectures, Icons.Lectures); } - /// - /// Method creates the EventTile - /// + /// Method creates the EventTile. + /// Stubbfel, 15.10.2013. public static void CreateEventTile() { TileCreator.CreateIconicTile(AppResources.EventApp_Title, Constants.PathEvents_EventsIndexPage, Icons.Events, Icons.Events); @@ -99,65 +92,57 @@ namespace CampusAppWP8.Utility.Lui.Tiles BackgroundTasks.StartBTUCampusAppTask(); } - /// - /// Method creates the DepartmentTile - /// + /// Method creates the DepartmentTile. + /// Stubbfel, 15.10.2013. public static void CreateDepartmentTile() { TileCreator.CreateIconicTile(AppResources.DepartmentApp_Title, Constants.PathDepartment_DepartmentIndexPage, Icons.Departments, Icons.Departments); } - /// - /// Method creates the OpeningHoursTile - /// + /// Method creates the OpeningHoursTile. + /// Stubbfel, 15.10.2013. public static void CreateOpeningHoursTile() { TileCreator.CreateIconicTile(AppResources.OpenHoursApp_Title, Constants.PathOpeninghours_OpeninghoursPage, Icons.Openhours, Icons.Openhours); } - /// - /// Method creates the linkTile - /// + /// Method creates the linkTile. + /// Stubbfel, 15.10.2013. public static void CreateLinkTile() { TileCreator.CreateIconicTile(AppResources.LinkApp_Title, Constants.PathLinks_LinkPage, Icons.Link, Icons.Link); } - /// - /// Method creates the StudentCouncilTile - /// + /// Method creates the StudentCouncilTile. + /// Stubbfel, 15.10.2013. public static void CreateStudentCouncilTile() { TileCreator.CreateIconicTile(AppResources.OSAApp_Title, Constants.PathStudentCouncil_StudentCouncilPage, Icons.StudentCouncil, Icons.StudentCouncil); } - /// - /// Method creates the ExamsTile - /// + /// Method creates the ExamsTile. + /// Stubbfel, 15.10.2013. public static void CreateExamsTile() { TileCreator.CreateIconicTile(AppResources.ExaminationApp_Header, Constants.PathExams_ExamsPage, Icons.Exams, Icons.Exams); } - /// - /// Method creates the PersonTile - /// + /// Method creates the PersonTile. + /// Stubbfel, 15.10.2013. public static void CreatePersonTile() { TileCreator.CreateIconicTile(AppResources.PersonApp_Title, Constants.PathPerson_Person, Icons.Person, Icons.Person); } - /// - /// Method creates the PlaceNewsTile - /// + /// Method creates the PlaceNewsTile. + /// Stubbfel, 15.10.2013. public static void CreatePlaceNewsTile() { TileCreator.CreateIconicTile(AppResources.PlaceNewsApp_Title, Constants.PathPlaceNews_PlaceNewsPage, Icons.News, Icons.News); } - /// - /// Method creates the CampusMapTile - /// + /// Method creates the CampusMapTile. + /// Stubbfel, 15.10.2013. public static void CreateCampusMapTile() { TileCreator.CreateIconicTile(AppResources.CampusMapApp_Title, Constants.PathCampusmap_Campusmap, Icons.Campus, Icons.Campus); diff --git a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFMessage.cs b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFMessage.cs index f4038e46..09e10bb0 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFMessage.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFMessage.cs @@ -10,24 +10,24 @@ namespace CampusAppWP8.Utility.NDEF using System.Collections.Generic; using System.IO; - /// Ndef message. - /// Stubbfel, 21.08.2013. + /// Ndef message. + /// Stubbfel, 21.08.2013. public class NDEFMessage { #region Members - /// The records. + /// The records. private List records; #endregion #region constructors - /// Initializes a new instance of the NDEFMessage class. - /// Stubbfel, 21.08.2013. - /// The content. - /// The type. - /// (Optional) the tnf. + /// Initializes a new instance of the NDEFMessage class. + /// Stubbfel, 21.08.2013. + /// The content. + /// The type. + /// (Optional) the tnf. public NDEFMessage(string content, TYPEVAL type, NDEFRecord.TNFVAL tnf = NDEFRecord.TNFVAL.WKT) { this.records = new List(); @@ -60,9 +60,9 @@ namespace CampusAppWP8.Utility.NDEF this.records[this.records.IndexOf(tmpRecord)].ME = NDEFRecord.NDEFFlags.MESET; } - /// Initializes a new instance of the NDEFMessage class. - /// Stubbfel, 21.08.2013. - /// The array. + /// Initializes a new instance of the NDEFMessage class. + /// Stubbfel, 21.08.2013. + /// The array. public NDEFMessage(byte[] array) { this.records = new List(); @@ -80,8 +80,8 @@ namespace CampusAppWP8.Utility.NDEF #region enum - /// Values that represent TYPEVAL. - /// Stubbfel, 21.08.2013. + /// Values that represent TYPEVAL. + /// Stubbfel, 21.08.2013. public enum TYPEVAL { /// An enum constant representing the empty option. @@ -97,10 +97,11 @@ namespace CampusAppWP8.Utility.NDEF #endregion #region Methods - /// Gets a praefix. - /// Stubbfel, 21.08.2013. - /// The type. - /// The praefix. + + /// Gets a praefix. + /// Stubbfel, 21.08.2013. + /// The type. + /// The praefix. public static string GetPraefix(TYPEVAL type) { string praefix = string.Empty; @@ -120,9 +121,9 @@ namespace CampusAppWP8.Utility.NDEF return praefix; } - /// Gets the content. - /// Stubbfel, 21.08.2013. - /// The content. + /// Gets the content. + /// Stubbfel, 21.08.2013. + /// The content. public string GetContent() { string result = string.Empty; @@ -135,9 +136,9 @@ namespace CampusAppWP8.Utility.NDEF return result; } - /// Converts this object to a byte array. - /// Stubbfel, 21.08.2013. - /// This object as a byte[]. + /// Converts this object to a byte array. + /// Stubbfel, 21.08.2013. + /// This object as a byte[]. public byte[] ToByteArray() { MemoryStream ms = new MemoryStream(); diff --git a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFRecord.cs b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFRecord.cs index 8d3a0c7e..4b26a89f 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFRecord.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFRecord.cs @@ -1,40 +1,42 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 21.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the ndef record class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.NDEF { using System.IO; using System.Text; - /// Ndef record of a NDEFMessage. - /// Stubbfel, 21.08.2013. + /// Ndef record of a NDEFMessage. + /// Stubbfel, 21.08.2013. public abstract class NDEFRecord { #region Members - /// The maximum record pay load. + /// The maximum record pay load. public const int MaxRecordPayLoad = 255; - /// Size of the type. + /// Size of the type. protected const byte TypeSize = 0x01; #endregion #region Constructors - /// Initializes a new instance of the NDEFRecord class. - /// Stubbfel, 21.08.2013. + + /// Initializes a new instance of the NDEFRecord class. + /// Stubbfel, 21.08.2013. public NDEFRecord() { } - /// Initializes a new instance of the NDEFRecord class. - /// Stubbfel, 21.08.2013. - /// The array. - /// (Optional) zero-based index of the. + /// Initializes a new instance of the NDEFRecord class. + /// Stubbfel, 21.08.2013. + /// The array. + /// (Optional) zero-based index of the. public NDEFRecord(byte[] array, int index = 0) { this.FormatFlags = array[index]; @@ -44,8 +46,8 @@ namespace CampusAppWP8.Utility.NDEF #region enum - /// Values that represent NDEFFlags. - /// Stubbfel, 21.08.2013. + /// Values that represent NDEFFlags. + /// Stubbfel, 21.08.2013. public enum NDEFFlags { /// An Enum constant representing the UNSET option. @@ -70,8 +72,8 @@ namespace CampusAppWP8.Utility.NDEF TNFSET = 0x03 } - /// Values that represent TNFVAL. - /// Stubbfel, 21.08.2013. + /// Values that represent TNFVAL. + /// Stubbfel, 21.08.2013. public enum TNFVAL { /// An enum constant representing the empty option. @@ -102,36 +104,37 @@ namespace CampusAppWP8.Utility.NDEF #endregion #region Properties - /// Gets or sets the MBFlag. - /// The MBFlag. + + /// Gets or sets the MBFlag. + /// The MBFlag. public NDEFFlags MB { get; set; } - /// Gets or sets MEFlag. - /// The MEFlag . + /// Gets or sets MEFlag. + /// The MEFlag . public NDEFFlags ME { get; set; } - /// Gets or sets the CFFlag. - /// The CFFlag. + /// Gets or sets the CFFlag. + /// The CFFlag. public NDEFFlags CF { get; set; } - /// Gets or sets the SRFlag. - /// The SRFlag. + /// Gets or sets the SRFlag. + /// The SRFlag. public NDEFFlags SR { get; set; } - /// Gets or sets the ILFlag. - /// The ILFlag. + /// Gets or sets the ILFlag. + /// The ILFlag. public NDEFFlags IL { get; set; } - /// Gets or sets the TNFField. - /// The TNFField. + /// Gets or sets the TNFField. + /// The TNFField. public TNFVAL TNF { get; set; } - /// Gets or sets the type. - /// The type. + /// Gets or sets the type. + /// The type. public NDEFMessage.TYPEVAL Type { get; set; } - /// Gets or sets the format flags. - /// The format flags. + /// Gets the format flags. + /// The format flags. public byte FormatFlags { get @@ -150,12 +153,12 @@ namespace CampusAppWP8.Utility.NDEF } } - /// Gets or sets the payload. - /// The payload. + /// Gets or sets the payload. + /// The payload. public string Payload { get; set; } - /// Gets the size of the record. - /// The size of the record. + /// Gets the size of the record. + /// The size of the record. public int RecordSize { get @@ -164,21 +167,21 @@ namespace CampusAppWP8.Utility.NDEF } } - /// Gets or sets the payload praefix. - /// The payload praefix. + /// Gets or sets the payload praefix. + /// The payload praefix. public string PayloadPraefix { get; set; } - /// Gets or sets the size of the header. - /// The size of the header. + /// Gets or sets the size of the header. + /// The size of the header. protected int HeaderSize { get; set; } #endregion #region Methods - /// Converts the record to a byte array. - /// Stubbfel, 21.08.2013. - /// This object as a byte[]. + /// Converts the record to a byte array. + /// Stubbfel, 21.08.2013. + /// This object as a byte[]. public abstract byte[] ToByteArray(); #endregion diff --git a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs index 438edc25..29785ef1 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/NDEF/NDEFShortRecord.cs @@ -1,22 +1,24 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 21.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the ndef short record class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility.NDEF { using System.Text; - /// Ndef short record. - /// Stubbfel, 21.08.2013. + /// Ndef short record. + /// Stubbfel, 21.08.2013. + /// public class NDEFShortRecord : NDEFRecord { #region Constructor - /// Initializes a new instance of the NDEFShortRecord class. - /// Stubbfel, 21.08.2013. + /// Initializes a new instance of the NDEFShortRecord class. + /// Stubbfel, 21.08.2013. public NDEFShortRecord() { this.HeaderSize = 4; @@ -25,10 +27,10 @@ namespace CampusAppWP8.Utility.NDEF this.CF = NDEFFlags.UNSET; } - /// Initializes a new instance of the NDEFShortRecord class. - /// Stubbfel, 21.08.2013. - /// The array. - /// (Optional) zero-based index of the. + /// Initializes a new instance of the NDEFShortRecord class. + /// Stubbfel, 21.08.2013. + /// The array. + /// (Optional) zero-based index of the. public NDEFShortRecord(byte[] array, int index = 0) : base(array) { @@ -43,9 +45,9 @@ namespace CampusAppWP8.Utility.NDEF #region Method - /// Converts this NDEFShortRecord to a byte array. - /// Stubbfel, 21.08.2013. - /// This object as a byte[]. + /// Converts this NDEFShortRecord to a byte array. + /// Stubbfel, 21.08.2013. + /// public override byte[] ToByteArray() { byte[] payloadAr = Encoding.UTF8.GetBytes(this.PayloadPraefix + this.Payload); diff --git a/CampusAppWP8/CampusAppWP8/Utility/Wp8StringManager.cs b/CampusAppWP8/CampusAppWP8/Utility/Wp8StringManager.cs index f8c57b83..fe0a7735 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Wp8StringManager.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Wp8StringManager.cs @@ -1,26 +1,26 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 06.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the wp 8 string manager class +//----------------------------------------------------------------------- namespace CampusAppWP8.Utility { using System; using System.Text.RegularExpressions; using CampusAppWP8.Resources; - /// - /// Class provides some special StringMethods - /// + /// Class provides some special StringMethods. + /// Stubbfel, 15.10.2013. + /// public class Wp8StringManager : CampusAppWPortalLib8.Utility.DefaultStringManager { - /// - /// Method removes Html-Tag of a String - /// - /// String with Html-Tags - /// String without Html-Tags + /// Method removes Html-Tag of a String. + /// Stubbfel, 15.10.2013. + /// String with Html-Tags. + /// String without Html-Tags. public static string StripAndDecodeHTML(string inputString) { return System.Net.HttpUtility.HtmlDecode(Wp8StringManager.StripHTML(inputString)); diff --git a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/ScheduledAgent.cs b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/ScheduledAgent.cs index 813f7899..eb22f70b 100644 --- a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/ScheduledAgent.cs +++ b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/ScheduledAgent.cs @@ -1,11 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 18.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the scheduled agent class +//----------------------------------------------------------------------- namespace CampusAppWP8ScheduledTaskAgent { using System; @@ -21,40 +21,31 @@ namespace CampusAppWP8ScheduledTaskAgent using Microsoft.Phone.Scheduler; using Microsoft.Phone.Shell; - /// - /// Class for agent of the BackgroundTask - /// + /// Class for agent of the BackgroundTask. + /// Stubbfel, 15.10.2013. + /// public class ScheduledAgent : ScheduledTaskAgent { #region Member - /// - /// Model for the mensa feed - /// + /// Model for the mensa feed. private MenuWeekModel mensaModel; - /// - /// Model for the event feed - /// + /// Model for the event feed. private RSSViewModel eventModel; - /// - /// Model for the news feed - /// + /// Model for the news feed. private RSSViewModel newsModel; - /// - /// Variable for the runnig feeds - /// + /// Variable for the running feeds. private int runningFeeds; #endregion #region Constructor - /// - /// Initializes static members of the class. - /// + /// Initializes static members of the class. + /// Stubbfel, 15.10.2013. static ScheduledAgent() { Deployment.Current.Dispatcher.BeginInvoke(delegate @@ -69,10 +60,9 @@ namespace CampusAppWP8ScheduledTaskAgent #region protected - /// - /// override OnInvoke - /// - /// the background Task + /// override OnInvoke. + /// Stubbfel, 15.10.2013. + /// protected override void OnInvoke(ScheduledTask task) { int notRunningFeeds = 0; @@ -120,11 +110,10 @@ namespace CampusAppWP8ScheduledTaskAgent #region private - /// - /// Method handle UnhandledException - /// - /// sender of Exception - /// Exception Args + /// Method handle UnhandledException. + /// Stubbfel, 15.10.2013. + /// sender of Exception. + /// Exception Args. private static void UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { if (Debugger.IsAttached) @@ -133,10 +122,9 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// Method handle the EventBackgroundTask - /// - /// the eventTask + /// Method handle the EventBackgroundTask. + /// Stubbfel, 15.10.2013. + /// the eventTask. private void HandleEventTask(ScheduledTask task) { if (this.eventModel == null || !this.CheckRssIsUpToDate(this.eventModel.CreateTime)) @@ -155,10 +143,9 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// Method handle the NewsBackgroundTask - /// - /// the newsTask + /// Method handle the NewsBackgroundTask. + /// Stubbfel, 15.10.2013. + /// the newsTask. private void HandleNewsTask(ScheduledTask task) { if (this.newsModel == null || !this.CheckRssIsUpToDate(this.newsModel.CreateTime)) @@ -177,11 +164,10 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// ResponseHandler for the EventFeed - /// - /// sender of the Event - /// Event Args + /// ResponseHandler for the EventFeed. + /// Stubbfel, 15.10.2013. + /// sender of the Event. + /// Event Args. private void GetEventIsReady(object sender, System.Net.DownloadStringCompletedEventArgs arg) { if (arg.Result != null) @@ -200,11 +186,10 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// ResponseHandler for the NewsFeed - /// - /// sender of the Event - /// Event Args + /// ResponseHandler for the NewsFeed. + /// Stubbfel, 15.10.2013. + /// sender of the Event. + /// Event Args. private void GetNewsIsReady(object sender, System.Net.DownloadStringCompletedEventArgs arg) { if (arg.Result != null) @@ -223,9 +208,8 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// Method update the NewsTile - /// + /// Method update the NewsTile. + /// Stubbfel, 15.10.2013. private void UpdateNewsTile() { ShellTile tileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathNews_NewsIndexPage)); @@ -243,6 +227,7 @@ namespace CampusAppWP8ScheduledTaskAgent tileToFind.Update(data); } + this.runningFeeds--; } @@ -256,9 +241,8 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// Method update the EventTile - /// + /// Method update the EventTile. + /// Stubbfel, 15.10.2013. private void UpdateEventTile() { ShellTile tileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathEvents_EventsIndexPage)); @@ -277,6 +261,7 @@ namespace CampusAppWP8ScheduledTaskAgent tileToFind.Update(data); } + this.runningFeeds--; } @@ -286,11 +271,10 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// Determine the correct MensaFeed/Url - /// - /// the Description of the MensaTask - /// Url of a mensa, which is set is in the UserProfile + /// Determine the correct MensaFeed/Url. + /// Stubbfel, 15.10.2013. + /// the Description of the MensaTask. + /// Url of a mensa, which is set is in the UserProfile. private Uri CalcMensaUrl(string mensaTaskDesc) { Uri url; @@ -318,10 +302,9 @@ namespace CampusAppWP8ScheduledTaskAgent return url; } - /// - /// Method handle the MensaBackgroundTask - /// - /// the newsTask + /// Method handle the MensaBackgroundTask. + /// Stubbfel, 15.10.2013. + /// the newsTask. private void HandleMensaTask(ScheduledTask task) { if (this.mensaModel == null || !this.CheckMensaIsUpToDate(this.mensaModel.CreateTime)) @@ -336,11 +319,10 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// ResponseHandler for the MensaFeed - /// - /// sender of the Event - /// Event Args + /// ResponseHandler for the MensaFeed. + /// Stubbfel, 15.10.2013. + /// sender of the Event. + /// Event Args. private void GetMensaIsReady(object sender, System.Net.DownloadStringCompletedEventArgs arg) { if (arg.Result != null) @@ -358,9 +340,8 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// Method update the NewsTile - /// + /// Method update the NewsTile. + /// Stubbfel, 15.10.2013. private void UpdateMensaTile() { ShellTile tileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathMensa_MensaPage)); @@ -391,6 +372,7 @@ namespace CampusAppWP8ScheduledTaskAgent int randomNumber = random.Next(0, mealCount); MealModel meal = this.mensaModel.Menus[dayIndex].Meals[randomNumber]; data.WideContent3 = meal.MealName + ": " + DefaultStringManager.ToShortString(meal.MealDesc, 30, "..."); + // data.Count = this.mensaModel.Menus[dayIndex].Meals.Count; } } @@ -405,11 +387,10 @@ namespace CampusAppWP8ScheduledTaskAgent } } - /// - /// Check if the model of the mensa is up-to-date - /// - /// Date of the last modification - /// true, if it is up-to-date, otherwise false + /// Check if the model of the mensa is up-to-date. + /// Stubbfel, 15.10.2013. + /// Date of the last modification. + /// true, if it is up-to-date, otherwise false. private bool CheckMensaIsUpToDate(DateTime lastModified) { int diff = lastModified.CompareTo(MenuWeekModel.CalcFirstWeekDay()); @@ -422,11 +403,10 @@ namespace CampusAppWP8ScheduledTaskAgent return true; } - /// - /// Check if the model of the RSS feed is up-to-date - /// - /// Date of the last modification - /// true, if it is up-to-date, otherwise false + /// Check if the model of the RSS feed is up-to-date. + /// Stubbfel, 15.10.2013. + /// Date of the last modification. + /// true, if it is up-to-date, otherwise false. private bool CheckRssIsUpToDate(DateTime lastModified) { int diff = lastModified.CompareTo(DateTime.Now.AddDays(1)); diff --git a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Settings.StyleCop b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Settings.StyleCop index b0c0a6a8..97da1791 100644 --- a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Settings.StyleCop +++ b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Settings.StyleCop @@ -2,13 +2,14 @@ perodic + stubbfel BTU/IIT - BTU/IIT + The MIT License (MIT). Copyright (c) 2013 BTU/IIT. diff --git a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/BackgroundTasks.cs b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/BackgroundTasks.cs index 26963480..7913e2e8 100644 --- a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/BackgroundTasks.cs +++ b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/BackgroundTasks.cs @@ -1,26 +1,25 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 18.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the background tasks class +//----------------------------------------------------------------------- namespace CampusAppWP8ScheduledTaskAgent.Utility { using System; using CampusAppWPortalLib8.Utility; using Microsoft.Phone.Scheduler; - /// - /// Class provide some static methods for background tasks - /// + /// Class provide some static methods for background tasks. + /// Stubbfel, 15.10.2013. + /// public class BackgroundTasks : AbstractBackgroundTasks { - /// - /// Method stop a certain PerodicTask - /// - /// name of the task + /// Method stop a certain PerodicTask. + /// Stubbfel, 15.10.2013. + /// name of the task. public static void StopPerodicTask(string taskName) { PeriodicTask periodicTask = ScheduledActionService.Find(taskName) as PeriodicTask; diff --git a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/HttpRequest.cs b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/HttpRequest.cs index 2c558936..53632420 100644 --- a/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/HttpRequest.cs +++ b/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Utility/HttpRequest.cs @@ -1,34 +1,33 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the HTTP request class +//----------------------------------------------------------------------- namespace CampusAppWP8ScheduledTaskAgent.Utility { using System; using System.Net; using CampusAppWPortalLib8.Utility; - /// - /// Class realize the access of restful HttpRequest - /// + /// Class realize the access of restful HttpRequest. + /// Stubbfel, 15.10.2013. + /// public class HttpRequest : AbstractHttpRequest { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public HttpRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// the url of the HttpRequest base address + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. + /// the url of the HttpRequest base address. public HttpRequest(Uri apiBaseAddress) { this.BaseAddress = apiBaseAddress.AbsoluteUri; @@ -38,11 +37,10 @@ namespace CampusAppWP8ScheduledTaskAgent.Utility #region Methods - /// - /// Method realize the http-get-method resource - /// - /// Url of the resource - /// callback method + /// Method realize the http-get-method resource. + /// Stubbfel, 15.10.2013. + /// Url of the resource. + /// callback method. public void HttpGet(Uri url, Action action) { WebClient client = new WebClient(); diff --git a/CampusAppWP8/CampusAppWPortalLib8/CampusAppWPortalLib8.csproj b/CampusAppWP8/CampusAppWPortalLib8/CampusAppWPortalLib8.csproj index f7e93044..dea60ce8 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/CampusAppWPortalLib8.csproj +++ b/CampusAppWP8/CampusAppWPortalLib8/CampusAppWPortalLib8.csproj @@ -61,7 +61,9 @@ - + + True + @@ -75,7 +77,9 @@ - + + True + diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/AbstractMainModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/AbstractMainModel.cs index d43496b5..d35965c1 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/AbstractMainModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/AbstractMainModel.cs @@ -1,10 +1,11 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 05.07.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the abstract main model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model { using System; @@ -12,47 +13,32 @@ namespace CampusAppWPortalLib8.Model using CampusAppWPortalLib8.Model.Utility; using CampusAppWPortalLib8.Utility; - /// - /// abstract Base model io handling class. - /// - /// model type + /// abstract Base model io handling class. + /// fiedlchr, 15.10.2013. + /// model type. public abstract class AbstractMainModel { #region Member - /// - /// File object. - /// + /// File object. private AbstractFile file = null; - /// - /// Model io type. - /// + /// Model io type. private ModelType modelType; - /// - /// Model object. - /// + /// Model object. private T model = default(T); - /// - /// Web object. - /// + /// Web object. private AbstractHttpRequest api = null; - /// - /// Filename of saved data. - /// + /// Filename of saved data. private string fileName = string.Empty; - /// - /// Url of the feed data. - /// + /// Url of the feed data. private Uri httpApiUri = null; - /// - /// Parameterized uri of the feed. - /// + /// Parameterized uri of the feed. private Uri paramizedUri = null; #endregion @@ -60,21 +46,26 @@ namespace CampusAppWPortalLib8.Model #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Model IO type - /// name of the file - /// url of the feed + /// fiedlchr, 15.10.2013. + /// Model IO type. + /// name of the file. + /// url of the feed. public AbstractMainModel(ModelType modelType, string fileName, string url) { this.Init(modelType, fileName, url); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Model IO type - /// name of the file or the url of the feed + /// fiedlchr, 15.10.2013. + /// + /// Thrown when the requested operation is not supported. + /// + /// Model IO type. + /// name of the file or the url of the feed. public AbstractMainModel(ModelType modelType, string sourceName) { if (modelType == ModelType.File) @@ -95,67 +86,48 @@ namespace CampusAppWPortalLib8.Model #region Events - /// - /// Delegate of the OnIO callback function. - /// + /// Delegate of the OnIO callback function. + /// fiedlchr, 15.10.2013. public delegate void OnIO(); - /// - /// Delegate of the OnFailed(File/Web) callback function. - /// + /// Delegate of the OnFailed(File/Web) callback function. + /// fiedlchr, 15.10.2013. public delegate void OnFailed(); - /// - /// Delegate of the IsModelUpToDate callback function. - /// - /// data model - /// true, model is up to date + /// Delegate of the IsModelUpToDate callback function. + /// fiedlchr, 15.10.2013. + /// data model. + /// true, model is up to date. public delegate bool IsModelUpToDate(T model); - /// - /// Callback pointer, called before loading. - /// + /// Callback pointer, called before loading. public event OnIO OnLoading = null; - /// - /// Callback pointer, called after loading. - /// + /// Callback pointer, called after loading. public event OnIO OnLoaded = null; - /// - /// Callback pointer, called before saving. - /// + /// Callback pointer, called before saving. public event OnIO OnSaving = null; - /// - /// Callback pointer, called after saving. - /// + /// Callback pointer, called after saving. public event OnIO OnSaved = null; - /// - /// Callback pointer, called after failed file loading. - /// + /// Callback pointer, called after failed file loading. public event OnFailed OnFailedFile = null; - /// - /// Callback pointer, called after failed web loading. - /// + /// Callback pointer, called after failed web loading. public event OnFailed OnFailedWeb = null; /// - /// Callback pointer, called after failed file or web loading, if there - /// is no specialized onFailed callback set. + /// Callback pointer, called after failed file or web loading, if there is no specialized + /// onFailed callback set. /// public event OnFailed OnFailedLoad = null; - /// - /// Callback pointer, called after failed saving data to file. - /// + /// Callback pointer, called after failed saving data to file. public event OnFailed OnFailedSave = null; - /// - /// Callback pointer, for checking if model is up to date at loading. - /// + /// Callback pointer, for checking if model is up to date at loading. public event IsModelUpToDate IsModelUpToDateOnLoad = null; /// @@ -163,15 +135,15 @@ namespace CampusAppWPortalLib8.Model /// (currently unused) /// #pragma warning disable 0067 + /// Occurs when Is Model Up To Date On Save. public event IsModelUpToDate IsModelUpToDateOnSave = null; #endregion #region Property - /// - /// Gets or sets the Model. - /// + /// Gets or sets the Model. + /// The model. public T Model { get @@ -185,45 +157,40 @@ namespace CampusAppWPortalLib8.Model } } - /// - /// Gets or sets the File. - /// + /// Gets the File. + /// The file. public AbstractFile File { get { return this.file; } protected set { this.file = value; } } - /// - /// Gets or sets the ModelType. - /// + /// Gets the ModelType. + /// The type of the model. public ModelType ModelType { get { return this.modelType; } protected set { this.modelType = value; } } - /// - /// Gets or sets the Api. - /// + /// Gets the Api. + /// The API. public AbstractHttpRequest Api { get { return this.api; } protected set { this.api = value; } } - /// - /// Gets or sets the ApiUrl. - /// + /// Gets the ApiUrl. + /// The HTTP API URI. public Uri HttpApiUri { get { return this.httpApiUri; } protected set { this.httpApiUri = value; } } - /// - /// Gets or sets the FileName. - /// + /// Gets the FileName. + /// The name of the file. public string FileName { get { return this.fileName; } @@ -236,43 +203,42 @@ namespace CampusAppWPortalLib8.Model #region public - /// - /// Method Fire all Events for fail load - /// + /// Method Fire all Events for fail load. + /// fiedlchr, 15.10.2013. public void FireLoadFailEvents() { this.RunOnFailedCallback(this.OnFailedWeb, this.OnFailedLoad); } - /// - /// Method Fire all Events for load is complete - /// + /// Method Fire all Events for load is complete. + /// fiedlchr, 15.10.2013. public void FireLoadCompletedEvents() { this.RunOnIOCallback(this.OnLoaded); } - - /// - /// Forces a update from web. - /// + + /// Forces a update from web. + /// fiedlchr, 15.10.2013. public void ForceWebUpdate() { this.LoadData(ForceType.FORCE_WEB); } - /// - /// Forces a update from file. - /// + /// Forces a update from file. + /// fiedlchr, 15.10.2013. public void ForceReadFile() { this.LoadData(ForceType.FORCE_FILE); } /// - /// Load the data if necessary, from web or from file, regarding if - /// the file data is up to date. + /// Load the data if necessary, from web or from file, regarding if the file data is up to + /// date. /// - /// if set/not invalid/not default, force to load from web or file + /// fiedlchr, 15.10.2013. + /// + /// (Optional) if set/not invalid/not default, force to load from web or file. + /// public void LoadData(ForceType force = ForceType.INVALID) { this.RunOnIOCallback(this.OnLoading); @@ -364,10 +330,9 @@ namespace CampusAppWPortalLib8.Model } } - /// - /// Save the model data if necessary. - /// - /// force saving. DEFAULT: false + /// Save the model data if necessary. + /// fiedlchr, 15.10.2013. + /// (Optional) force saving. DEFAULT: false. public void SaveData(bool force = false) { if ((this.file != null) @@ -396,19 +361,17 @@ namespace CampusAppWPortalLib8.Model } } - /// - /// Return the model io type. - /// - /// model io type + /// Return the model io type. + /// fiedlchr, 15.10.2013. + /// model io type. public ModelType GetModelType() { return this.modelType; } - /// - /// Create the parameterized uri. - /// - /// uri parameter list + /// Create the parameterized uri. + /// fiedlchr, 15.10.2013. + /// uri parameter list. public void SetUriParams(List parameters) { if (this.api != null) @@ -417,9 +380,8 @@ namespace CampusAppWPortalLib8.Model } } - /// - /// Clear the parameterized uri. - /// + /// Clear the parameterized uri. + /// fiedlchr, 15.10.2013. public void ClearUriParams() { this.paramizedUri = null; @@ -429,58 +391,49 @@ namespace CampusAppWPortalLib8.Model #region protected - /// - /// Abstract declaration of the model deserialize function. - /// - /// model data as byte array - /// true, is succeeded + /// Abstract declaration of the model deserialize function. + /// fiedlchr, 15.10.2013. + /// model data as byte array. + /// true, is succeeded. protected abstract bool DeserializeModel(byte[] modelData); - /// - /// Abstract declaration of the model serialize function. - /// - /// model data as byte array + /// Abstract declaration of the model serialize function. + /// fiedlchr, 15.10.2013. + /// model data as byte array. protected abstract byte[] SerializeModel(); - /// - /// Method send a HttpGet - /// - /// the url + /// Method send a HttpGet. + /// fiedlchr, 15.10.2013. + /// the url. protected abstract void SendHttpGet(Uri url); - /// - /// Method check if model or file is Not up-to-date - /// - /// the check function - /// true if it is not up-to-date, otherwise false + /// Method check if model or file is Not up-to-date. + /// fiedlchr, 15.10.2013. + /// the check function. + /// true if it is not up-to-date, otherwise false. protected abstract bool CheckIsNotUpToDate(object checkFunc); - /// - /// Method check if file is Not up-to-date for load process - /// - /// true if it is not up-to-date, otherwise false + /// Method check if file is Not up-to-date for load process. + /// fiedlchr, 15.10.2013. + /// true if it is not up-to-date, otherwise false. protected abstract bool CheckLoadFileIsNotUpToDate(); - /// - /// Method check if file is Not up-to-date for load process - /// - /// true if it is not up-to-date, otherwise false + /// Method check if file is Not up-to-date for load process. + /// fiedlchr, 15.10.2013. + /// true if it is not up-to-date, otherwise false. protected abstract bool CheckSaveFileIsNotUpToDate(); - /// - /// Initializes the file object. - /// + /// Initializes the file object. + /// fiedlchr, 15.10.2013. protected abstract void InitFile(); - /// - /// Initializes the web object. - /// + /// Initializes the web object. + /// fiedlchr, 15.10.2013. protected abstract void InitHttpApi(); - /// - /// Check if the model io type is file. - /// - /// true, if the model io type has file. + /// Check if the model io type is file. + /// fiedlchr, 15.10.2013. + /// true, if the model io type has file. protected bool IsFile() { bool retValue = false; @@ -493,10 +446,9 @@ namespace CampusAppWPortalLib8.Model return retValue; } - /// - /// Check if the model io type is feed. - /// - /// true if the model io type has feed. + /// Check if the model io type is feed. + /// fiedlchr, 15.10.2013. + /// true if the model io type has feed. protected bool IsHttpApi() { bool retValue = false; @@ -513,12 +465,11 @@ namespace CampusAppWPortalLib8.Model #region private - /// - /// Initialize the class. Is called by the constructors. - /// - /// model IO type - /// name of the data file - /// url of the feed data + /// Initialize the class. Is called by the constructors. + /// fiedlchr, 15.10.2013. + /// model IO type. + /// name of the data file. + /// url of the feed data. private void Init(ModelType modelType, string fileName, string url) { this.modelType = modelType; @@ -543,10 +494,9 @@ namespace CampusAppWPortalLib8.Model } } - /// - /// Executes the on i/o callback operation. - /// - /// The callback function. + /// Executes the on i/o callback operation. + /// fiedlchr, 15.10.2013. + /// The callback function. private void RunOnIOCallback(OnIO callbackFunc) { if (callbackFunc != null) @@ -555,9 +505,10 @@ namespace CampusAppWPortalLib8.Model } } - /// Executes the on failed callback operation. - /// The special function. - /// The default function. + /// Executes the on failed callback operation. + /// fiedlchr, 15.10.2013. + /// The special function. + /// The default function. private void RunOnFailedCallback(OnFailed specialFunc, OnFailed defaultFunc) { if (specialFunc != null) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/ChairModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/ChairModel.cs index 704796e6..ac3cf6c9 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/ChairModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/ChairModel.cs @@ -1,44 +1,37 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//---------------------------------------------------------------------- +// 15.10.2013 +// Implements the chair model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Departments { using System.Globalization; using System.Xml.Serialization; - /// - /// Class to hold information about a professorship chair. - /// + /// Class to hold information about a professorship chair. + /// fiedlchr, 15.10.2013. public class ChairModel { #region Member - /// - /// German name of the chair. - /// + /// German name of the chair. private string nameDE = string.Empty; - /// - /// Link to the chair page. - /// + /// Link to the chair page. private string url = string.Empty; - /// - /// English name of the chair. - /// + /// English name of the chair. private string nameEN = string.Empty; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. public ChairModel() { } @@ -47,19 +40,17 @@ namespace CampusAppWPortalLib8.Model.Departments #region Property - /// - /// Initializes a new instance of the class. - /// - /// name of the chair + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. + /// name of the chair. public ChairModel(string name) { this.nameDE = name; this.nameEN = name; } - /// - /// Gets or sets the german name of the chair. - /// + /// Gets or sets the german name of the chair. + /// The name de. [XmlAttribute("name_de")] public string NameDE { @@ -77,9 +68,8 @@ namespace CampusAppWPortalLib8.Model.Departments } } - /// - /// Gets or sets the english name of the chair. - /// + /// Gets or sets the english name of the chair. + /// The name en. [XmlAttribute("name_en")] public string NameEN { @@ -97,9 +87,8 @@ namespace CampusAppWPortalLib8.Model.Departments } } - /// - /// Gets or sets the url of the chair homepage. - /// + /// Gets or sets the url of the chair homepage. + /// The URL. [XmlAttribute("url")] public string Url { @@ -117,9 +106,8 @@ namespace CampusAppWPortalLib8.Model.Departments } } - /// - /// Gets the localized name of the chair. - /// + /// Gets the localized name of the chair. + /// The name. public string Name { get diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/DepartmentModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/DepartmentModel.cs index 37ca6719..0fc94839 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/DepartmentModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/DepartmentModel.cs @@ -1,41 +1,36 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//---------------------------------------------------------------------- +// 15.10.2013 +// Implements the department model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Departments { using System; using System.Collections.ObjectModel; using System.Xml.Serialization; - /// - /// View model for department page. - /// + /// View model for department page. + /// fiedlchr, 15.10.2013. [XmlRoot("root")] public class DepartmentModel { #region Member - /// - /// Object to store the time when the instance was created. - /// + /// Object to store the time when the instance was created. private DateTime createTime; - /// - /// List of faculties. - /// + /// List of faculties. private ObservableCollection faculties; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. public DepartmentModel() { this.Faculties = new ObservableCollection(); @@ -46,9 +41,8 @@ namespace CampusAppWPortalLib8.Model.Departments #region Property - /// - /// Gets or sets the faculty list. - /// + /// Gets or sets the faculty list. + /// The faculties. [XmlArray("professorships")] [XmlArrayItem("faculty")] public ObservableCollection Faculties @@ -67,9 +61,8 @@ namespace CampusAppWPortalLib8.Model.Departments } } - /// - /// Gets the creation time. - /// + /// Gets the creation time. + /// The create time. public DateTime CreateTime { get @@ -83,10 +76,11 @@ namespace CampusAppWPortalLib8.Model.Departments #region Method /// - /// Check if the content of the faculty lists hast changed since the - /// last call of this function. + /// Check if the content of the faculty lists hast changed since the last call of this + /// function. /// - /// true, if changes happen since last request, otherwise false + /// fiedlchr, 15.10.2013. + /// true, if changes happen since last request, otherwise false. public bool HasChanged() { bool retValue = false; diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/FacultyModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/FacultyModel.cs index 802fe20e..39df78b3 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/FacultyModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Departments/FacultyModel.cs @@ -1,46 +1,38 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//---------------------------------------------------------------------- +// 15.10.2013 +// Implements the faculty model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Departments { using System.Collections.ObjectModel; using System.Xml.Serialization; using CampusAppWPortalLib8.Resources; - - /// - /// Model for holding the faculty information. - /// + + /// Model for holding the faculty information. + /// fiedlchr, 15.10.2013. public class FacultyModel { #region Member - /// - /// Object to hold the information of the chair containing to this - /// faculty. - /// + /// Object to hold the information of the chair containing to this faculty. private ObservableCollection chairs; - /// - /// Name of the faculty. - /// + /// Name of the faculty. private string name = string.Empty; - /// - /// For checking of change. - /// + /// For checking of change. private bool hasChanged = false; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. public FacultyModel() { this.chairs = new ObservableCollection(); @@ -50,19 +42,17 @@ namespace CampusAppWPortalLib8.Model.Departments #region Property - /// - /// Initializes a new instance of the class. - /// - /// name of the faculty + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. + /// name of the faculty. public FacultyModel(string name) { this.name = name; this.chairs = new ObservableCollection(); } - /// - /// Gets or sets the list of the chairs containing to this faculty. - /// + /// Gets or sets the list of the chairs containing to this faculty. + /// The chairs. [XmlElement("chair")] public ObservableCollection Chairs { @@ -80,9 +70,8 @@ namespace CampusAppWPortalLib8.Model.Departments } } - /// - /// Gets the name of the faculty. - /// + /// Gets the name of the faculty. + /// The name. public string Name { get @@ -91,9 +80,8 @@ namespace CampusAppWPortalLib8.Model.Departments } } - /// - /// Gets or sets the id of the faculty. - /// + /// Gets or sets the id of the faculty. + /// The identifier. [XmlAttribute("id")] public string Id { @@ -108,11 +96,10 @@ namespace CampusAppWPortalLib8.Model.Departments } } - /// - /// Remove a chair model from the lost. - /// - /// name of the chair - /// true, if succeeded + /// Remove a chair model from the lost. + /// fiedlchr, 15.10.2013. + /// name of the chair. + /// true, if succeeded. public bool RemoveChair(string chairName) { bool retValue = false; @@ -140,11 +127,10 @@ namespace CampusAppWPortalLib8.Model.Departments #region Method - /// - /// Add a chair to the list, if it does not already exist. - /// - /// chair model to add - /// true, is succeeded + /// Add a chair to the list, if it does not already exist. + /// fiedlchr, 15.10.2013. + /// chair model to add. + /// true, is succeeded. public bool AddChair(ChairModel chairModel) { bool retValue = false; @@ -174,14 +160,12 @@ namespace CampusAppWPortalLib8.Model.Departments return retValue; } - /// - /// Create a chair model and add it to the list, if it does not already - /// exist. - /// - /// german name of the chair - /// english name of the chair - /// url of the chair home page - /// true, if succeeded + /// Create a chair model and add it to the list, if it does not already exist. + /// fiedlchr, 15.10.2013. + /// german name of the chair. + /// english name of the chair. + /// url of the chair home page. + /// true, if succeeded. public bool AddChair(string nameDE, string nameEN, string url) { bool retValue = false; @@ -212,11 +196,10 @@ namespace CampusAppWPortalLib8.Model.Departments return retValue; } - /// - /// Return the chair model of the chair with the specified name. - /// - /// name of the chair - /// chair model, if succeeded, otherwise null + /// Return the chair model of the chair with the specified name. + /// fiedlchr, 15.10.2013. + /// name of the chair. + /// chair model, if succeeded, otherwise null. public ChairModel GetChairModel(string name) { ChairModel retValue = null; @@ -232,11 +215,10 @@ namespace CampusAppWPortalLib8.Model.Departments return retValue; } - /// - /// Return true if there were changes in the chair list, otherwise false. - /// - /// when true, the hasChanged flag will be reset - /// true, when changed, otherwise false + /// Return true if there were changes in the chair list, otherwise false. + /// fiedlchr, 15.10.2013. + /// (Optional) when true, the hasChanged flag will be reset. + /// true, when changed, otherwise false. public bool HasChanged(bool reset = true) { bool retValue = this.hasChanged; diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamListModel.cs index 551d5b7c..63dde71a 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamListModel.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- -// -// Company copyright tag. +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.09.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the exam list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Exams { using System.Collections.Generic; @@ -13,15 +14,16 @@ namespace CampusAppWPortalLib8.Model.Exams using CampusAppWPortalLib8.Model.Utility; - /// Exam list model. - /// Stubbfel, 02.09.2013. + /// Exam list model. + /// Stubbfel, 02.09.2013. + /// Generic type parameter. [XmlRoot("links")] public class ExamListModel where T : ExamModel { #region Property - /// Gets or sets the exams. - /// The exams. + /// Gets or sets the exams. + /// The exams. [XmlElement("link")] public ObservableCollection Exams { get; set; } @@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Exams #region Property - /// Creates course list. - /// Stubbfel, 10.09.2013. - /// The new course list. + /// Creates course list. + /// Stubbfel, 10.09.2013. + /// The new course list. public List CreateCourseList() { List result = new List(); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamModel.cs index 31246ac3..4279ac2e 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Exams/ExamModel.cs @@ -1,58 +1,59 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.09.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the exam model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Exams { using System.Xml.Serialization; using CampusAppWPortalLib8.Utility; - /// Exam model. - /// Stubbfel, 02.09.2013. + /// Exam model. + /// Stubbfel, 02.09.2013. public class ExamModel { #region Property - /// Gets or sets the course number. - /// The course number. + /// Gets or sets the course number. + /// The course number. [XmlAttribute("stg")] public string CourseNumber { get; set; } - /// Gets or sets the course text. - /// The course text. + /// Gets or sets the course text. + /// The course text. [XmlAttribute("stgtext")] public string CourseText { get; set; } - /// Gets or sets the degree number. - /// The degree number. + /// Gets or sets the degree number. + /// The degree number. [XmlAttribute("abschl")] public string DegreeNumber { get; set; } - /// Gets or sets the version. - /// The version. + /// Gets or sets the version. + /// The version. [XmlAttribute("pversion")] public string Version { get; set; } - /// Gets or sets the type. - /// The type. + /// Gets or sets the type. + /// The type. [XmlAttribute("typ")] public string Type { get; set; } - /// Gets or sets the title. - /// The title. + /// Gets or sets the title. + /// The title. [XmlAttribute("dtxt")] public string Title { get; set; } - /// Gets or sets the date. - /// The date. + /// Gets or sets the date. + /// The date. [XmlAttribute("datum")] public string Date { get; set; } - /// Gets or sets the link. - /// The link. + /// Gets or sets the link. + /// The link. [XmlAttribute("link")] public string Link { get; set; } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/ForcesTypes.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/ForcesTypes.cs index 5bfd2377..eb90e532 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/ForcesTypes.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/ForcesTypes.cs @@ -1,12 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// fiedlchr +// 15.10.2013 +// Implements the forces types class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model { - /// Values that represent ForceType for load function. + /// Values that represent ForceType for load function. + /// fiedlchr, 15.10.2013. public enum ForceType { /// An enumeration constant representing the invalid/default/unset option. diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/IXmlModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/IXmlModel.cs index 2543b356..2954ed92 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/IXmlModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/IXmlModel.cs @@ -1,25 +1,21 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 05.07.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Declares the IXmlModel interface +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model { - using CampusAppWPortalLib8.Utility; - - /// - /// Xml model io handler class. - /// - /// model type + /// Xml model io handler class. + /// fiedlchr, 15.10.2013. public interface IXmlModel { #region Property - /// - /// Gets or sets for the name of the root-tag - /// + /// Gets or sets for the name of the root-tag. + /// The name of the valid root. string ValidRootName { get; set; } #endregion diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureActivity.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureActivity.cs index 8f1a478e..f822f57a 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureActivity.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureActivity.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 13.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture activity class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System.Collections.ObjectModel; @@ -12,55 +13,45 @@ namespace CampusAppWPortalLib8.Model.Lecture using CampusAppWPortalLib8.Resources; using CampusAppWPortalLib8.Utility; - /// - /// Model for a Activity - /// + /// Model for a Activity. + /// Stubbfel, 15.10.2013. public class LectureActivity { #region Members - /// The activity icon name lecture. + /// The activity icon name lecture. public const string ActivityTypeLecture = "Vorlesung"; - /// The activity icon name seminar. + /// The activity icon name seminar. public const string ActivityTypeSeminar = "Seminar"; - /// The activity icon name practice. + /// The activity icon name practice. public const string ActivityTypePract = "Übung"; - /// The activity icon name lab. + /// The activity icon name lab. public const string ActivityTypeLab = "Labor"; - /// The activity icon name exam. + /// The activity icon name exam. public const string ActivityTypeExam = "Prüfung"; - /// - /// List of lecturer - /// + /// List of lecturer. private ObservableCollection lecturer; - /// - /// a formatted string for the names of the lecturers - /// + /// a formatted string for the names of the lecturers. private string lecturerString; - /// - /// a formatted string for the names of the courses - /// + /// a formatted string for the names of the courses. private string courseString; - /// - /// a formatted string for the topic of the lecture - /// + /// a formatted string for the topic of the lecture. private string topic; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LectureActivity() { } @@ -69,45 +60,38 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Proberty - /// - /// Gets or sets the type of the activity - /// + /// Gets or sets the type of the activity. + /// The type. [XmlElement("art")] public string Type { get; set; } - /// - /// Gets or sets the id of the activity - /// + /// Gets or sets the id of the activity. + /// The identifier. [XmlAttribute("id")] public int Id { get; set; } - /// - /// Gets or sets semester of the activity - /// + /// Gets or sets semester of the activity. + /// The semester. [XmlElement("semester")] public int Semester { get; set; } - /// - /// Gets or sets the contact hour - /// + /// Gets or sets the contact hour. + /// The sws. [XmlElement("sws")] public string SWS { get; set; } - /// - /// Gets or sets LectureModule - /// + /// Gets or sets LectureModule. + /// The modul. [XmlElement("modul")] public LectureModule Modul { get; set; } - /// - /// Gets or sets LectureTitle - /// + /// Gets or sets LectureTitle. + /// The title. [XmlElement("titel")] public string Title { get; set; } - /// - /// Gets or sets the lecturers - /// + /// Gets or sets the lecturers. + /// The lecturer. [XmlElement("lehrperson")] public ObservableCollection Lecturer { @@ -125,9 +109,8 @@ namespace CampusAppWPortalLib8.Model.Lecture } } - /// - /// Gets or sets the formatted string of the lecturers - /// + /// Gets or sets the formatted string of the lecturers. + /// The lecturer string. public string LecturerString { get @@ -144,9 +127,8 @@ namespace CampusAppWPortalLib8.Model.Lecture } } - /// - /// Gets or sets formatted string of the courses - /// + /// Gets or sets formatted string of the courses. + /// The course string. public string CourseString { get @@ -163,27 +145,23 @@ namespace CampusAppWPortalLib8.Model.Lecture } } - /// - /// Gets or sets the courses - /// + /// Gets or sets the courses. + /// The course. [XmlElement("studiengang")] public ObservableCollection Course { get; set; } - /// - /// Gets or sets the dates of the activity - /// + /// Gets or sets the dates of the activity. + /// The dates. [XmlElement("termin")] public ObservableCollection Dates { get; set; } - /// - /// Gets or sets the Department - /// + /// Gets or sets the Department. + /// The department. [XmlElement("zugeordnete_einrichtung")] public string Department { get; set; } - /// - /// Gets or sets the topic of the Lecture - /// + /// Gets or sets the topic of the Lecture. + /// The topic. [XmlElement("lehrinhalt")] public string Topic { @@ -206,9 +184,8 @@ namespace CampusAppWPortalLib8.Model.Lecture #region public - /// - /// Method create a formatted string of the LecturerList - /// + /// Method create a formatted string of the LecturerList. + /// Stubbfel, 15.10.2013. public void CreateLectureString() { string result = string.Empty; @@ -220,9 +197,8 @@ namespace CampusAppWPortalLib8.Model.Lecture this.LecturerString = DefaultStringManager.RemoveNewLine(result); } - /// - /// Method create a formatted string of the CourseList - /// + /// Method create a formatted string of the CourseList. + /// Stubbfel, 15.10.2013. public void CreateCourseString() { string result = string.Empty; diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureCourse.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureCourse.cs index 1faedc53..6a030cbf 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureCourse.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureCourse.cs @@ -1,23 +1,23 @@ -// -// Company copyright tag. +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture course class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System.Xml.Serialization; - /// - /// Model for a course - /// + /// Model for a course. + /// Stubbfel, 15.10.2013. public class LectureCourse { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LectureCourse() { } @@ -26,9 +26,8 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Property - /// - /// Gets or sets the title of the course - /// + /// Gets or sets the title of the course. + /// The title. [XmlElement("bezeichnung")] public string Title { get; set; } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureDate.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureDate.cs index e14aac6f..d44efabd 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureDate.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureDate.cs @@ -1,24 +1,23 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture date class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System.Xml.Serialization; - /// - /// Model for the date of an activity - /// + /// Model for the date of an activity. + /// Stubbfel, 15.10.2013. public class LectureDate { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LectureDate() { } @@ -27,45 +26,38 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Property - /// - /// Gets or sets WeekDay - /// + /// Gets or sets WeekDay. + /// The week day. [XmlElement("wochentag")] public string WeekDay { get; set; } - /// - /// Gets or sets From - /// + /// Gets or sets From. + /// from. [XmlElement("von")] public string From { get; set; } - /// - /// Gets or sets To - /// + /// Gets or sets To. + /// to. [XmlElement("bis")] public string To { get; set; } - /// - /// Gets or sets Interval - /// + /// Gets or sets Interval. + /// The interval. [XmlElement("rhythmus")] public string Interval { get; set; } - /// - /// Gets or sets Room - /// + /// Gets or sets Room. + /// The room. [XmlElement("raum")] public string Room { get; set; } - /// - /// Gets or sets StartDate - /// + /// Gets or sets StartDate. + /// The start date. [XmlElement("anfangsdatum")] public string StartDate { get; set; } - /// - /// Gets or sets EndDate - /// + /// Gets or sets EndDate. + /// The end date. [XmlElement("enddatum")] public string EndDate { get; set; } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureLecturer.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureLecturer.cs index 2c69ab67..f78e47c5 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureLecturer.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureLecturer.cs @@ -1,24 +1,23 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture lecturer class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System.Xml.Serialization; - /// - /// Model for a lecturer - /// + /// Model for a lecturer. + /// Stubbfel, 15.10.2013. public class LectureLecturer { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LectureLecturer() { } @@ -27,27 +26,23 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Property - /// - /// Gets or sets the FirstName of a lecturer - /// + /// Gets or sets the FirstName of a lecturer. + /// The name of the first. [XmlElement("vorname")] public string FirstName { get; set; } - /// - /// Gets or sets the LastName of a lecturer - /// + /// Gets or sets the LastName of a lecturer. + /// The name of the last. [XmlElement("name")] public string LastName { get; set; } - /// - /// Gets or sets the title of a lecturer - /// + /// Gets or sets the title of a lecturer. + /// The title. [XmlElement("titel")] public string Title { get; set; } - /// - /// Gets or sets the Responsibility of a lecturer - /// + /// Gets or sets the Responsibility of a lecturer. + /// The responsibility. [XmlAttribute("zustaendigkeit")] public string Responsibility { get; set; } @@ -56,9 +51,10 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Method /// - /// Method overrides the base ToString() and create an formatted string of the lecturer + /// Method overrides the base ToString() and create an formatted string of the lecturer. /// - /// returns a string like: [Title] FirstName LastName [(Responsibility)] + /// Stubbfel, 15.10.2013. + /// returns a string like: [Title] FirstName LastName [(Responsibility)]. public override string ToString() { string result = string.Empty; diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureList.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureList.cs index 5891f1e8..a10e7895 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureList.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureList.cs @@ -1,28 +1,27 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture list class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System.Collections.ObjectModel; using System.Linq; using System.Xml.Serialization; - /// - /// Model for a List of LectureActivity - /// - /// T : LectureActivity + /// Model for a List of LectureActivity. + /// Stubbfel, 15.10.2013. + /// T : LectureActivity. [XmlRoot("lsf_auszug")] public class LectureList where T : LectureActivity { #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LectureList() { } @@ -31,9 +30,8 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Proberty - /// - /// Gets or sets List of the activities - /// + /// Gets or sets List of the activities. + /// The activities. [XmlArray("veranstaltungsliste")] [XmlArrayItem("veranstaltung")] public ObservableCollection Activities { get; set; } @@ -42,20 +40,19 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Methods - /// - /// Method return a certain activity - /// - /// id of the activity - /// the activity (FirstOrDefault) + /// Method return a certain activity. + /// Stubbfel, 15.10.2013. + /// id of the activity. + /// the activity (FirstOrDefault) public T GetActivity(int id) { T activity = this.Activities.Where(p => p.Id == id).FirstOrDefault(); return activity; } - /// Filter by course string. - /// Stubbfel, 10.09.2013. - /// Specifies the filter. + /// Filter by course string. + /// Stubbfel, 10.09.2013. + /// Specifies the filter. public void FilterByCourseTitle(string filter) { ObservableCollection filteredCollection = new ObservableCollection(); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureModule.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureModule.cs index 0b20bf00..e7015654 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureModule.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Lecture/LectureModule.cs @@ -1,40 +1,35 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the lecture module class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System; using System.Xml.Serialization; using CampusAppWPortalLib8.Resources; - /// - /// Model for the module of an lecture - /// + /// Model for the module of an lecture. + /// Stubbfel, 15.10.2013. public class LectureModule { #region Members - /// - /// Number of the module (like an id) - /// + /// Number of the module (like an id) private int number; - /// - /// Url to the website of the module - /// + /// Url to the website of the module. private Uri url; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LectureModule() { } @@ -43,15 +38,13 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Property - /// - /// Gets or sets the title of the module - /// + /// Gets or sets the title of the module. + /// The title. [XmlElement("titel")] public string Title { get; set; } - /// - /// Gets or sets the number of the module and create the URL - /// + /// Gets or sets the number of the module and create the URL. + /// The total number of ber. [XmlElement("nummer")] public int Number { @@ -70,9 +63,8 @@ namespace CampusAppWPortalLib8.Model.Lecture } } - /// - /// Gets the URL of the module - /// + /// Gets the URL of the module. + /// The URL. public Uri Url { get @@ -85,9 +77,8 @@ namespace CampusAppWPortalLib8.Model.Lecture #region Methods - /// - /// Method create the url of the module - /// + /// Method create the url of the module. + /// Stubbfel, 15.10.2013. private void CreateUrl() { this.url = new Uri(Constants.UrlLecture_ModulBaseAddr + this.number.ToString()); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkListModel.cs index 6895ca07..8177cfea 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkListModel.cs @@ -1,37 +1,33 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.07.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the link list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Link { using System; using System.Collections.ObjectModel; using System.Xml.Serialization; - /// - /// Model for a list of links. - /// + /// Model for a list of links. + /// Stubbfel, 15.10.2013. [XmlRoot("root")] public class LinkListModel { #region Member - /// - /// Time when the model was created. - /// + /// Time when the model was created. private readonly DateTime createTime; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LinkListModel() { this.createTime = DateTime.Now; @@ -41,16 +37,14 @@ namespace CampusAppWPortalLib8.Model.Link #region Property - /// - /// Gets or sets feed information item list. - /// + /// Gets or sets feed information item list. + /// The links. [XmlArray("data")] [XmlArrayItem("link")] public ObservableCollection Links { get; set; } - /// - /// Gets the creation time of the model. - /// + /// Gets the creation time of the model. + /// The create time. public DateTime CreateTime { get diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkModel.cs index 9e2a67cb..d085c3c6 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Link/LinkModel.cs @@ -1,50 +1,40 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.07.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the link model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Link { using System.Globalization; using System.Xml.Serialization; - - /// - /// Model for menu - /// + + /// Model for menu. + /// Stubbfel, 15.10.2013. public class LinkModel { #region Member - /// - /// German version of the link title. - /// + /// German version of the link title. private string titleDE; - /// - /// English version of the link title. - /// + /// English version of the link title. private string titleEN; - /// - /// German version of the link. - /// + /// German version of the link. private string linkDE; - /// - /// English version of the link. - /// + /// English version of the link. private string linkEN; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public LinkModel() { } @@ -53,9 +43,8 @@ namespace CampusAppWPortalLib8.Model.Link #region Property - /// - /// Gets or sets the german title of the link. - /// + /// Gets or sets the german title of the link. + /// The title de. [XmlAttribute("title_de")] public string Title_DE { @@ -73,9 +62,8 @@ namespace CampusAppWPortalLib8.Model.Link } } - /// - /// Gets or sets the english title of the link. - /// + /// Gets or sets the english title of the link. + /// The title en. [XmlAttribute("title_en")] public string Title_EN { @@ -90,9 +78,8 @@ namespace CampusAppWPortalLib8.Model.Link } } - /// - /// Gets or sets the german link. - /// + /// Gets or sets the german link. + /// The link de. [XmlAttribute("link_de")] public string Link_DE { @@ -110,9 +97,8 @@ namespace CampusAppWPortalLib8.Model.Link } } - /// - /// Gets or sets the english link. - /// + /// Gets or sets the english link. + /// The link en. [XmlAttribute("link_en")] public string Link_EN { @@ -131,9 +117,10 @@ namespace CampusAppWPortalLib8.Model.Link } /// - /// Gets the localized title. If the phone is set to german language, - /// the german title will be returned otherwise the english title. + /// Gets the localized title. If the phone is set to german language, the german title will + /// be returned otherwise the english title. /// + /// The title. public string Title { get @@ -150,9 +137,10 @@ namespace CampusAppWPortalLib8.Model.Link } /// - /// Gets the localized link. if the phone is set to german language, - /// the german comment will be returned otherwise the english link. + /// Gets the localized link. if the phone is set to german language, the german comment will + /// be returned otherwise the english link. /// + /// The link. public string Link { get diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MealModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MealModel.cs index 80a239f1..18a32b4d 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MealModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MealModel.cs @@ -1,96 +1,66 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 06.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the meal model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Mensa { using System.Xml.Serialization; using CampusAppWPortalLib8.Resources; using CampusAppWPortalLib8.Utility; - /// - /// Model for a meal - /// + /// Model for a meal. + /// Stubbfel, 15.10.2013. public class MealModel { #region Members - /// - /// Constant for the vegetarian icon - /// + /// Constant for the vegetarian icon. public const string MealIconNameVegetarian = "CARROTTE"; - /// - /// Constant for the free icon - /// + /// Constant for the free icon. public const string MealIconNameFree = "FREI"; - /// - /// Constant for the pig icon - /// + /// Constant for the pig icon. public const string MealIconNamePig = "SCHWEIN"; - /// - /// Constant for the cow icon - /// + /// Constant for the cow icon. public const string MealIconNameCow = "RIND"; - /// - /// Constant for the fowl icon - /// + /// Constant for the fowl icon. public const string MealIconNameFowl = "GEFL"; - /// - /// Constant for the cow-pig icon - /// + /// Constant for the cow-pig icon. public const string MealIconNameCowPig = "RINDSCHWEIN"; - /// - /// Constant for the fish icon - /// + /// Constant for the fish icon. public const string MealIconNameFish = "FISCH"; - /// - /// Constant for the wild icon - /// + /// Constant for the wild icon. public const string MealIconNameWild = "WILD"; - /// - /// Constant for the lamb icon - /// + /// Constant for the lamb icon. public const string MealIconNameLamb = "LAMM"; - /// - /// Variable for the id of the meal - /// - /// - /// ValueRange : 0 - 7 - /// + /// Variable for the id of the meal. private int mealId; - /// - /// Name of the meal - /// + /// Name of the meal. private string mealName; - /// - /// Description of the meal - /// + /// Description of the meal. private string mealDesc; #endregion #region Proberty - /// - /// Gets or sets the mealId - /// - /// - /// ValueRange : 0 - 7 - /// + /// Gets or sets the mealId. + /// ValueRange : 0 - 7. + /// The identifier of the meal. [XmlAttribute("id")] public int MealId { @@ -109,9 +79,8 @@ namespace CampusAppWPortalLib8.Model.Mensa } } - /// - /// Gets the mealName - /// + /// Gets the mealName. + /// The name of the meal. public string MealName { get @@ -120,9 +89,8 @@ namespace CampusAppWPortalLib8.Model.Mensa } } - /// - /// Gets or sets the mealDescription - /// + /// Gets or sets the mealDescription. + /// Information describing the meal. [XmlAttribute("desc")] public string MealDesc { @@ -140,14 +108,12 @@ namespace CampusAppWPortalLib8.Model.Mensa } } - /// - /// Gets or sets the icon url - /// + /// Gets or sets the icon url. + /// The icon URL. public string IconUrl { get; set; } - /// - /// Gets or sets the icon name - /// + /// Gets or sets the icon name. + /// The name of the icon. [XmlAttribute("icon")] public string IconName { get; set; } @@ -155,9 +121,8 @@ namespace CampusAppWPortalLib8.Model.Mensa #region Methods - /// - /// Method create depends of the mealId the mealName - /// + /// Method create depends of the mealId the mealName. + /// Stubbfel, 15.10.2013. private void CreateMealName() { switch (this.mealId) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuModel.cs index 6e03d69d..5e4f7304 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuModel.cs @@ -1,40 +1,35 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 04.05.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the menu model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Mensa { using System; using System.Collections.ObjectModel; using System.Xml.Serialization; - /// - /// Model for menu - /// + /// Model for menu. + /// Stubbfel, 15.10.2013. public class MenuModel { #region Member - /// - /// Name of the day - /// + /// Name of the day. private string dayName; - /// - /// DateTime of the day - /// + /// DateTime of the day. private string date; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public MenuModel() { } @@ -43,15 +38,13 @@ namespace CampusAppWPortalLib8.Model.Mensa #region Property - /// - /// Gets or sets the menus for the week - /// + /// Gets or sets the menus for the week. + /// The meals. [XmlElement("Meal")] public ObservableCollection Meals { get; set; } - /// - /// Gets or sets the WeekDay - /// + /// Gets or sets the WeekDay. + /// The day. [XmlAttribute("day")] public string Day { @@ -69,9 +62,8 @@ namespace CampusAppWPortalLib8.Model.Mensa } } - /// - /// Gets or sets of Date - /// + /// Gets or sets of Date. + /// The date. [XmlAttribute("date")] public string Date { diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuWeekModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuWeekModel.cs index 35338718..f16db12d 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuWeekModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Mensa/MenuWeekModel.cs @@ -1,35 +1,32 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 03.05.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the menu week model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Mensa { using System; using System.Collections.ObjectModel; using System.Xml.Serialization; - /// - /// Model for menus in one week - /// + /// Model for menus in one week. + /// Stubbfel, 15.10.2013. [XmlRoot("root")] public class MenuWeekModel { #region Members - /// - /// Time when the model was created - /// + /// Time when the model was created. private readonly DateTime createTime; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. public MenuWeekModel() { this.createTime = DateTime.Now; @@ -39,16 +36,14 @@ namespace CampusAppWPortalLib8.Model.Mensa #region Proberty - /// - /// Gets or sets the menus for the week - /// + /// Gets or sets the menus for the week. + /// The menus. [XmlArray("Mealplan")] [XmlArrayItem("Menu")] public ObservableCollection Menus { get; set; } - /// - /// Gets the creation time of the model - /// + /// Gets the creation time of the model. + /// The create time. public DateTime CreateTime { get @@ -61,10 +56,9 @@ namespace CampusAppWPortalLib8.Model.Mensa #region Methods - /// - /// Method calculate this day of the week, which its gets new menus - /// - /// Date of NewMenuWeekDay + /// Method calculate this day of the week, which its gets new menus. + /// Stubbfel, 15.10.2013. + /// Date of NewMenuWeekDay. public static DateTime CalcFirstWeekDay() { DateTime now = DateTime.Now; @@ -77,15 +71,14 @@ namespace CampusAppWPortalLib8.Model.Mensa return monday; } - /// - /// Method determine holidays (Days with no meals) and add a pseudo meal - /// - /// text of the pseudo meal + /// Method determine holidays (Days with no meals) and add a pseudo meal. + /// Stubbfel, 15.10.2013. + /// text of the pseudo meal. public void SetHolidayCaption(string text) { MealModel holiday = new MealModel(); holiday.MealDesc = text; - holiday.MealId= -1; + holiday.MealId = -1; foreach (MenuModel menu in this.Menus) { @@ -95,6 +88,7 @@ namespace CampusAppWPortalLib8.Model.Mensa { menu.Meals = new ObservableCollection(); } + menu.Meals.Add(holiday); } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/ModelTypes.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/ModelTypes.cs index 9964b4e3..4ca51bac 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/ModelTypes.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/ModelTypes.cs @@ -1,14 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// fiedlchr +// 15.10.2013 +// Implements the model types class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model { - /// - /// Specifies the I/O type of the model. - /// + /// Specifies the I/O type of the model. + /// fiedlchr, 15.10.2013. public enum ModelType { /// diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursInstitutionModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursInstitutionModel.cs index 33d038f5..5a59452b 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursInstitutionModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursInstitutionModel.cs @@ -1,97 +1,66 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// fiedlchr -// 24.06.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the openinghours institution model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Openinghours { using System.Globalization; using System.Windows; using System.Xml.Serialization; - - /// - /// Model for menu - /// + + /// Model for menu. + /// Stubbfel, 15.10.2013. public class OpeninghoursInstitutionModel { #region Member - /// - /// German version of the institution title. - /// + /// German version of the institution title. private string titleDE = string.Empty; - /// - /// English version of the institution title. - /// + /// English version of the institution title. private string titleEN = string.Empty; - /// - /// Opening hours on monday. - /// + /// Opening hours on monday. private string dayMonday = string.Empty; - /// - /// Opening hours on tuesday. - /// + /// Opening hours on tuesday. private string dayTuesday = string.Empty; - /// - /// Opening hours on wednesday. - /// + /// Opening hours on wednesday. private string dayWednesday = string.Empty; - /// - /// Opening hours on thursday. - /// + /// Opening hours on thursday. private string dayThursday = string.Empty; - /// - /// Opening hours on friday. - /// + /// Opening hours on friday. private string dayFriday = string.Empty; - /// - /// Opening hours on saturday. - /// + /// Opening hours on saturday. private string daySaturday = string.Empty; - /// - /// Opening hours on sunday. - /// + /// Opening hours on sunday. private string daySunday = string.Empty; - /// - /// Email address of the institution. - /// + /// Email address of the institution. private string infoEmail = string.Empty; - /// - /// Phone number of the institution. - /// + /// Phone number of the institution. private string infoPhone = string.Empty; - /// - /// Building name where the institution is located. - /// + /// Building name where the institution is located. private string infoBuilding = string.Empty; - /// - /// Room where the institution is located. - /// + /// Room where the institution is located. private string infoRoom = string.Empty; - /// - /// German version of the comment. - /// + /// German version of the comment. private string commentDE = string.Empty; - /// - /// English version of the comment. - /// + /// English version of the comment. private string commentEN = string.Empty; #endregion @@ -99,8 +68,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public OpeninghoursInstitutionModel() { } @@ -109,9 +79,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours #region Property - /// - /// Gets or sets the german title of the institution. - /// + /// Gets or sets the german title of the institution. + /// The title de. [XmlAttribute("title_de")] public string Title_DE { @@ -126,9 +95,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the english title of the institution. - /// + /// Gets or sets the english title of the institution. + /// The title en. [XmlAttribute("title_en")] public string Title_EN { @@ -143,9 +111,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the open hours on monday. - /// + /// Gets or sets the open hours on monday. + /// The monday. [XmlAttribute("monday")] public string Monday { @@ -160,9 +127,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the open hours on tuesday. - /// + /// Gets or sets the open hours on tuesday. + /// The tuesday. [XmlAttribute("tuesday")] public string Tuesday { @@ -176,10 +142,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours this.dayTuesday = this.FixOpeninghoursString(value); } } - - /// - /// Gets or sets the open hours on wednesday. - /// + + /// Gets or sets the open hours on wednesday. + /// The wednesday. [XmlAttribute("wednesday")] public string Wednesday { @@ -194,9 +159,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the open hours on thursday. - /// + /// Gets or sets the open hours on thursday. + /// The thursday. [XmlAttribute("thursday")] public string Thursday { @@ -211,9 +175,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the open hours on friday. - /// + /// Gets or sets the open hours on friday. + /// The friday. [XmlAttribute("friday")] public string Friday { @@ -227,10 +190,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours this.dayFriday = this.FixOpeninghoursString(value); } } - - /// - /// Gets or sets the open hours on saturday. - /// + + /// Gets or sets the open hours on saturday. + /// The saturday. [XmlAttribute("saturday")] public string Saturday { @@ -244,10 +206,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours this.daySaturday = this.FixOpeninghoursString(value); } } - - /// - /// Gets or sets the open hours on sunday. - /// + + /// Gets or sets the open hours on sunday. + /// The sunday. [XmlAttribute("sunday")] public string Sunday { @@ -262,9 +223,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the email address of the institution. - /// + /// Gets or sets the email address of the institution. + /// The e mail. [XmlAttribute("email")] public string EMail { @@ -278,10 +238,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours this.infoEmail = value; } } - - /// - /// Gets or sets the phone number of the institution. - /// + + /// Gets or sets the phone number of the institution. + /// The phone. [XmlAttribute("phone")] public string Phone { @@ -296,9 +255,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the building where the institution is located. - /// + /// Gets or sets the building where the institution is located. + /// The building. [XmlAttribute("location_building")] public string Building { @@ -313,9 +271,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the room where the institution is located. - /// + /// Gets or sets the room where the institution is located. + /// The room. [XmlAttribute("location_room")] public string Room { @@ -330,9 +287,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the german comment. - /// + /// Gets or sets the german comment. + /// The comment de. [XmlAttribute("comment_de")] public string Comment_DE { @@ -347,9 +303,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours } } - /// - /// Gets or sets the english comment. - /// + /// Gets or sets the english comment. + /// The comment en. [XmlAttribute("comment_en")] public string Comment_EN { @@ -365,9 +320,10 @@ namespace CampusAppWPortalLib8.Model.Openinghours } /// - /// Gets the localized title. If the phone is set to german language, - /// the german title will be returned otherwise the english title. + /// Gets the localized title. If the phone is set to german language, the german title will + /// be returned otherwise the english title. /// + /// The title. public string Title { get @@ -384,9 +340,10 @@ namespace CampusAppWPortalLib8.Model.Openinghours } /// - /// Gets the localized comment. if the phone is set to german language, - /// the german comment will be returned otherwise the english comment. + /// Gets the localized comment. if the phone is set to german language, the german comment + /// will be returned otherwise the english comment. /// + /// The comment. public string Comment { get @@ -403,9 +360,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours } /// - /// Gets a string containing the email address and the institution - /// title separated by ':'. + /// Gets a string containing the email address and the institution title separated by ':'. /// + /// The e mail title. public string EMailTitle { get @@ -415,9 +372,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours } /// - /// Gets a string containing the phone number and the institution - /// title separated by ':'. + /// Gets a string containing the phone number and the institution title separated by ':'. /// + /// The phone title. public string PhoneTitle { get @@ -430,11 +387,10 @@ namespace CampusAppWPortalLib8.Model.Openinghours #region Method - /// - /// Removes unwanted chars in a string. - /// - /// input string - /// fixed string + /// Removes unwanted chars in a string. + /// Stubbfel, 15.10.2013. + /// input string. + /// fixed string. private string FixOpeninghoursString(string str) { string retValue = string.Empty; diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursModel.cs index edb61de4..42492466 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Openinghours/OpeninghoursModel.cs @@ -1,42 +1,37 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//----------------------------------------------------------------------------- - +// 15.10.2013 +// Implements the openinghours model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Openinghours { using System; using System.Collections.ObjectModel; using System.Xml.Serialization; - /// - /// Model for opening hours. - /// + /// Model for opening hours. + /// fiedlchr, 15.10.2013. + /// Generic type parameter. [XmlRoot("root")] - public class OpeninghoursModel where T: OpeninghoursInstitutionModel + public class OpeninghoursModel where T : OpeninghoursInstitutionModel { #region Member - - /// - /// Time when the model was created. - /// + + /// Time when the model was created. private readonly DateTime createTime; - - /// - /// Gets or sets feed information item list. - /// + + /// Gets or sets feed information item list. private ObservableCollection institutions; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the OpeninghoursModel class. + /// fiedlchr, 15.10.2013. public OpeninghoursModel() { this.institutions = new ObservableCollection(); @@ -47,9 +42,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours #region Property - /// - /// Gets the creation time of the model. - /// + /// Gets the creation time of the model. + /// The create time. public DateTime CreateTime { get @@ -57,10 +51,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours return this.createTime; } } - - /// - /// Gets or sets the Institutions. - /// + + /// Gets or sets the Institutions. + /// The institutions. [XmlArray("data")] [XmlArrayItem("institution")] public ObservableCollection Institutions diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonFunctionModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonFunctionModel.cs index 6bc47b1b..243896e1 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonFunctionModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonFunctionModel.cs @@ -1,23 +1,23 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 01.10.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Declares the IPersonFunctionModel interface +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Person { - /// - /// Interface for PersonFunctionModel classes - /// + /// Interface for PersonFunctionModel classes. + /// Stubbfel, 15.10.2013. public interface IPersonFunctionModel { - /// Gets or sets the identifier of the person. - /// The identifier of the person. + /// Gets or sets the identifier of the person. + /// The identifier of the person. string PersonID { get; set; } - /// Gets or sets zero-based index of the function. - /// The function index. + /// Gets or sets zero-based index of the function. + /// The function index. int FunctionIndex { get; set; } } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonModel.cs index fcb2db88..0456bd45 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/IPersonModel.cs @@ -1,30 +1,30 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 01.10.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Declares the IPersonModel interface +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Person { using System.Collections.ObjectModel; - /// - /// Interface for PersonModel classes - /// - /// PersonFunctionModel template + /// Interface for PersonModel classes. + /// Stubbfel, 15.10.2013. + /// PersonFunctionModel template. public interface IPersonModel where T : IPersonFunctionModel { - /// Gets or sets the functions of a person. - /// The functions. + /// Gets or sets the functions of a person. + /// The functions. ObservableCollection Functions { get; set; } - /// Gets or sets the identifier. - /// The identifier. + /// Gets or sets the identifier. + /// The identifier. string ID { get; set; } - /// Sets person identifier to function. - /// Stubbfel, 05.09.2013. + /// Sets person identifier to function. + /// Stubbfel, 05.09.2013. void SetPersonIdToFunction(); } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonFunctionModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonFunctionModel.cs index 017e51df..52163d12 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonFunctionModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonFunctionModel.cs @@ -1,48 +1,50 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 05.09.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the person function model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Person { using System.Xml.Serialization; using CampusAppWPortalLib8.Utility; - /// Person function model. - /// Stubbfel, 05.09.2013. + /// Person function model. + /// Stubbfel, 05.09.2013. + /// public class PersonFunctionModel : IPersonFunctionModel { #region Member - /// The first tel. + /// The first tel. private string tel1; - /// The second tel. + /// The second tel. private string tel2; - /// The fax. + /// The fax. private string fax; - /// The mail. + /// The mail. private string mail; - /// The function. + /// The function. private string function; - /// The appointment. + /// The appointment. private string appointment; - /// The building. + /// The building. private string building; #endregion #region Property - /// Gets or sets the tel 1. - /// The tel 1. + /// Gets or sets the tel 1. + /// The tel 1. [XmlAttribute("telefon")] public string Tel1 { @@ -60,8 +62,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the tel 2. - /// The tel 2. + /// Gets or sets the tel 2. + /// The tel 2. [XmlAttribute("telefon2")] public string Tel2 { @@ -79,8 +81,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the fax. - /// The fax. + /// Gets or sets the fax. + /// The fax. [XmlAttribute("fax")] public string Fax { @@ -98,8 +100,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the function. - /// The function. + /// Gets or sets the function. + /// The function. [XmlAttribute("funktion")] public string Function { @@ -117,8 +119,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the appointment. - /// The appointment. + /// Gets or sets the appointment. + /// The appointment. [XmlAttribute("einrichtung")] public string Appointment { @@ -136,8 +138,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the building. - /// The building. + /// Gets or sets the building. + /// The building. [XmlAttribute("gebaeude")] public string Building { @@ -155,8 +157,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the mail. - /// The mail. + /// Gets or sets the mail. + /// The mail. [XmlAttribute("mail")] public string Mail { @@ -174,12 +176,12 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the identifier of the person. - /// The identifier of the person. + /// Gets or sets the identifier of the person. + /// public string PersonID { get; set; } - /// Gets or sets zero-based index of the function. - /// The function index. + /// Gets or sets zero-based index of the function. + /// public int FunctionIndex { get; set; } #endregion diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs index bed28637..c42361fd 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs @@ -1,27 +1,27 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 05.09.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the person list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Person { using System.Collections.Generic; using System.Collections.ObjectModel; using System.Xml.Serialization; - /// Person list model. - /// Stubbfel, 05.09.2013. - /// personModel template + /// Person list model. + /// Stubbfel, 05.09.2013. + /// personModel template. [XmlRoot("Uebersicht")] public abstract class PersonListModel { #region Property - /// Gets or sets the persons. - /// The persons. + /// Gets or sets the persons. + /// The persons. [XmlElement("person")] public ObservableCollection Persons { get; set; } @@ -29,29 +29,28 @@ namespace CampusAppWPortalLib8.Model.Person #region Method - /// Sets person identifier to function. - /// Stubbfel, 05.09.2013. + /// Sets person identifier to function. + /// Stubbfel, 05.09.2013. public abstract void SetPersonIdToFunction(); - /// Gets a person. - /// Stubbfel, 05.09.2013. - /// The identifier. - /// The person. + /// Gets a person. + /// Stubbfel, 05.09.2013. + /// The identifier. + /// The person. public abstract T GetPerson(string id); - /// Removes the non function and set identifiers person. - /// Stubbfel, 05.09.2013. + /// Removes the non function and set identifiers person. + /// Stubbfel, 05.09.2013. public void RemoveNonFunctionAndSetIdsPerson() { this.RemoveNonFunctionPerson(); this.SetPersonIdToFunction(); } - /// Removes the non function person. - /// Stubbfel, 05.09.2013. + /// Removes the non function person. + /// Stubbfel, 05.09.2013. public abstract void RemoveNonFunctionPerson(); - #endregion } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonModel.cs index 931104d3..a7fa8f93 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonModel.cs @@ -1,43 +1,44 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 05.09.2013 -//----------------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the person model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Person { using System.Collections.ObjectModel; using System.Xml.Serialization; - /// Person model. - /// Stubbfel, 05.09.2013. - /// template for the PersonFunction-Class + /// A data Model for the person. + /// Stubbfel, 15.10.2013. + /// public class PersonModel : IPersonModel where T : IPersonFunctionModel { #region Member - /// The akadgrad. + /// The akadgrad. private string akadgrad; - /// Name of the sur. + /// Name of the sur. private string surName; - /// The person's first name. + /// The person's first name. private string firstName; - /// The identifier. + /// The identifier. private string id; - /// The functions. + /// The functions. private ObservableCollection functions; #endregion #region Property - /// Gets or sets the identifier. - /// The identifier. + /// Gets or sets the identifier. + /// The identifier. [XmlAttribute("id")] public string ID { @@ -56,8 +57,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the akadgrad. - /// The akadgrad. + /// Gets or sets the akadgrad. + /// The akadgrad. [XmlAttribute("akadgrad")] public string Akadgrad { @@ -75,8 +76,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the name of the sur. - /// The name of the sur. + /// Gets or sets the name of the sur. + /// The name of the sur. [XmlAttribute("nachname")] public string SurName { @@ -94,8 +95,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the person's first name. - /// The name of the first. + /// Gets or sets the person's first name. + /// The name of the first. [XmlAttribute("vorname")] public string FirstName { @@ -113,8 +114,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets or sets the functions of a person. - /// The functions. + /// Gets or sets the functions of a person. + /// The functions. [XmlElement("funktion")] public ObservableCollection Functions { @@ -133,8 +134,8 @@ namespace CampusAppWPortalLib8.Model.Person } } - /// Gets the name of a Person (FirstName SurName). - /// The name of a Person. + /// Gets the name of a Person (FirstName SurName). + /// The name of a Person. public string FullName { get @@ -147,8 +148,8 @@ namespace CampusAppWPortalLib8.Model.Person #region Method - /// Sets person identifier to function. - /// Stubbfel, 05.09.2013. + /// Sets person identifier to function. + /// Stubbfel, 05.09.2013. public void SetPersonIdToFunction() { if (this.id == null || this.id.Equals(string.Empty) || this.functions == null) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSChannelModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSChannelModel.cs index 4b6284b2..c24f4c1f 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSChannelModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSChannelModel.cs @@ -1,10 +1,11 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the RSS channel model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.RSS { using System.Collections.ObjectModel; @@ -12,21 +13,17 @@ namespace CampusAppWPortalLib8.Model.RSS using System.Linq; using System.Xml.Serialization; - /// - /// Channel Model, which contains the RSS feed item list. - /// + /// Channel Model, which contains the RSS feed item list. + /// fiedlchr, 15.10.2013. public class RSSChannelModel { - /// - /// RSS feed information item list. - /// + /// RSS feed information item list. private ObservableCollection item; #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. public RSSChannelModel() { this.item = new ObservableCollection(); @@ -37,9 +34,8 @@ namespace CampusAppWPortalLib8.Model.RSS #region Property - /// - /// Gets or sets the RSS feed item list. - /// + /// Gets or sets the RSS feed item list. + /// The item. [XmlElement("item")] public ObservableCollection Item { @@ -61,6 +57,9 @@ namespace CampusAppWPortalLib8.Model.RSS #region Method + /// Order by date. + /// fiedlchr, 15.10.2013. + /// (Optional) the ascending. public void OrderByDate(bool asc = false) { this.item.CollectionChanged -= this.OnListChanged; @@ -86,12 +85,12 @@ namespace CampusAppWPortalLib8.Model.RSS } /// - /// Is called when the item list has changed. - /// Here used for the add event. - /// Set the index of the last list element. + /// Is called when the item list has changed. Here used for the add event. Set the index of + /// the last list element. /// - /// item list - /// event args + /// fiedlchr, 15.10.2013. + /// item list. + /// event args. private void OnListChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Add) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs index 6d5efa62..f13f0aff 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs @@ -1,60 +1,56 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the RSS model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.RSS { using System; + using System.ComponentModel; using System.Text; using System.Xml.Serialization; - using System.ComponentModel; - - /// - /// Contains the RSS feed information. - /// + + /// Contains the RSS feed information. + /// fiedlchr, 15.10.2013. + /// public class RSSModel : INotifyPropertyChanged { - #region Member - - public event PropertyChangedEventHandler PropertyChanged; + #region Member - /// - /// Index of this object. - /// + /// Index of this object. private int index = -1; - /// - /// Title of the fees - /// + /// Title of the fees. private string title; - /// - /// Description text of the feed. - /// + /// Description text of the feed. private string text; - /// - /// Timestamp (publication date) of the event or news. - /// + /// Timestamp (publication date) of the event or news. private DateTime timestamp; - /// - /// Url of the feed. - /// + /// Url of the feed. private string link; + /// true to show, false to hide the text. private bool textVisible = true; #endregion - + + #region event + + /// Occurs when Property Changed. + public event PropertyChangedEventHandler PropertyChanged; + + #endregion + #region Property - /// - /// Gets or sets the title of the feed. - /// + /// Gets or sets the title of the feed. + /// The title. [XmlElement("title")] public string Title { @@ -72,9 +68,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets or sets the text of the feed. - /// + /// Gets or sets the text of the feed. + /// The text. [XmlElement("description")] public string Text { @@ -92,9 +87,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets or sets the timestamp of the feed as string. - /// + /// Gets or sets the timestamp of the feed as string. + /// The timestamp. [XmlElement("pubDate")] public string Timestamp { @@ -112,9 +106,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets or sets the timestamp of the feed as DateTime object. - /// + /// Gets or sets the timestamp of the feed as DateTime object. + /// The DateTime timestamp. public DateTime DTTimestamp { get @@ -128,10 +121,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets the date of the timestamp as string. - /// example: Mon, 25.06.2013. - /// + /// Gets the date of the timestamp as string. example: Mon, 25.06.2013. + /// The date. public string Date { get @@ -140,10 +131,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets the date of the timestamp as string. - /// example: 25.06. - /// + /// Gets the date of the timestamp as string. example: 25.06. + /// The short date. public string ShortDate { get @@ -152,10 +141,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets the time of the timestamp as string. - /// example: 12:56. - /// + /// Gets the time of the timestamp as string. example: 12:56. + /// The time. public string Time { get @@ -164,9 +151,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets or sets the link/url of the feed. - /// + /// Gets or sets the link/url of the feed. + /// The link. [XmlElement("link")] public string Link { @@ -184,9 +170,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets or sets the ListIndex. - /// + /// Gets or sets the ListIndex. + /// The index. public int Index { get @@ -200,9 +185,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets or sets the visibility of the text. - /// + /// Gets or sets a value indicating whether the text visibility. + /// true if text visibility, false if not. public bool TextVisibility { get @@ -221,9 +205,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets or sets the visibility of the browser. - /// + /// Gets a value indicating whether the browser visibility. + /// true if browser visibility, false if not. public bool BrowserVisibility { get @@ -238,13 +221,11 @@ namespace CampusAppWPortalLib8.Model.RSS #region public - /// - /// Comparing function for DateTime timestamps. - /// (currently unused) - /// - /// first item - /// second item - /// -1 if item2 is older then item1, otherwise 0 + /// Comparing function for DateTime timestamps. (currently unused) + /// fiedlchr, 15.10.2013. + /// first item. + /// second item. + /// -1 if item2 is older then item1, otherwise 0. public static int CompareTimeStamp(RSSModel item1, RSSModel item2) { if (item1.DTTimestamp > item2.DTTimestamp) @@ -261,19 +242,21 @@ namespace CampusAppWPortalLib8.Model.RSS #region private + /// Notifies a property changed. + /// fiedlchr, 15.10.2013. + /// The information. private void NotifyPropertyChanged(string info) { - if (PropertyChanged != null) + if (this.PropertyChanged != null) { this.PropertyChanged(this, new PropertyChangedEventArgs(info)); } } - /// - /// Remove or transform html-unicode specific tags into ASCII. - /// - /// html string - /// ASCII string + /// Remove or transform html-unicode specific tags into ASCII. + /// fiedlchr, 15.10.2013. + /// html string. + /// ASCII string. private string HTMLUnicodeToString(string htmluni) { StringBuilder retValue = new StringBuilder(); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSViewModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSViewModel.cs index 3049cad5..b62f471b 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSViewModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSViewModel.cs @@ -1,41 +1,36 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 24.06.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the RSS view model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.RSS { using System; using System.Collections.ObjectModel; using System.Xml.Serialization; - /// - /// ViewModel of the RSS feed, containing the feed/channel object. - /// + /// ViewModel of the RSS feed, containing the feed/channel object. + /// fiedlchr, 15.10.2013. [XmlRoot("root")] public class RSSViewModel { #region Member - /// - /// Object to store the time when the instance was created. - /// + /// Object to store the time when the instance was created. private DateTime createTime; - /// - /// Channel list for the RSS feeds. - /// + /// Channel list for the RSS feeds. private ObservableCollection channel; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// + /// Initializes a new instance of the class. + /// fiedlchr, 15.10.2013. public RSSViewModel() { this.channel = new ObservableCollection(); @@ -46,9 +41,8 @@ namespace CampusAppWPortalLib8.Model.RSS #region Property - /// - /// Gets or sets the channel list. - /// + /// Gets or sets the channel list. + /// The channel. [XmlArray("rss")] [XmlArrayItem("channel")] public ObservableCollection Channel @@ -67,9 +61,8 @@ namespace CampusAppWPortalLib8.Model.RSS } } - /// - /// Gets the creation time. - /// + /// Gets the creation time. + /// The create time. public DateTime CreateTime { get diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/CampusTypes.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/CampusTypes.cs index dee8c063..65ec8454 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/CampusTypes.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/CampusTypes.cs @@ -1,18 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// Stubbfel +// 15.10.2013 +// Implements the campus types class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Settings { - /// - /// Specifies the campus of the user. - /// + /// Specifies the campus of the user. + /// Stubbfel, 15.10.2013. public enum Campus { /// An enum constant representing the user setting campus option. UserSettingCampus = 0, + /// /// Cottbus -> MainCampus /// diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/DegreeTypes.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/DegreeTypes.cs index f1cbbb79..f72ee73c 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/DegreeTypes.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/DegreeTypes.cs @@ -1,14 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// Stubbfel +// 15.10.2013 +// Implements the degree types class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Settings { - /// - /// Specifies the degrees. - /// + /// Specifies the degrees. + /// Stubbfel, 15.10.2013. public enum DegreeType { /// diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/RolesTypes.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/RolesTypes.cs index cda9ee5c..216e5e6e 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/RolesTypes.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Settings/RolesTypes.cs @@ -1,14 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. +// +// Stubbfel +// 15.10.2013 +// Implements the roles types class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Settings { - /// - /// Specifies the role of the user. - /// + /// Specifies the role of the user. + /// Stubbfel, 15.10.2013. public enum RoleType { /// diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilListModel.cs index 5f17053a..98a1965c 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilListModel.cs @@ -1,10 +1,11 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the student council list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.StudentCouncil { using System; @@ -13,24 +14,23 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil using System.Linq; using System.Xml.Serialization; - /// - /// Model for menus in one week - /// + /// Model for menus in one week. + /// Stubbfel, 15.10.2013. [XmlRoot("root")] public class StudentCouncilListModel { #region Members - /// - /// Time when the model was created - /// + /// Time when the model was created. private readonly DateTime createTime; #endregion #region Constructor + /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public StudentCouncilListModel() { this.createTime = DateTime.Now; @@ -39,16 +39,15 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil #endregion #region Proberty - /// - /// Gets or sets the StudentCouncils - /// + + /// Gets or sets the StudentCouncils. + /// The student councils. [XmlArray("data")] [XmlArrayItem("studentcouncil")] public ObservableCollection StudentCouncils { get; set; } - /// - /// Gets the creation time of the model - /// + /// Gets the creation time of the model. + /// The create time. public DateTime CreateTime { get @@ -60,10 +59,13 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil #endregion #region Method - /// - /// Method group the StudentCouncilList by Faculty - /// - /// a Dictionary, where the Key is name of the Faculty und the value is a List of StudentCouncil + + /// Method group the StudentCouncilList by Faculty. + /// Stubbfel, 15.10.2013. + /// + /// a Dictionary, where the Key is name of the Faculty und the value is a List of + /// StudentCouncil. + /// public Dictionary> GetStudentCouncilsGroupByFaculty() { List> tmpList = this.StudentCouncils.GroupBy(p => p.Faculty).ToList(); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilModel.cs index 9b28289b..73936b78 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/StudentCouncil/StudentCouncilModel.cs @@ -1,26 +1,23 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 02.07.2013 -//----------------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the student council model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.StudentCouncil { - using CampusAppWPortalLib8.Resources; using System.Xml.Serialization; + using CampusAppWPortalLib8.Resources; - /// - /// Model for menu - /// + /// Model for menu. + /// Stubbfel, 15.10.2013. public class StudentCouncilModel { #region Member - /// - /// name of the faculty. - /// + /// name of the faculty. private string faculty; #endregion @@ -28,8 +25,9 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public StudentCouncilModel() { } @@ -38,9 +36,8 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil #region Property - /// - /// Gets or sets the faculty of the StudentCouncil. - /// + /// Gets or sets the faculty of the StudentCouncil. + /// The faculty. [XmlAttribute("faculty")] public string Faculty { @@ -63,21 +60,18 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil } } - /// - /// Gets or sets the name of the StudentCouncil. - /// + /// Gets or sets the name of the StudentCouncil. + /// The name. [XmlAttribute("name")] public string Name { get; set; } - /// - /// Gets or sets the webpage-url of the StudentCouncil. - /// + /// Gets or sets the webpage-url of the StudentCouncil. + /// The URL. [XmlAttribute("url")] public string Url { get; set; } - /// - /// Gets or sets the email-address of the StudentCouncil. - /// + /// Gets or sets the email-address of the StudentCouncil. + /// The email. [XmlAttribute("email")] public string Email { get; set; } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CampusListPickerItemListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CampusListPickerItemListModel.cs index aa60217e..87d175ac 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CampusListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CampusListPickerItemListModel.cs @@ -1,24 +1,26 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 08.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the campus list picker item list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { using CampusAppWPortalLib8.Resources; - using CampusAppWPortalLib8.Model.Utility; - /// - /// This Class creates a list of degrees - /// + /// This Class creates a list of degrees. + /// Stubbfel, 15.10.2013. + /// public class CampusListPickerItemListModel : ListPickerItemListModel { #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public CampusListPickerItemListModel() : base() { @@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Utility #region Method - /// - /// Overrides the LoadList-Method - /// + /// Overrides the LoadList-Method + /// Stubbfel, 15.10.2013. + /// protected override void LoadList() { this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.Campus.CB_MAIN).ToString(), AppResources.Campus_CBMain)); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CleanUrlParamModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CleanUrlParamModel.cs index 3eb6a03d..c22cd50f 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CleanUrlParamModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CleanUrlParamModel.cs @@ -1,31 +1,32 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 06.08.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the clean URL parameter model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { - /// - /// This class is a Model for the URLParameter like GET-Parameter - /// + /// This class is a Model for the URLParameter like GET-Parameter. + /// Stubbfel, 15.10.2013. + /// public class CleanUrlParamModel : UrlParamModel { #region Constructor - /// Initializes a new instance of the CleanUrlParamModel class. - /// Stubbfel, 12.09.2013. - /// the key for the parameter. + /// 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 CleanUrlParamModel class. - /// Stubbfel, 12.09.2013. - /// the key for the parameter. - /// The 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) { @@ -34,9 +35,8 @@ namespace CampusAppWPortalLib8.Model.Utility #region Proberty - /// - /// Gets the token, which indicate that the parameterList started - /// + /// Gets the token, which indicate that the parameterList started. + /// public override string ParamToken { get @@ -48,10 +48,9 @@ namespace CampusAppWPortalLib8.Model.Utility #region Methods - /// - /// Method return a formatted string like Key=Value - /// - /// return formatted string + /// Method return a formatted string like Key=Value. + /// Stubbfel, 15.10.2013. + /// public override string ToString() { if (!this.IsParamValid()) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseListPickerItemListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseListPickerItemListModel.cs index 884df21a..eb3ac634 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseListPickerItemListModel.cs @@ -1,22 +1,24 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the course list picker item list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { using System.Linq; - /// - /// This is a class for the courseList - /// + /// This is a class for the courseList. + /// Stubbfel, 15.10.2013. + /// public abstract class CourseListPickerItemListModel : ListPickerItemListModel { #region Method - /// Fall back list. - /// Stubbfel, 10.09.2013. + /// Fall back list. + /// Stubbfel, 10.09.2013. protected void FallBackList() { this.AddItem(new ListPickerItemModel("017", "Bauingenieurwesen")); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseModel.cs index 0921c76c..68c049f0 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/CourseModel.cs @@ -1,24 +1,26 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the course model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { using System; - /// Course model. - /// Stubbfel, 10.09.2013. + /// Course model. + /// 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. - /// The course text. + /// Initializes a new instance of the CourseModel class. + /// Stubbfel, 10.09.2013. + /// The course number. + /// The course text. public CourseModel(string courseNumber, string courseText) { this.CourseNumber = courseNumber; @@ -29,22 +31,22 @@ namespace CampusAppWPortalLib8.Model.Utility #region Property - /// Gets or sets the course number. - /// The course number. + /// Gets or sets the course number. + /// The course number. public string CourseNumber { get; set; } - /// Gets or sets the course text. - /// The course text. + /// Gets or sets the course text. + /// 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. - /// true if the objects are considered equal, false if they are not. + /// Tests if this CourseModel is considered equal to another. + /// Stubbfel, 10.09.2013. + /// The course model to compare to this object. + /// true if the objects are considered equal, false if they are not. public bool Equals(CourseModel other) { if (this.CourseNumber.Equals(other.CourseNumber)) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/DegreeListPickerItemListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/DegreeListPickerItemListModel.cs index 8ae21a53..5d78e388 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/DegreeListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/DegreeListPickerItemListModel.cs @@ -1,24 +1,26 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the degree list picker item list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { using CampusAppWPortalLib8.Resources; - using CampusAppWPortalLib8.Model.Utility; - /// - /// This Class creates a list of degrees - /// + /// This Class creates a list of degrees. + /// Stubbfel, 15.10.2013. + /// public class DegreeListPickerItemListModel : ListPickerItemListModel { #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public DegreeListPickerItemListModel() : base() { @@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Utility #region Method - /// - /// Overrides the LoadList-Method - /// + /// Overrides the LoadList-Method + /// Stubbfel, 15.10.2013. + /// protected override void LoadList() { this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.DegreeType.BACHELOR).ToString(), AppResources.Degree_Bachelor)); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemListModel.cs index bbcd1a64..8373f3a3 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemListModel.cs @@ -1,24 +1,22 @@ //----------------------------------------------------------------------- // -// Company copyright tag.List +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the list picker item list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { using System.Collections.Generic; - /// - /// Class for a List of ListPickerItems - /// + /// Class for a List of ListPickerItems. + /// Stubbfel, 15.10.2013. public class ListPickerItemListModel { #region Members - /// - /// reference of the itemList - /// + /// reference of the itemList. private List list; #endregion @@ -26,8 +24,9 @@ namespace CampusAppWPortalLib8.Model.Utility #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public ListPickerItemListModel() { this.list = new List(); @@ -37,9 +36,8 @@ namespace CampusAppWPortalLib8.Model.Utility #region Property - /// - /// Gets or sets the ItemList - /// + /// Gets or sets the ItemList. + /// The list. public List List { get @@ -62,11 +60,10 @@ namespace CampusAppWPortalLib8.Model.Utility #region public - /// - /// Method return a the Index of an item which has a certain value - /// - /// a certain value - /// return index of value or default(0) + /// Method return a the Index of an item which has a certain value. + /// Stubbfel, 15.10.2013. + /// a certain value. + /// return index of value or default(0) public virtual int GetIndexOrDefault(string value) { int index = 0; @@ -85,41 +82,37 @@ namespace CampusAppWPortalLib8.Model.Utility return index; } - /// - /// add an new item to the list - /// - /// value of the item - /// text of the item + /// add an new item to the list. + /// Stubbfel, 15.10.2013. + /// value of the item. + /// text of the item. public void AddItem(string value, string text) { this.AddItem(new ListPickerItemModel(value, text)); } - /// - /// add an new item to the list - /// - /// new item of the list + /// add an new item to the list. + /// Stubbfel, 15.10.2013. + /// new item of the list. public void AddItem(ListPickerItemModel item) { this.list.Add(item); } - /// - /// remove an item - /// - /// value of the item - /// text of the item - /// true if removing was successful, otherwise false + /// remove an item. + /// Stubbfel, 15.10.2013. + /// value of the item. + /// text of the item. + /// true if removing was successful, otherwise false. public bool RemoveItem(string value, string text) { return this.RemoveItem(new ListPickerItemModel(value, text)); } - /// - /// remove an item - /// - /// item which has to be remove - /// true if removing was successful, otherwise false + /// remove an item. + /// Stubbfel, 15.10.2013. + /// item which has to be remove. + /// true if removing was successful, otherwise false. public bool RemoveItem(ListPickerItemModel item) { return this.list.Remove(item); @@ -129,12 +122,8 @@ namespace CampusAppWPortalLib8.Model.Utility #region protected - /// - /// Method load an default list - /// - /// - /// load an empty list - /// + /// Method load an default list. + /// load an empty list. protected virtual void LoadList() { return; diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemModel.cs index 0a394f3a..0984aa42 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/ListPickerItemModel.cs @@ -1,31 +1,33 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 13.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the list picker item model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { - /// - /// Model for the ListPickerItems - /// + /// Model for the ListPickerItems. + /// Stubbfel, 15.10.2013. public class ListPickerItemModel { #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public ListPickerItemModel() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// string for the value property of an item - /// string for the text property of an item + /// Stubbfel, 15.10.2013. + /// string for the value property of an item. + /// string for the text property of an item. public ListPickerItemModel(string value, string text) { this.Value = value; @@ -36,14 +38,12 @@ namespace CampusAppWPortalLib8.Model.Utility #region Property - /// - /// Gets or sets the Value of an Item - /// + /// Gets or sets the Value of an Item. + /// The value. public string Value { get; set; } - /// - /// Gets or sets the Text (caption) of an Item - /// + /// Gets or sets the Text (caption) of an Item. + /// The text. public string Text { get; set; } #endregion diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/RoleListPickerItemListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/RoleListPickerItemListModel.cs index 24ceb6b3..3d10de16 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/RoleListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/RoleListPickerItemListModel.cs @@ -1,24 +1,26 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the role list picker item list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { using CampusAppWPortalLib8.Resources; - using CampusAppWPortalLib8.Model.Utility; - /// - /// Class for the RoleList - /// + /// Class for the RoleList. + /// Stubbfel, 15.10.2013. + /// public class RoleListPickerItemListModel : ListPickerItemListModel { #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public RoleListPickerItemListModel() : base() { @@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Utility #region Method - /// - /// Overrides the LoadList-Method - /// + /// Overrides the LoadList-Method + /// Stubbfel, 15.10.2013. + /// protected override void LoadList() { this.AddItem(new ListPickerItemModel(CampusAppWPortalLib8.Model.Settings.RoleType.STUDENT.ToString(), AppResources.Setting_RoleStudent)); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/SemesterListPickerItemListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/SemesterListPickerItemListModel.cs index 07e254b0..2ec98742 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/SemesterListPickerItemListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/SemesterListPickerItemListModel.cs @@ -1,21 +1,24 @@ -// -// Company copyright tag.List +//----------------------------------------------------------------------- +// +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 25.07.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the semester list picker item list model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { - /// - /// Class for the SemesterList - /// + /// Class for the SemesterList. + /// Stubbfel, 15.10.2013. + /// public class SemesterListPickerItemListModel : ListPickerItemListModel { #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// Stubbfel, 15.10.2013. public SemesterListPickerItemListModel() : base() { @@ -26,9 +29,9 @@ namespace CampusAppWPortalLib8.Model.Utility #region Method - /// - /// Overrides the LoadList-Method - /// + /// Overrides the LoadList-Method + /// Stubbfel, 15.10.2013. + /// protected override void LoadList() { this.AddItem(new ListPickerItemModel("20132", "WiSe 13/14")); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/URLParamModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/URLParamModel.cs index 49ebf92a..470de426 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/URLParamModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Utility/URLParamModel.cs @@ -1,42 +1,38 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 17.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the URL parameter model class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Utility { - /// - /// This class is a Model for the URLParameter like GET-Parameter - /// + /// This class is a Model for the URLParameter like GET-Parameter. + /// Stubbfel, 15.10.2013. public class UrlParamModel { #region Members - /// - /// Variable of the key - /// + /// Variable of the key. protected readonly string key; #endregion #region Constructor - /// - /// Initializes a new instance of the class. - /// - /// the key for the parameter + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. + /// the key for the parameter. public UrlParamModel(string key) { this.key = key; } - /// - /// Initializes a new instance of the class. - /// - /// the key for the parameter> - /// value of the parameter + /// Initializes a new instance of the class. + /// Stubbfel, 15.10.2013. + /// the key for the parameter. + /// value of the parameter. public UrlParamModel(string key, string value) { this.key = key; @@ -46,14 +42,12 @@ namespace CampusAppWPortalLib8.Model.Utility #region Proberty - /// - /// Gets or sets the value of the Parameter - /// + /// Gets or sets the value of the Parameter. + /// The value. public string Value { get; set; } - /// - /// Gets the key of the parameter - /// + /// Gets the key of the parameter. + /// The key. public string Key { get @@ -62,9 +56,8 @@ namespace CampusAppWPortalLib8.Model.Utility } } - /// - /// Gets the token, which indicate that the parameterList started - /// + /// Gets the token, which indicate that the parameterList started. + /// The parameter token. public virtual string ParamToken { get @@ -76,10 +69,9 @@ namespace CampusAppWPortalLib8.Model.Utility #region Methods - /// - /// Method check if the parameter is valid - /// - /// true if is it valid, otherwise false + /// Method check if the parameter is valid. + /// Stubbfel, 15.10.2013. + /// true if is it valid, otherwise false. public virtual bool IsParamValid() { if (this.key == null || string.Empty.Equals(this.key) || string.Empty.Equals(this.Value)) @@ -90,10 +82,9 @@ namespace CampusAppWPortalLib8.Model.Utility return true; } - /// - /// Method return a formatted string like Key=Value - /// - /// return formatted string + /// Method return a formatted string like Key=Value. + /// Stubbfel, 15.10.2013. + /// public override string ToString() { if (!this.IsParamValid()) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Settings.StyleCop b/CampusAppWP8/CampusAppWPortalLib8/Settings.StyleCop index 6211b689..d40e399f 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Settings.StyleCop +++ b/CampusAppWP8/CampusAppWPortalLib8/Settings.StyleCop @@ -3,6 +3,7 @@ akadgrad api + fiedlchr nfc param qr @@ -16,7 +17,7 @@ BTU/IIT - BTU/IIT + The MIT License (MIT). Copyright (c) 2013 BTU/IIT. diff --git a/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractBackgroundTasks.cs b/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractBackgroundTasks.cs index 434104b4..a3bdca7f 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractBackgroundTasks.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractBackgroundTasks.cs @@ -1,21 +1,19 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 18.09.2013 -//---------------------------------------------------------------------- - +// Stubbfel +// 15.10.2013 +// Implements the abstract background tasks class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Utility { - /// - /// abstract class for BackGroundTask - /// + /// abstract class for BackGroundTask. + /// Stubbfel, 15.10.2013. public abstract class AbstractBackgroundTasks { - /// - /// Gets or sets the name of the last running task - /// + /// Gets or sets the name of the last running task. + /// The name of the last added task. protected static string LastAddedTaskName { get; set; } } } diff --git a/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractFile.cs b/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractFile.cs index 0724f50e..311da049 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractFile.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractFile.cs @@ -1,22 +1,21 @@ -//----------------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // fiedlchr -// 03.05.2013 -//----------------------------------------------------------------------------- +// 15.10.2013 +// Implements the abstract file class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Utility { - /// - /// File class. - /// + /// File class. + /// fiedlchr, 15.10.2013. public abstract class AbstractFile { #region Events - /// - /// Delegation of the write callback function prototype. - /// + /// Delegation of the write callback function prototype. + /// fiedlchr, 15.10.2013. public delegate void WriteCallbackFunc(); #endregion @@ -25,28 +24,25 @@ namespace CampusAppWPortalLib8.Utility #region public - /// Read data from file to a string. - /// Stubbfel, 03.09.2013. - /// data string. + /// Read data from file to a string. + /// fiedlchr, 03.09.2013. + /// data string. public abstract byte[] ReadFile(); - /// Write bytes to the file. - /// Stubbfel, 03.09.2013. - /// data byte array. - /// callback function, called after writing is done. - /// callback function, called when writing failed. + /// Write bytes to the file. + /// fiedlchr, 03.09.2013. + /// data byte array. + /// callback function, called after writing is done. + /// callback function, called when writing failed. public abstract void WriteFile(byte[] data, WriteCallbackFunc onSavedCallback, WriteCallbackFunc onFailedCallback); - /// - /// Check if a file is existing. - /// - /// true, if file exists, otherwise false + /// Check if a file is existing. + /// fiedlchr, 15.10.2013. + /// true, if file exists, otherwise false. public abstract bool Exist(); - #endregion - #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractHttpRequest.cs b/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractHttpRequest.cs index e52f9b50..8645f09d 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractHttpRequest.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Utility/AbstractHttpRequest.cs @@ -1,36 +1,32 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the abstract HTTP request class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Utility -{ +{ using System; using System.Collections.Generic; - using System.Net; using CampusAppWPortalLib8.Model.Utility; - /// - /// abstract Class provides some methods and member for HttpRequest - /// + /// abstract Class provides some methods and member for HttpRequest. + /// Stubbfel, 15.10.2013. public abstract class AbstractHttpRequest { #region Member - /// - /// BaseAddress of the webClient - /// + /// BaseAddress of the webClient. private string baseAddress; #endregion #region property - /// - /// Gets or sets BaseAddress of the webClient - /// + /// Gets or sets BaseAddress of the webClient. + /// The base address. protected string BaseAddress { get @@ -50,11 +46,10 @@ namespace CampusAppWPortalLib8.Utility #region Methods - /// - /// Method create the Url for the http-get-method - /// - /// list of parameters - /// absolute API-Url include GetParameter + /// Method create the Url for the http-get-method. + /// Stubbfel, 15.10.2013. + /// list of parameters. + /// absolute API-Url include GetParameter. public Uri CreateGetUrl(List parameters) { string paramterStr = string.Empty; diff --git a/CampusAppWP8/CampusAppWPortalLib8/Utility/DefaultStringManager.cs b/CampusAppWP8/CampusAppWPortalLib8/Utility/DefaultStringManager.cs index 8f931d3a..37a2d796 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Utility/DefaultStringManager.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Utility/DefaultStringManager.cs @@ -1,68 +1,64 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 06.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the default string manager class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Utility { using System; using System.Text.RegularExpressions; using CampusAppWPortalLib8.Resources; - /// - /// Class provides some special StringMethods - /// + /// Class provides some special StringMethods. + /// Stubbfel, 15.10.2013. public class DefaultStringManager { #region Members - /// - /// Patter for Html-Tags - /// + /// Patter for Html-Tags. private static readonly string HtmlTagPattern = "<.*?>"; - /// The mail valid regular expression. + /// 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 - /// - /// Method removes Html-Tag of a String - /// - /// String with Html-Tags - /// String without Html-Tags + /// Method removes Html-Tag of a String. + /// Stubbfel, 15.10.2013. + /// String with Html-Tags. + /// String without Html-Tags. public static string StripHTML(string inputString) { return Regex.Replace(inputString, DefaultStringManager.HtmlTagPattern, string.Empty); } - /// - /// Method add an Newline to a string - /// - /// input string - /// input string + newline + /// Method add an Newline to a string. + /// Stubbfel, 15.10.2013. + /// input string. + /// input string + newline. public static string AddNewLine(string str) { return str.ToString() + "\n"; } - /// Method remove(TrimEND!) an Newline to a string. - /// Stubbfel, 12.09.2013. - /// input string. - /// input string - newline. + /// Method 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'); } - /// Query if 'strIn' is valid email. - /// Stubbfel, 04.09.2013. - /// The in. - /// true if valid email, false if not. + /// Query if 'strIn' is valid email. + /// Stubbfel, 04.09.2013. + /// The in. + /// true if valid email, false if not. public static bool IsValidEmail(string strIn) { // Return true if strIn is in valid e-mail format. @@ -79,10 +75,10 @@ namespace CampusAppWPortalLib8.Utility } } - /// Creates uni telefon number. - /// Stubbfel, 04.09.2013. - /// The input. - /// The new uni telefon number. + /// Creates uni telefon number. + /// Stubbfel, 04.09.2013. + /// The input. + /// The new uni telefon number. public static string CreateUniTelefonNumber(string input) { string result = null; @@ -101,13 +97,14 @@ namespace CampusAppWPortalLib8.Utility return result; } - /// - /// Method create from a long string a short string - /// - /// the long input String - /// max length of the short string - /// (optional) suffix which added to the short string, when long string has to be cut - /// the shorted string + /// Method create from a long string a short string. + /// Stubbfel, 15.10.2013. + /// the long input String. + /// max length of the short string. + /// + /// (optional) suffix which added to the short string, when long string has to be cut. + /// + /// the shorted string. public static string ToShortString(string longStr, int maxLenght, string suffix = "") { string shortStr = longStr; @@ -124,17 +121,15 @@ namespace CampusAppWPortalLib8.Utility return shortStr; } - /// - /// Method gets the placeId of the result string for an qrCode string - /// - /// input qrCode string - /// the id if it was found it in the string otherwise null + /// Method gets the placeId of the result string for an qrCode string. + /// Stubbfel, 15.10.2013. + /// input qrCode string. + /// the id if it was found it in the string otherwise null. public static string FilterPlaceIdinQRResultString(string qrcodeResult) { if (qrcodeResult == null) { return null; - } string[] lines = qrcodeResult.Split('\n'); @@ -152,11 +147,10 @@ namespace CampusAppWPortalLib8.Utility return null; } - /// - /// Method check if the string contains only digit - /// - /// input string - /// true if the string contains only digit, otherwise false + /// Method check if the string contains only digit. + /// Stubbfel, 15.10.2013. + /// input string. + /// true if the string contains only digit, otherwise false. public static bool IsDigitsOnly(string str) { if (str == null || str.Length < 1) @@ -175,11 +169,10 @@ namespace CampusAppWPortalLib8.Utility return true; } - /// - /// Method gets the placeId of the result string for an nfc string - /// - /// input nfc string - /// the id if it was found it in the string otherwise null + /// Method gets the placeId of the result string for an nfc string. + /// Stubbfel, 15.10.2013. + /// input nfc string. + /// the id if it was found it in the string otherwise null. public static string FilterPlaceIdinNFCResultString(string nfcResult) { string nfcResultTrim = nfcResult.Trim('{'); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Utility/Logger.cs b/CampusAppWP8/CampusAppWPortalLib8/Utility/Logger.cs index f12400bc..b70453bf 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Utility/Logger.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Utility/Logger.cs @@ -1,32 +1,30 @@ -//-------------------------------------------------------------------- +//----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 03.05.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the logger class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Utility { using System; - /// - /// This Class creates logs for the app - /// + /// This Class creates logs for the app. + /// Stubbfel, 15.10.2013. public class Logger { - /// - /// Method log a Exception - /// - /// exception which has to log + /// Method log a Exception. + /// Stubbfel, 15.10.2013. + /// exception which has to log. public static void LogException(Exception exception) { // Console.WriteLine(exception); } - /// - /// Log a message. - /// - /// to be logged message + /// Log a message. + /// Stubbfel, 15.10.2013. + /// to be logged message. public static void LogMsg(string msg) { // Console.WriteLine(msg); diff --git a/CampusAppWP8/CampusAppWPortalLib8/Utility/XmlManager.cs b/CampusAppWP8/CampusAppWPortalLib8/Utility/XmlManager.cs index 95a622de..60e67935 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Utility/XmlManager.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Utility/XmlManager.cs @@ -1,28 +1,27 @@ //----------------------------------------------------------------------- // -// Company copyright tag. +// The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // -// stubbfel -// 18.06.2013 -//---------------------------------------------------------------------- +// Stubbfel +// 15.10.2013 +// Implements the XML manager class +//----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Utility { using System.IO; using System.Xml.Linq; using System.Xml.Serialization; - /// - /// Class provides some Xml-methods - /// + /// Class provides some Xml-methods. + /// Stubbfel, 15.10.2013. public class XmlManager { - /// - /// Method deserialization a string to a Model - /// - /// the model - /// the XmlString - /// name of the RootTag - /// return the deserialization of the model + /// Method deserialization a string to a Model. + /// Stubbfel, 15.10.2013. + /// the model. + /// the XmlString. + /// name of the RootTag. + /// return the deserialization of the model. public static T DeserializationToModel(string xmlString, string validRootName) { XmlSerializer serializer = new XmlSerializer(typeof(T)); @@ -38,11 +37,11 @@ namespace CampusAppWPortalLib8.Utility return model; } - /// Deserialization a xml file to a model. - /// Stubbfel, 20.08.2013. - /// Generic type parameter. - /// Path to the a XmlFile. - /// model of the XmlFile. + /// Deserialization a xml file to a model. + /// Stubbfel, 20.08.2013. + /// Generic type parameter. + /// Path to the a XmlFile. + /// model of the XmlFile. public static T DeserializationFileToModel(string xmlFilePath) { XmlSerializer serializer = new XmlSerializer(typeof(T)); @@ -51,12 +50,11 @@ namespace CampusAppWPortalLib8.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, 15.10.2013. + /// type of the model. + /// model object. + /// serialized string. public static string SerializationToString(T model) { string retValue = string.Empty; diff --git a/Doc/atominnerSettings/PrefSets.xml b/Doc/atominnerSettings/PrefSets.xml index 3fd3a41c..e40fd996 100644 --- a/Doc/atominnerSettings/PrefSets.xml +++ b/Doc/atominnerSettings/PrefSets.xml @@ -19,7 +19,7 @@ - + @@ -95,7 +95,7 @@ - +