refactor all plcmodels
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<Value>api</Value>
|
||||
<Value>apis</Value>
|
||||
<Value>enum</Value>
|
||||
<Value>fiedlchr</Value>
|
||||
<Value>initialise</Value>
|
||||
<Value>initialises</Value>
|
||||
<Value>ndef</Value>
|
||||
|
||||
@@ -61,7 +61,9 @@
|
||||
<Compile Include="Model\RSS\RSSChannelModel.cs" />
|
||||
<Compile Include="Model\RSS\RSSModel.cs" />
|
||||
<Compile Include="Model\RSS\RSSViewModel.cs" />
|
||||
<Compile Include="Model\Settings\CampusTypes.cs" />
|
||||
<Compile Include="Model\Settings\CampusTypes.cs">
|
||||
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
|
||||
</Compile>
|
||||
<Compile Include="Model\Settings\DegreeTypes.cs" />
|
||||
<Compile Include="Model\Settings\RolesTypes.cs" />
|
||||
<Compile Include="Model\StudentCouncil\StudentCouncilListModel.cs" />
|
||||
@@ -75,7 +77,9 @@
|
||||
<Compile Include="Model\Utility\ListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemModel.cs" />
|
||||
<Compile Include="Model\Utility\RoleListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\SemesterListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\SemesterListPickerItemListModel.cs">
|
||||
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
|
||||
</Compile>
|
||||
<Compile Include="Model\Utility\URLParamModel.cs" />
|
||||
<Compile Include="Model\IXmlModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="AbstractMainModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>05.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the abstract main model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model
|
||||
{
|
||||
using System;
|
||||
@@ -12,47 +13,32 @@ namespace CampusAppWPortalLib8.Model
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// abstract Base model io handling class.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">model type</typeparam>
|
||||
/// <summary> abstract Base model io handling class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <typeparam name="T"> model type. </typeparam>
|
||||
public abstract class AbstractMainModel<T>
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// File object.
|
||||
/// </summary>
|
||||
/// <summary> File object. </summary>
|
||||
private AbstractFile file = null;
|
||||
|
||||
/// <summary>
|
||||
/// Model io type.
|
||||
/// </summary>
|
||||
/// <summary> Model io type. </summary>
|
||||
private ModelType modelType;
|
||||
|
||||
/// <summary>
|
||||
/// Model object.
|
||||
/// </summary>
|
||||
/// <summary> Model object. </summary>
|
||||
private T model = default(T);
|
||||
|
||||
/// <summary>
|
||||
/// Web object.
|
||||
/// </summary>
|
||||
/// <summary> Web object. </summary>
|
||||
private AbstractHttpRequest api = null;
|
||||
|
||||
/// <summary>
|
||||
/// Filename of saved data.
|
||||
/// </summary>
|
||||
/// <summary> Filename of saved data. </summary>
|
||||
private string fileName = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Url of the feed data.
|
||||
/// </summary>
|
||||
/// <summary> Url of the feed data. </summary>
|
||||
private Uri httpApiUri = null;
|
||||
|
||||
/// <summary>
|
||||
/// Parameterized uri of the feed.
|
||||
/// </summary>
|
||||
/// <summary> Parameterized uri of the feed. </summary>
|
||||
private Uri paramizedUri = null;
|
||||
|
||||
#endregion
|
||||
@@ -60,21 +46,26 @@ namespace CampusAppWPortalLib8.Model
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AbstractMainModel{T}" /> class.
|
||||
/// Initializes a new instance of the <see cref="AbstractMainModel{T}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="modelType">Model IO type</param>
|
||||
/// <param name="fileName">name of the file</param>
|
||||
/// <param name="url">url of the feed</param>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="modelType"> Model IO type. </param>
|
||||
/// <param name="fileName"> name of the file. </param>
|
||||
/// <param name="url"> url of the feed. </param>
|
||||
public AbstractMainModel(ModelType modelType, string fileName, string url)
|
||||
{
|
||||
this.Init(modelType, fileName, url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AbstractMainModel{T}" /> class.
|
||||
/// Initializes a new instance of the <see cref="AbstractMainModel{T}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="modelType">Model IO type</param>
|
||||
/// <param name="sourceName">name of the file or the url of the feed</param>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <exception cref="NotSupportedException">
|
||||
/// Thrown when the requested operation is not supported.
|
||||
/// </exception>
|
||||
/// <param name="modelType"> Model IO type. </param>
|
||||
/// <param name="sourceName"> name of the file or the url of the feed. </param>
|
||||
public AbstractMainModel(ModelType modelType, string sourceName)
|
||||
{
|
||||
if (modelType == ModelType.File)
|
||||
@@ -95,67 +86,48 @@ namespace CampusAppWPortalLib8.Model
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Delegate of the OnIO callback function.
|
||||
/// </summary>
|
||||
/// <summary> Delegate of the OnIO callback function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public delegate void OnIO();
|
||||
|
||||
/// <summary>
|
||||
/// Delegate of the OnFailed(File/Web) callback function.
|
||||
/// </summary>
|
||||
/// <summary> Delegate of the OnFailed(File/Web) callback function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public delegate void OnFailed();
|
||||
|
||||
/// <summary>
|
||||
/// Delegate of the IsModelUpToDate callback function.
|
||||
/// </summary>
|
||||
/// <param name="model">data model</param>
|
||||
/// <returns>true, model is up to date</returns>
|
||||
/// <summary> Delegate of the IsModelUpToDate callback function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="model"> data model. </param>
|
||||
/// <returns> true, model is up to date. </returns>
|
||||
public delegate bool IsModelUpToDate(T model);
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, called before loading.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, called before loading. </summary>
|
||||
public event OnIO OnLoading = null;
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, called after loading.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, called after loading. </summary>
|
||||
public event OnIO OnLoaded = null;
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, called before saving.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, called before saving. </summary>
|
||||
public event OnIO OnSaving = null;
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, called after saving.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, called after saving. </summary>
|
||||
public event OnIO OnSaved = null;
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, called after failed file loading.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, called after failed file loading. </summary>
|
||||
public event OnFailed OnFailedFile = null;
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, called after failed web loading.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, called after failed web loading. </summary>
|
||||
public event OnFailed OnFailedWeb = null;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public event OnFailed OnFailedLoad = null;
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, called after failed saving data to file.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, called after failed saving data to file. </summary>
|
||||
public event OnFailed OnFailedSave = null;
|
||||
|
||||
/// <summary>
|
||||
/// Callback pointer, for checking if model is up to date at loading.
|
||||
/// </summary>
|
||||
/// <summary> Callback pointer, for checking if model is up to date at loading. </summary>
|
||||
public event IsModelUpToDate IsModelUpToDateOnLoad = null;
|
||||
|
||||
/// <summary>
|
||||
@@ -163,15 +135,15 @@ namespace CampusAppWPortalLib8.Model
|
||||
/// (currently unused)
|
||||
/// </summary>
|
||||
#pragma warning disable 0067
|
||||
/// <summary> Occurs when Is Model Up To Date On Save. </summary>
|
||||
public event IsModelUpToDate IsModelUpToDateOnSave = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Model.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the Model. </summary>
|
||||
/// <value> The model. </value>
|
||||
public T Model
|
||||
{
|
||||
get
|
||||
@@ -185,45 +157,40 @@ namespace CampusAppWPortalLib8.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the File.
|
||||
/// </summary>
|
||||
/// <summary> Gets the File. </summary>
|
||||
/// <value> The file. </value>
|
||||
public AbstractFile File
|
||||
{
|
||||
get { return this.file; }
|
||||
protected set { this.file = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ModelType.
|
||||
/// </summary>
|
||||
/// <summary> Gets the ModelType. </summary>
|
||||
/// <value> The type of the model. </value>
|
||||
public ModelType ModelType
|
||||
{
|
||||
get { return this.modelType; }
|
||||
protected set { this.modelType = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Api.
|
||||
/// </summary>
|
||||
/// <summary> Gets the Api. </summary>
|
||||
/// <value> The API. </value>
|
||||
public AbstractHttpRequest Api
|
||||
{
|
||||
get { return this.api; }
|
||||
protected set { this.api = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ApiUrl.
|
||||
/// </summary>
|
||||
/// <summary> Gets the ApiUrl. </summary>
|
||||
/// <value> The HTTP API URI. </value>
|
||||
public Uri HttpApiUri
|
||||
{
|
||||
get { return this.httpApiUri; }
|
||||
protected set { this.httpApiUri = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the FileName.
|
||||
/// </summary>
|
||||
/// <summary> Gets the FileName. </summary>
|
||||
/// <value> The name of the file. </value>
|
||||
public string FileName
|
||||
{
|
||||
get { return this.fileName; }
|
||||
@@ -236,43 +203,42 @@ namespace CampusAppWPortalLib8.Model
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method Fire all Events for fail load
|
||||
/// </summary>
|
||||
/// <summary> Method Fire all Events for fail load. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public void FireLoadFailEvents()
|
||||
{
|
||||
this.RunOnFailedCallback(this.OnFailedWeb, this.OnFailedLoad);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method Fire all Events for load is complete
|
||||
/// </summary>
|
||||
/// <summary> Method Fire all Events for load is complete. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public void FireLoadCompletedEvents()
|
||||
{
|
||||
this.RunOnIOCallback(this.OnLoaded);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forces a update from web.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Forces a update from web. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public void ForceWebUpdate()
|
||||
{
|
||||
this.LoadData(ForceType.FORCE_WEB);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forces a update from file.
|
||||
/// </summary>
|
||||
/// <summary> Forces a update from file. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public void ForceReadFile()
|
||||
{
|
||||
this.LoadData(ForceType.FORCE_FILE);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="force">if set/not invalid/not default, force to load from web or file</param>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="force">
|
||||
/// (Optional) if set/not invalid/not default, force to load from web or file.
|
||||
/// </param>
|
||||
public void LoadData(ForceType force = ForceType.INVALID)
|
||||
{
|
||||
this.RunOnIOCallback(this.OnLoading);
|
||||
@@ -364,10 +330,9 @@ namespace CampusAppWPortalLib8.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save the model data if necessary.
|
||||
/// </summary>
|
||||
/// <param name="force">force saving. DEFAULT: false</param>
|
||||
/// <summary> Save the model data if necessary. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="force"> (Optional) force saving. DEFAULT: false. </param>
|
||||
public void SaveData(bool force = false)
|
||||
{
|
||||
if ((this.file != null)
|
||||
@@ -396,19 +361,17 @@ namespace CampusAppWPortalLib8.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the model io type.
|
||||
/// </summary>
|
||||
/// <returns>model io type</returns>
|
||||
/// <summary> Return the model io type. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> model io type. </returns>
|
||||
public ModelType GetModelType()
|
||||
{
|
||||
return this.modelType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create the parameterized uri.
|
||||
/// </summary>
|
||||
/// <param name="parameters">uri parameter list</param>
|
||||
/// <summary> Create the parameterized uri. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="parameters"> uri parameter list. </param>
|
||||
public void SetUriParams(List<UrlParamModel> parameters)
|
||||
{
|
||||
if (this.api != null)
|
||||
@@ -417,9 +380,8 @@ namespace CampusAppWPortalLib8.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the parameterized uri.
|
||||
/// </summary>
|
||||
/// <summary> Clear the parameterized uri. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public void ClearUriParams()
|
||||
{
|
||||
this.paramizedUri = null;
|
||||
@@ -429,58 +391,49 @@ namespace CampusAppWPortalLib8.Model
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Abstract declaration of the model deserialize function.
|
||||
/// </summary>
|
||||
/// <param name="modelData">model data as byte array</param>
|
||||
/// <returns>true, is succeeded</returns>
|
||||
/// <summary> Abstract declaration of the model deserialize function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="modelData"> model data as byte array. </param>
|
||||
/// <returns> true, is succeeded. </returns>
|
||||
protected abstract bool DeserializeModel(byte[] modelData);
|
||||
|
||||
/// <summary>
|
||||
/// Abstract declaration of the model serialize function.
|
||||
/// </summary>
|
||||
/// <returns>model data as byte array</returns>
|
||||
/// <summary> Abstract declaration of the model serialize function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> model data as byte array. </returns>
|
||||
protected abstract byte[] SerializeModel();
|
||||
|
||||
/// <summary>
|
||||
/// Method send a HttpGet
|
||||
/// </summary>
|
||||
/// <param name="url">the url</param>
|
||||
/// <summary> Method send a HttpGet. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="url"> the url. </param>
|
||||
protected abstract void SendHttpGet(Uri url);
|
||||
|
||||
/// <summary>
|
||||
/// Method check if model or file is Not up-to-date
|
||||
/// </summary>
|
||||
/// <param name="checkFunc">the check function</param>
|
||||
/// <returns>true if it is not up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if model or file is Not up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="checkFunc"> the check function. </param>
|
||||
/// <returns> true if it is not up-to-date, otherwise false. </returns>
|
||||
protected abstract bool CheckIsNotUpToDate(object checkFunc);
|
||||
|
||||
/// <summary>
|
||||
/// Method check if file is Not up-to-date for load process
|
||||
/// </summary>
|
||||
/// <returns>true if it is not up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if file is Not up-to-date for load process. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> true if it is not up-to-date, otherwise false. </returns>
|
||||
protected abstract bool CheckLoadFileIsNotUpToDate();
|
||||
|
||||
/// <summary>
|
||||
/// Method check if file is Not up-to-date for load process
|
||||
/// </summary>
|
||||
/// <returns>true if it is not up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if file is Not up-to-date for load process. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> true if it is not up-to-date, otherwise false. </returns>
|
||||
protected abstract bool CheckSaveFileIsNotUpToDate();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the file object.
|
||||
/// </summary>
|
||||
/// <summary> Initializes the file object. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
protected abstract void InitFile();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the web object.
|
||||
/// </summary>
|
||||
/// <summary> Initializes the web object. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
protected abstract void InitHttpApi();
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model io type is file.
|
||||
/// </summary>
|
||||
/// <returns>true, if the model io type has file.</returns>
|
||||
/// <summary> Check if the model io type is file. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> true, if the model io type has file. </returns>
|
||||
protected bool IsFile()
|
||||
{
|
||||
bool retValue = false;
|
||||
@@ -493,10 +446,9 @@ namespace CampusAppWPortalLib8.Model
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model io type is feed.
|
||||
/// </summary>
|
||||
/// <returns>true if the model io type has feed.</returns>
|
||||
/// <summary> Check if the model io type is feed. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> true if the model io type has feed. </returns>
|
||||
protected bool IsHttpApi()
|
||||
{
|
||||
bool retValue = false;
|
||||
@@ -513,12 +465,11 @@ namespace CampusAppWPortalLib8.Model
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the class. Is called by the constructors.
|
||||
/// </summary>
|
||||
/// <param name="modelType">model IO type</param>
|
||||
/// <param name="fileName">name of the data file</param>
|
||||
/// <param name="url">url of the feed data</param>
|
||||
/// <summary> Initialize the class. Is called by the constructors. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="modelType"> model IO type. </param>
|
||||
/// <param name="fileName"> name of the data file. </param>
|
||||
/// <param name="url"> url of the feed data. </param>
|
||||
private void Init(ModelType modelType, string fileName, string url)
|
||||
{
|
||||
this.modelType = modelType;
|
||||
@@ -543,10 +494,9 @@ namespace CampusAppWPortalLib8.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the on i/o callback operation.
|
||||
/// </summary>
|
||||
/// <param name="callbackFunc">The callback function.</param>
|
||||
/// <summary> Executes the on i/o callback operation. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="callbackFunc"> The callback function. </param>
|
||||
private void RunOnIOCallback(OnIO callbackFunc)
|
||||
{
|
||||
if (callbackFunc != null)
|
||||
@@ -555,9 +505,10 @@ namespace CampusAppWPortalLib8.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Executes the on failed callback operation.</summary>
|
||||
/// <param name="specialFunc">The special function.</param>
|
||||
/// <param name="defaultFunc">The default function.</param>
|
||||
/// <summary> Executes the on failed callback operation. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="specialFunc"> The special function. </param>
|
||||
/// <param name="defaultFunc"> The default function. </param>
|
||||
private void RunOnFailedCallback(OnFailed specialFunc, OnFailed defaultFunc)
|
||||
{
|
||||
if (specialFunc != null)
|
||||
|
||||
@@ -1,44 +1,37 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ChairModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the chair model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Departments
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Class to hold information about a professorship chair.
|
||||
/// </summary>
|
||||
/// <summary> Class to hold information about a professorship chair. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public class ChairModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// German name of the chair.
|
||||
/// </summary>
|
||||
/// <summary> German name of the chair. </summary>
|
||||
private string nameDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Link to the chair page.
|
||||
/// </summary>
|
||||
/// <summary> Link to the chair page. </summary>
|
||||
private string url = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English name of the chair.
|
||||
/// </summary>
|
||||
/// <summary> English name of the chair. </summary>
|
||||
private string nameEN = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChairModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="ChairModel" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public ChairModel()
|
||||
{
|
||||
}
|
||||
@@ -47,19 +40,17 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChairModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">name of the chair</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="ChairModel" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="name"> name of the chair. </param>
|
||||
public ChairModel(string name)
|
||||
{
|
||||
this.nameDE = name;
|
||||
this.nameEN = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german name of the chair.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the german name of the chair. </summary>
|
||||
/// <value> The name de. </value>
|
||||
[XmlAttribute("name_de")]
|
||||
public string NameDE
|
||||
{
|
||||
@@ -77,9 +68,8 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english name of the chair.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the english name of the chair. </summary>
|
||||
/// <value> The name en. </value>
|
||||
[XmlAttribute("name_en")]
|
||||
public string NameEN
|
||||
{
|
||||
@@ -97,9 +87,8 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the url of the chair homepage.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the url of the chair homepage. </summary>
|
||||
/// <value> The URL. </value>
|
||||
[XmlAttribute("url")]
|
||||
public string Url
|
||||
{
|
||||
@@ -117,9 +106,8 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized name of the chair.
|
||||
/// </summary>
|
||||
/// <summary> Gets the localized name of the chair. </summary>
|
||||
/// <value> The name. </value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
|
||||
@@ -1,41 +1,36 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DepartmentModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the department model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Departments
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// View model for department page.
|
||||
/// </summary>
|
||||
/// <summary> View model for department page. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
[XmlRoot("root")]
|
||||
public class DepartmentModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Object to store the time when the instance was created.
|
||||
/// </summary>
|
||||
/// <summary> Object to store the time when the instance was created. </summary>
|
||||
private DateTime createTime;
|
||||
|
||||
/// <summary>
|
||||
/// List of faculties.
|
||||
/// </summary>
|
||||
/// <summary> List of faculties. </summary>
|
||||
private ObservableCollection<FacultyModel> faculties;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DepartmentModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="DepartmentModel" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public DepartmentModel()
|
||||
{
|
||||
this.Faculties = new ObservableCollection<FacultyModel>();
|
||||
@@ -46,9 +41,8 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the faculty list.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the faculty list. </summary>
|
||||
/// <value> The faculties. </value>
|
||||
[XmlArray("professorships")]
|
||||
[XmlArrayItem("faculty")]
|
||||
public ObservableCollection<FacultyModel> Faculties
|
||||
@@ -67,9 +61,8 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time.
|
||||
/// </summary>
|
||||
/// <summary> Gets the creation time. </summary>
|
||||
/// <value> The create time. </value>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
@@ -83,10 +76,11 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <returns>true, if changes happen since last request, otherwise false</returns>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> true, if changes happen since last request, otherwise false. </returns>
|
||||
public bool HasChanged()
|
||||
{
|
||||
bool retValue = false;
|
||||
|
||||
@@ -1,46 +1,38 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="FacultyModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the faculty model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Departments
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for holding the faculty information.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Model for holding the faculty information. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public class FacultyModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Object to hold the information of the chair containing to this
|
||||
/// faculty.
|
||||
/// </summary>
|
||||
/// <summary> Object to hold the information of the chair containing to this faculty. </summary>
|
||||
private ObservableCollection<ChairModel> chairs;
|
||||
|
||||
/// <summary>
|
||||
/// Name of the faculty.
|
||||
/// </summary>
|
||||
/// <summary> Name of the faculty. </summary>
|
||||
private string name = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// For checking of change.
|
||||
/// </summary>
|
||||
/// <summary> For checking of change. </summary>
|
||||
private bool hasChanged = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FacultyModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="FacultyModel" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public FacultyModel()
|
||||
{
|
||||
this.chairs = new ObservableCollection<ChairModel>();
|
||||
@@ -50,19 +42,17 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FacultyModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">name of the faculty</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="FacultyModel" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="name"> name of the faculty. </param>
|
||||
public FacultyModel(string name)
|
||||
{
|
||||
this.name = name;
|
||||
this.chairs = new ObservableCollection<ChairModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of the chairs containing to this faculty.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the list of the chairs containing to this faculty. </summary>
|
||||
/// <value> The chairs. </value>
|
||||
[XmlElement("chair")]
|
||||
public ObservableCollection<ChairModel> Chairs
|
||||
{
|
||||
@@ -80,9 +70,8 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the faculty.
|
||||
/// </summary>
|
||||
/// <summary> Gets the name of the faculty. </summary>
|
||||
/// <value> The name. </value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
@@ -91,9 +80,8 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the faculty.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the id of the faculty. </summary>
|
||||
/// <value> The identifier. </value>
|
||||
[XmlAttribute("id")]
|
||||
public string Id
|
||||
{
|
||||
@@ -108,11 +96,10 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a chair model from the lost.
|
||||
/// </summary>
|
||||
/// <param name="chairName">name of the chair</param>
|
||||
/// <returns>true, if succeeded</returns>
|
||||
/// <summary> Remove a chair model from the lost. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="chairName"> name of the chair. </param>
|
||||
/// <returns> true, if succeeded. </returns>
|
||||
public bool RemoveChair(string chairName)
|
||||
{
|
||||
bool retValue = false;
|
||||
@@ -140,11 +127,10 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Add a chair to the list, if it does not already exist.
|
||||
/// </summary>
|
||||
/// <param name="chairModel">chair model to add</param>
|
||||
/// <returns>true, is succeeded</returns>
|
||||
/// <summary> Add a chair to the list, if it does not already exist. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="chairModel"> chair model to add. </param>
|
||||
/// <returns> true, is succeeded. </returns>
|
||||
public bool AddChair(ChairModel chairModel)
|
||||
{
|
||||
bool retValue = false;
|
||||
@@ -174,14 +160,12 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a chair model and add it to the list, if it does not already
|
||||
/// exist.
|
||||
/// </summary>
|
||||
/// <param name="nameDE">german name of the chair</param>
|
||||
/// <param name="nameEN">english name of the chair</param>
|
||||
/// <param name="url">url of the chair home page</param>
|
||||
/// <returns>true, if succeeded</returns>
|
||||
/// <summary> Create a chair model and add it to the list, if it does not already exist. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="nameDE"> german name of the chair. </param>
|
||||
/// <param name="nameEN"> english name of the chair. </param>
|
||||
/// <param name="url"> url of the chair home page. </param>
|
||||
/// <returns> true, if succeeded. </returns>
|
||||
public bool AddChair(string nameDE, string nameEN, string url)
|
||||
{
|
||||
bool retValue = false;
|
||||
@@ -212,11 +196,10 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the chair model of the chair with the specified name.
|
||||
/// </summary>
|
||||
/// <param name="name">name of the chair</param>
|
||||
/// <returns>chair model, if succeeded, otherwise null</returns>
|
||||
/// <summary> Return the chair model of the chair with the specified name. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="name"> name of the chair. </param>
|
||||
/// <returns> chair model, if succeeded, otherwise null. </returns>
|
||||
public ChairModel GetChairModel(string name)
|
||||
{
|
||||
ChairModel retValue = null;
|
||||
@@ -232,11 +215,10 @@ namespace CampusAppWPortalLib8.Model.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if there were changes in the chair list, otherwise false.
|
||||
/// </summary>
|
||||
/// <param name="reset">when true, the hasChanged flag will be reset</param>
|
||||
/// <returns>true, when changed, otherwise false</returns>
|
||||
/// <summary> Return true if there were changes in the chair list, otherwise false. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="reset"> (Optional) when true, the hasChanged flag will be reset. </param>
|
||||
/// <returns> true, when changed, otherwise false. </returns>
|
||||
public bool HasChanged(bool reset = true)
|
||||
{
|
||||
bool retValue = this.hasChanged;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamlistModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// <copyright file="ExamListModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the exam list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Exams
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
@@ -13,15 +14,16 @@ namespace CampusAppWPortalLib8.Model.Exams
|
||||
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>Exam list model.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Exam list model. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <typeparam name="T"> Generic type parameter. </typeparam>
|
||||
[XmlRoot("links")]
|
||||
public class ExamListModel<T> where T : ExamModel
|
||||
{
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the exams.</summary>
|
||||
/// <value>The exams.</value>
|
||||
/// <summary> Gets or sets the exams. </summary>
|
||||
/// <value> The exams. </value>
|
||||
[XmlElement("link")]
|
||||
public ObservableCollection<T> Exams { get; set; }
|
||||
|
||||
@@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Exams
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Creates course list.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <returns>The new course list.</returns>
|
||||
/// <summary> Creates course list. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
/// <returns> The new course list. </returns>
|
||||
public List<CourseModel> CreateCourseList()
|
||||
{
|
||||
List<CourseModel> result = new List<CourseModel>();
|
||||
|
||||
@@ -1,58 +1,59 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the exam model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Exams
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>Exam model.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Exam model. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
public class ExamModel
|
||||
{
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the course number.</summary>
|
||||
/// <value>The course number.</value>
|
||||
/// <summary> Gets or sets the course number. </summary>
|
||||
/// <value> The course number. </value>
|
||||
[XmlAttribute("stg")]
|
||||
public string CourseNumber { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the course text.</summary>
|
||||
/// <value>The course text.</value>
|
||||
/// <summary> Gets or sets the course text. </summary>
|
||||
/// <value> The course text. </value>
|
||||
[XmlAttribute("stgtext")]
|
||||
public string CourseText { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the degree number.</summary>
|
||||
/// <value>The degree number.</value>
|
||||
/// <summary> Gets or sets the degree number. </summary>
|
||||
/// <value> The degree number. </value>
|
||||
[XmlAttribute("abschl")]
|
||||
public string DegreeNumber { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the version.</summary>
|
||||
/// <value>The version.</value>
|
||||
/// <summary> Gets or sets the version. </summary>
|
||||
/// <value> The version. </value>
|
||||
[XmlAttribute("pversion")]
|
||||
public string Version { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the type.</summary>
|
||||
/// <value>The type.</value>
|
||||
/// <summary> Gets or sets the type. </summary>
|
||||
/// <value> The type. </value>
|
||||
[XmlAttribute("typ")]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the title.</summary>
|
||||
/// <value>The title.</value>
|
||||
/// <summary> Gets or sets the title. </summary>
|
||||
/// <value> The title. </value>
|
||||
[XmlAttribute("dtxt")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the date.</summary>
|
||||
/// <value>The date.</value>
|
||||
/// <summary> Gets or sets the date. </summary>
|
||||
/// <value> The date. </value>
|
||||
[XmlAttribute("datum")]
|
||||
public string Date { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the link.</summary>
|
||||
/// <value>The link.</value>
|
||||
/// <summary> Gets or sets the link. </summary>
|
||||
/// <value> The link. </value>
|
||||
[XmlAttribute("link")]
|
||||
public string Link { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ForcesTypes.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the forces types class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model
|
||||
{
|
||||
/// <summary>Values that represent ForceType for load function.</summary>
|
||||
/// <summary> Values that represent ForceType for load function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public enum ForceType
|
||||
{
|
||||
/// <summary>An enumeration constant representing the invalid/default/unset option.</summary>
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IXmlModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>05.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Declares the IXmlModel interface</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model
|
||||
{
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Xml model io handler class.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">model type</typeparam>
|
||||
/// <summary> Xml model io handler class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public interface IXmlModel
|
||||
{
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets for the name of the root-tag
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets for the name of the root-tag. </summary>
|
||||
/// <value> The name of the valid root. </value>
|
||||
string ValidRootName { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureActivity.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the lecture activity class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Lecture
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -12,55 +13,45 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a Activity
|
||||
/// </summary>
|
||||
/// <summary> Model for a Activity. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class LectureActivity
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>The activity icon name lecture.</summary>
|
||||
/// <summary> The activity icon name lecture. </summary>
|
||||
public const string ActivityTypeLecture = "Vorlesung";
|
||||
|
||||
/// <summary>The activity icon name seminar.</summary>
|
||||
/// <summary> The activity icon name seminar. </summary>
|
||||
public const string ActivityTypeSeminar = "Seminar";
|
||||
|
||||
/// <summary>The activity icon name practice.</summary>
|
||||
/// <summary> The activity icon name practice. </summary>
|
||||
public const string ActivityTypePract = "Übung";
|
||||
|
||||
/// <summary>The activity icon name lab.</summary>
|
||||
/// <summary> The activity icon name lab. </summary>
|
||||
public const string ActivityTypeLab = "Labor";
|
||||
|
||||
/// <summary>The activity icon name exam.</summary>
|
||||
/// <summary> The activity icon name exam. </summary>
|
||||
public const string ActivityTypeExam = "Prüfung";
|
||||
|
||||
/// <summary>
|
||||
/// List of lecturer
|
||||
/// </summary>
|
||||
/// <summary> List of lecturer. </summary>
|
||||
private ObservableCollection<LectureLecturer> lecturer;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the lecturers
|
||||
/// </summary>
|
||||
/// <summary> a formatted string for the names of the lecturers. </summary>
|
||||
private string lecturerString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the courses
|
||||
/// </summary>
|
||||
/// <summary> a formatted string for the names of the courses. </summary>
|
||||
private string courseString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the topic of the lecture
|
||||
/// </summary>
|
||||
/// <summary> a formatted string for the topic of the lecture. </summary>
|
||||
private string topic;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureActivity" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LectureActivity" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LectureActivity()
|
||||
{
|
||||
}
|
||||
@@ -69,45 +60,38 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the activity
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the type of the activity. </summary>
|
||||
/// <value> The type. </value>
|
||||
[XmlElement("art")]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the activity
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the id of the activity. </summary>
|
||||
/// <value> The identifier. </value>
|
||||
[XmlAttribute("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets semester of the activity
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets semester of the activity. </summary>
|
||||
/// <value> The semester. </value>
|
||||
[XmlElement("semester")]
|
||||
public int Semester { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the contact hour
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the contact hour. </summary>
|
||||
/// <value> The sws. </value>
|
||||
[XmlElement("sws")]
|
||||
public string SWS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets LectureModule
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets LectureModule. </summary>
|
||||
/// <value> The modul. </value>
|
||||
[XmlElement("modul")]
|
||||
public LectureModule Modul { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets LectureTitle
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets LectureTitle. </summary>
|
||||
/// <value> The title. </value>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the lecturers
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the lecturers. </summary>
|
||||
/// <value> The lecturer. </value>
|
||||
[XmlElement("lehrperson")]
|
||||
public ObservableCollection<LectureLecturer> Lecturer
|
||||
{
|
||||
@@ -125,9 +109,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the formatted string of the lecturers
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the formatted string of the lecturers. </summary>
|
||||
/// <value> The lecturer string. </value>
|
||||
public string LecturerString
|
||||
{
|
||||
get
|
||||
@@ -144,9 +127,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets formatted string of the courses
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets formatted string of the courses. </summary>
|
||||
/// <value> The course string. </value>
|
||||
public string CourseString
|
||||
{
|
||||
get
|
||||
@@ -163,27 +145,23 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the courses
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the courses. </summary>
|
||||
/// <value> The course. </value>
|
||||
[XmlElement("studiengang")]
|
||||
public ObservableCollection<LectureCourse> Course { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the dates of the activity
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the dates of the activity. </summary>
|
||||
/// <value> The dates. </value>
|
||||
[XmlElement("termin")]
|
||||
public ObservableCollection<LectureDate> Dates { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Department
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the Department. </summary>
|
||||
/// <value> The department. </value>
|
||||
[XmlElement("zugeordnete_einrichtung")]
|
||||
public string Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the topic of the Lecture
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the topic of the Lecture. </summary>
|
||||
/// <value> The topic. </value>
|
||||
[XmlElement("lehrinhalt")]
|
||||
public string Topic
|
||||
{
|
||||
@@ -206,9 +184,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the LecturerList
|
||||
/// </summary>
|
||||
/// <summary> Method create a formatted string of the LecturerList. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public void CreateLectureString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
@@ -220,9 +197,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
this.LecturerString = DefaultStringManager.RemoveNewLine(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the CourseList
|
||||
/// </summary>
|
||||
/// <summary> Method create a formatted string of the CourseList. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public void CreateCourseString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
// <copyright file="LectureCourse.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureCourse.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the lecture course class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a course
|
||||
/// </summary>
|
||||
/// <summary> Model for a course. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class LectureCourse
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureCourse" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LectureCourse" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LectureCourse()
|
||||
{
|
||||
}
|
||||
@@ -26,9 +26,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the course
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the title of the course. </summary>
|
||||
/// <value> The title. </value>
|
||||
[XmlElement("bezeichnung")]
|
||||
public string Title { get; set; }
|
||||
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureDate.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the lecture date class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the date of an activity
|
||||
/// </summary>
|
||||
/// <summary> Model for the date of an activity. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class LectureDate
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureDate" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LectureDate" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LectureDate()
|
||||
{
|
||||
}
|
||||
@@ -27,45 +26,38 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets WeekDay
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets WeekDay. </summary>
|
||||
/// <value> The week day. </value>
|
||||
[XmlElement("wochentag")]
|
||||
public string WeekDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets From
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets From. </summary>
|
||||
/// <value> from. </value>
|
||||
[XmlElement("von")]
|
||||
public string From { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets To
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets To. </summary>
|
||||
/// <value> to. </value>
|
||||
[XmlElement("bis")]
|
||||
public string To { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Interval
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets Interval. </summary>
|
||||
/// <value> The interval. </value>
|
||||
[XmlElement("rhythmus")]
|
||||
public string Interval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Room
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets Room. </summary>
|
||||
/// <value> The room. </value>
|
||||
[XmlElement("raum")]
|
||||
public string Room { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets StartDate
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets StartDate. </summary>
|
||||
/// <value> The start date. </value>
|
||||
[XmlElement("anfangsdatum")]
|
||||
public string StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets EndDate
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets EndDate. </summary>
|
||||
/// <value> The end date. </value>
|
||||
[XmlElement("enddatum")]
|
||||
public string EndDate { get; set; }
|
||||
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureLecturer.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the lecture lecturer class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a lecturer
|
||||
/// </summary>
|
||||
/// <summary> Model for a lecturer. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class LectureLecturer
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureLecturer" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LectureLecturer" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LectureLecturer()
|
||||
{
|
||||
}
|
||||
@@ -27,27 +26,23 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the FirstName of a lecturer
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the FirstName of a lecturer. </summary>
|
||||
/// <value> The name of the first. </value>
|
||||
[XmlElement("vorname")]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the LastName of a lecturer
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the LastName of a lecturer. </summary>
|
||||
/// <value> The name of the last. </value>
|
||||
[XmlElement("name")]
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of a lecturer
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the title of a lecturer. </summary>
|
||||
/// <value> The title. </value>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Responsibility of a lecturer
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the Responsibility of a lecturer. </summary>
|
||||
/// <value> The responsibility. </value>
|
||||
[XmlAttribute("zustaendigkeit")]
|
||||
public string Responsibility { get; set; }
|
||||
|
||||
@@ -56,9 +51,10 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <returns>returns a string like: [Title] FirstName LastName [(Responsibility)]</returns>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <returns> returns a string like: [Title] FirstName LastName [(Responsibility)]. </returns>
|
||||
public override string ToString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureList.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the lecture list class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Lecture
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a List of LectureActivity
|
||||
/// </summary>
|
||||
/// <typeparam name="T">T : LectureActivity</typeparam>
|
||||
/// <summary> Model for a List of LectureActivity. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <typeparam name="T"> T : LectureActivity. </typeparam>
|
||||
[XmlRoot("lsf_auszug")]
|
||||
public class LectureList<T> where T : LectureActivity
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureList {T}" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LectureList {T}" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LectureList()
|
||||
{
|
||||
}
|
||||
@@ -31,9 +30,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets List of the activities
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets List of the activities. </summary>
|
||||
/// <value> The activities. </value>
|
||||
[XmlArray("veranstaltungsliste")]
|
||||
[XmlArrayItem("veranstaltung")]
|
||||
public ObservableCollection<T> Activities { get; set; }
|
||||
@@ -42,20 +40,19 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method return a certain activity
|
||||
/// </summary>
|
||||
/// <param name="id"> id of the activity</param>
|
||||
/// <returns> the activity (FirstOrDefault)</returns>
|
||||
/// <summary> Method return a certain activity. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="id"> id of the activity. </param>
|
||||
/// <returns> the activity (FirstOrDefault) </returns>
|
||||
public T GetActivity(int id)
|
||||
{
|
||||
T activity = this.Activities.Where(p => p.Id == id).FirstOrDefault();
|
||||
return activity;
|
||||
}
|
||||
|
||||
/// <summary>Filter by course string.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <param name="filter">Specifies the filter.</param>
|
||||
/// <summary> Filter by course string. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
/// <param name="filter"> Specifies the filter. </param>
|
||||
public void FilterByCourseTitle(string filter)
|
||||
{
|
||||
ObservableCollection<T> filteredCollection = new ObservableCollection<T>();
|
||||
|
||||
@@ -1,40 +1,35 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureModule.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the lecture module class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the module of an lecture
|
||||
/// </summary>
|
||||
/// <summary> Model for the module of an lecture. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class LectureModule
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Number of the module (like an id)
|
||||
/// </summary>
|
||||
/// <summary> Number of the module (like an id) </summary>
|
||||
private int number;
|
||||
|
||||
/// <summary>
|
||||
/// Url to the website of the module
|
||||
/// </summary>
|
||||
/// <summary> Url to the website of the module. </summary>
|
||||
private Uri url;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureModule" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LectureModule" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LectureModule()
|
||||
{
|
||||
}
|
||||
@@ -43,15 +38,13 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the module
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the title of the module. </summary>
|
||||
/// <value> The title. </value>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of the module and create the URL
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the number of the module and create the URL. </summary>
|
||||
/// <value> The total number of ber. </value>
|
||||
[XmlElement("nummer")]
|
||||
public int Number
|
||||
{
|
||||
@@ -70,9 +63,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL of the module
|
||||
/// </summary>
|
||||
/// <summary> Gets the URL of the module. </summary>
|
||||
/// <value> The URL. </value>
|
||||
public Uri Url
|
||||
{
|
||||
get
|
||||
@@ -85,9 +77,8 @@ namespace CampusAppWPortalLib8.Model.Lecture
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method create the url of the module
|
||||
/// </summary>
|
||||
/// <summary> Method create the url of the module. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void CreateUrl()
|
||||
{
|
||||
this.url = new Uri(Constants.UrlLecture_ModulBaseAddr + this.number.ToString());
|
||||
|
||||
@@ -1,37 +1,33 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LinkListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the link list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Link
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a list of links.
|
||||
/// </summary>
|
||||
/// <summary> Model for a list of links. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
[XmlRoot("root")]
|
||||
public class LinkListModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Time when the model was created.
|
||||
/// </summary>
|
||||
/// <summary> Time when the model was created. </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LinkListModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LinkListModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LinkListModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
@@ -41,16 +37,14 @@ namespace CampusAppWPortalLib8.Model.Link
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets feed information item list.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets feed information item list. </summary>
|
||||
/// <value> The links. </value>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("link")]
|
||||
public ObservableCollection<LinkModel> Links { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model.
|
||||
/// </summary>
|
||||
/// <summary> Gets the creation time of the model. </summary>
|
||||
/// <value> The create time. </value>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
|
||||
@@ -1,50 +1,40 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LinkModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the link model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Link
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Model for menu. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class LinkModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// German version of the link title.
|
||||
/// </summary>
|
||||
/// <summary> German version of the link title. </summary>
|
||||
private string titleDE;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the link title.
|
||||
/// </summary>
|
||||
/// <summary> English version of the link title. </summary>
|
||||
private string titleEN;
|
||||
|
||||
/// <summary>
|
||||
/// German version of the link.
|
||||
/// </summary>
|
||||
/// <summary> German version of the link. </summary>
|
||||
private string linkDE;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the link.
|
||||
/// </summary>
|
||||
/// <summary> English version of the link. </summary>
|
||||
private string linkEN;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LinkModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LinkModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LinkModel()
|
||||
{
|
||||
}
|
||||
@@ -53,9 +43,8 @@ namespace CampusAppWPortalLib8.Model.Link
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german title of the link.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the german title of the link. </summary>
|
||||
/// <value> The title de. </value>
|
||||
[XmlAttribute("title_de")]
|
||||
public string Title_DE
|
||||
{
|
||||
@@ -73,9 +62,8 @@ namespace CampusAppWPortalLib8.Model.Link
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english title of the link.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the english title of the link. </summary>
|
||||
/// <value> The title en. </value>
|
||||
[XmlAttribute("title_en")]
|
||||
public string Title_EN
|
||||
{
|
||||
@@ -90,9 +78,8 @@ namespace CampusAppWPortalLib8.Model.Link
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german link.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the german link. </summary>
|
||||
/// <value> The link de. </value>
|
||||
[XmlAttribute("link_de")]
|
||||
public string Link_DE
|
||||
{
|
||||
@@ -110,9 +97,8 @@ namespace CampusAppWPortalLib8.Model.Link
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english link.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the english link. </summary>
|
||||
/// <value> The link en. </value>
|
||||
[XmlAttribute("link_en")]
|
||||
public string Link_EN
|
||||
{
|
||||
@@ -131,9 +117,10 @@ namespace CampusAppWPortalLib8.Model.Link
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value> The title. </value>
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
@@ -150,9 +137,10 @@ namespace CampusAppWPortalLib8.Model.Link
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value> The link. </value>
|
||||
public string Link
|
||||
{
|
||||
get
|
||||
|
||||
@@ -1,96 +1,66 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MealModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>06.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the meal model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Mensa
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a meal
|
||||
/// </summary>
|
||||
/// <summary> Model for a meal. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class MealModel
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the vegetarian icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the vegetarian icon. </summary>
|
||||
public const string MealIconNameVegetarian = "CARROTTE";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the free icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the free icon. </summary>
|
||||
public const string MealIconNameFree = "FREI";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the pig icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the pig icon. </summary>
|
||||
public const string MealIconNamePig = "SCHWEIN";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the cow icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the cow icon. </summary>
|
||||
public const string MealIconNameCow = "RIND";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the fowl icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the fowl icon. </summary>
|
||||
public const string MealIconNameFowl = "GEFL";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the cow-pig icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the cow-pig icon. </summary>
|
||||
public const string MealIconNameCowPig = "RINDSCHWEIN";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the fish icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the fish icon. </summary>
|
||||
public const string MealIconNameFish = "FISCH";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the wild icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the wild icon. </summary>
|
||||
public const string MealIconNameWild = "WILD";
|
||||
|
||||
/// <summary>
|
||||
/// Constant for the lamb icon
|
||||
/// </summary>
|
||||
/// <summary> Constant for the lamb icon. </summary>
|
||||
public const string MealIconNameLamb = "LAMM";
|
||||
|
||||
/// <summary>
|
||||
/// Variable for the id of the meal
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ValueRange : 0 - 7
|
||||
/// </remarks>
|
||||
/// <summary> Variable for the id of the meal. </summary>
|
||||
private int mealId;
|
||||
|
||||
/// <summary>
|
||||
/// Name of the meal
|
||||
/// </summary>
|
||||
/// <summary> Name of the meal. </summary>
|
||||
private string mealName;
|
||||
|
||||
/// <summary>
|
||||
/// Description of the meal
|
||||
/// </summary>
|
||||
/// <summary> Description of the meal. </summary>
|
||||
private string mealDesc;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the mealId
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ValueRange : 0 - 7
|
||||
/// </remarks>
|
||||
/// <summary> Gets or sets the mealId. </summary>
|
||||
/// <remarks> ValueRange : 0 - 7. </remarks>
|
||||
/// <value> The identifier of the meal. </value>
|
||||
[XmlAttribute("id")]
|
||||
public int MealId
|
||||
{
|
||||
@@ -109,9 +79,8 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the mealName
|
||||
/// </summary>
|
||||
/// <summary> Gets the mealName. </summary>
|
||||
/// <value> The name of the meal. </value>
|
||||
public string MealName
|
||||
{
|
||||
get
|
||||
@@ -120,9 +89,8 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the mealDescription
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the mealDescription. </summary>
|
||||
/// <value> Information describing the meal. </value>
|
||||
[XmlAttribute("desc")]
|
||||
public string MealDesc
|
||||
{
|
||||
@@ -140,14 +108,12 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the icon url
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the icon url. </summary>
|
||||
/// <value> The icon URL. </value>
|
||||
public string IconUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the icon name
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the icon name. </summary>
|
||||
/// <value> The name of the icon. </value>
|
||||
[XmlAttribute("icon")]
|
||||
public string IconName { get; set; }
|
||||
|
||||
@@ -155,9 +121,8 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method create depends of the mealId the mealName
|
||||
/// </summary>
|
||||
/// <summary> Method create depends of the mealId the mealName. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void CreateMealName()
|
||||
{
|
||||
switch (this.mealId)
|
||||
|
||||
@@ -1,40 +1,35 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MenuModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>04.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the menu model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
/// <summary> Model for menu. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class MenuModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Name of the day
|
||||
/// </summary>
|
||||
/// <summary> Name of the day. </summary>
|
||||
private string dayName;
|
||||
|
||||
/// <summary>
|
||||
/// DateTime of the day
|
||||
/// </summary>
|
||||
/// <summary> DateTime of the day. </summary>
|
||||
private string date;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MenuModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MenuModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public MenuModel()
|
||||
{
|
||||
}
|
||||
@@ -43,15 +38,13 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the menus for the week
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the menus for the week. </summary>
|
||||
/// <value> The meals. </value>
|
||||
[XmlElement("Meal")]
|
||||
public ObservableCollection<MealModel> Meals { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the WeekDay
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the WeekDay. </summary>
|
||||
/// <value> The day. </value>
|
||||
[XmlAttribute("day")]
|
||||
public string Day
|
||||
{
|
||||
@@ -69,9 +62,8 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets of Date
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets of Date. </summary>
|
||||
/// <value> The date. </value>
|
||||
[XmlAttribute("date")]
|
||||
public string Date
|
||||
{
|
||||
|
||||
@@ -1,35 +1,32 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MenuWeekModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the menu week model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menus in one week
|
||||
/// </summary>
|
||||
/// <summary> Model for menus in one week. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
[XmlRoot("root")]
|
||||
public class MenuWeekModel
|
||||
{
|
||||
#region Members
|
||||
/// <summary>
|
||||
/// Time when the model was created
|
||||
/// </summary>
|
||||
/// <summary> Time when the model was created. </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MenuWeekModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MenuWeekModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public MenuWeekModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
@@ -39,16 +36,14 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the menus for the week
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the menus for the week. </summary>
|
||||
/// <value> The menus. </value>
|
||||
[XmlArray("Mealplan")]
|
||||
[XmlArrayItem("Menu")]
|
||||
public ObservableCollection<MenuModel> Menus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model
|
||||
/// </summary>
|
||||
/// <summary> Gets the creation time of the model. </summary>
|
||||
/// <value> The create time. </value>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
@@ -61,10 +56,9 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate this day of the week, which its gets new menus
|
||||
/// </summary>
|
||||
/// <returns>Date of NewMenuWeekDay</returns>
|
||||
/// <summary> Method calculate this day of the week, which its gets new menus. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <returns> Date of NewMenuWeekDay. </returns>
|
||||
public static DateTime CalcFirstWeekDay()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
@@ -77,15 +71,14 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
return monday;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method determine holidays (Days with no meals) and add a pseudo meal
|
||||
/// </summary>
|
||||
/// <param name="text">text of the pseudo meal</param>
|
||||
/// <summary> Method determine holidays (Days with no meals) and add a pseudo meal. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="text"> text of the pseudo meal. </param>
|
||||
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<MealModel>();
|
||||
}
|
||||
|
||||
menu.Meals.Add(holiday);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ModelTypes.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the model types class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the I/O type of the model.
|
||||
/// </summary>
|
||||
/// <summary> Specifies the I/O type of the model. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public enum ModelType
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,97 +1,66 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursInstitutionModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the openinghours institution model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Model for menu. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class OpeninghoursInstitutionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// German version of the institution title.
|
||||
/// </summary>
|
||||
/// <summary> German version of the institution title. </summary>
|
||||
private string titleDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the institution title.
|
||||
/// </summary>
|
||||
/// <summary> English version of the institution title. </summary>
|
||||
private string titleEN = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on monday.
|
||||
/// </summary>
|
||||
/// <summary> Opening hours on monday. </summary>
|
||||
private string dayMonday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on tuesday.
|
||||
/// </summary>
|
||||
/// <summary> Opening hours on tuesday. </summary>
|
||||
private string dayTuesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on wednesday.
|
||||
/// </summary>
|
||||
/// <summary> Opening hours on wednesday. </summary>
|
||||
private string dayWednesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on thursday.
|
||||
/// </summary>
|
||||
/// <summary> Opening hours on thursday. </summary>
|
||||
private string dayThursday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on friday.
|
||||
/// </summary>
|
||||
/// <summary> Opening hours on friday. </summary>
|
||||
private string dayFriday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on saturday.
|
||||
/// </summary>
|
||||
/// <summary> Opening hours on saturday. </summary>
|
||||
private string daySaturday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on sunday.
|
||||
/// </summary>
|
||||
/// <summary> Opening hours on sunday. </summary>
|
||||
private string daySunday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Email address of the institution.
|
||||
/// </summary>
|
||||
/// <summary> Email address of the institution. </summary>
|
||||
private string infoEmail = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Phone number of the institution.
|
||||
/// </summary>
|
||||
/// <summary> Phone number of the institution. </summary>
|
||||
private string infoPhone = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Building name where the institution is located.
|
||||
/// </summary>
|
||||
/// <summary> Building name where the institution is located. </summary>
|
||||
private string infoBuilding = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Room where the institution is located.
|
||||
/// </summary>
|
||||
/// <summary> Room where the institution is located. </summary>
|
||||
private string infoRoom = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// German version of the comment.
|
||||
/// </summary>
|
||||
/// <summary> German version of the comment. </summary>
|
||||
private string commentDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the comment.
|
||||
/// </summary>
|
||||
/// <summary> English version of the comment. </summary>
|
||||
private string commentEN = string.Empty;
|
||||
|
||||
#endregion
|
||||
@@ -99,8 +68,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursInstitutionModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursInstitutionModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public OpeninghoursInstitutionModel()
|
||||
{
|
||||
}
|
||||
@@ -109,9 +79,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german title of the institution.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the german title of the institution. </summary>
|
||||
/// <value> The title de. </value>
|
||||
[XmlAttribute("title_de")]
|
||||
public string Title_DE
|
||||
{
|
||||
@@ -126,9 +95,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english title of the institution.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the english title of the institution. </summary>
|
||||
/// <value> The title en. </value>
|
||||
[XmlAttribute("title_en")]
|
||||
public string Title_EN
|
||||
{
|
||||
@@ -143,9 +111,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on monday.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the open hours on monday. </summary>
|
||||
/// <value> The monday. </value>
|
||||
[XmlAttribute("monday")]
|
||||
public string Monday
|
||||
{
|
||||
@@ -160,9 +127,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on tuesday.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the open hours on tuesday. </summary>
|
||||
/// <value> The tuesday. </value>
|
||||
[XmlAttribute("tuesday")]
|
||||
public string Tuesday
|
||||
{
|
||||
@@ -176,10 +142,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
this.dayTuesday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on wednesday.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Gets or sets the open hours on wednesday. </summary>
|
||||
/// <value> The wednesday. </value>
|
||||
[XmlAttribute("wednesday")]
|
||||
public string Wednesday
|
||||
{
|
||||
@@ -194,9 +159,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on thursday.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the open hours on thursday. </summary>
|
||||
/// <value> The thursday. </value>
|
||||
[XmlAttribute("thursday")]
|
||||
public string Thursday
|
||||
{
|
||||
@@ -211,9 +175,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on friday.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the open hours on friday. </summary>
|
||||
/// <value> The friday. </value>
|
||||
[XmlAttribute("friday")]
|
||||
public string Friday
|
||||
{
|
||||
@@ -227,10 +190,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
this.dayFriday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on saturday.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Gets or sets the open hours on saturday. </summary>
|
||||
/// <value> The saturday. </value>
|
||||
[XmlAttribute("saturday")]
|
||||
public string Saturday
|
||||
{
|
||||
@@ -244,10 +206,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
this.daySaturday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on sunday.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Gets or sets the open hours on sunday. </summary>
|
||||
/// <value> The sunday. </value>
|
||||
[XmlAttribute("sunday")]
|
||||
public string Sunday
|
||||
{
|
||||
@@ -262,9 +223,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email address of the institution.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the email address of the institution. </summary>
|
||||
/// <value> The e mail. </value>
|
||||
[XmlAttribute("email")]
|
||||
public string EMail
|
||||
{
|
||||
@@ -278,10 +238,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
this.infoEmail = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the phone number of the institution.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Gets or sets the phone number of the institution. </summary>
|
||||
/// <value> The phone. </value>
|
||||
[XmlAttribute("phone")]
|
||||
public string Phone
|
||||
{
|
||||
@@ -296,9 +255,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the building where the institution is located.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the building where the institution is located. </summary>
|
||||
/// <value> The building. </value>
|
||||
[XmlAttribute("location_building")]
|
||||
public string Building
|
||||
{
|
||||
@@ -313,9 +271,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the room where the institution is located.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the room where the institution is located. </summary>
|
||||
/// <value> The room. </value>
|
||||
[XmlAttribute("location_room")]
|
||||
public string Room
|
||||
{
|
||||
@@ -330,9 +287,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german comment.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the german comment. </summary>
|
||||
/// <value> The comment de. </value>
|
||||
[XmlAttribute("comment_de")]
|
||||
public string Comment_DE
|
||||
{
|
||||
@@ -347,9 +303,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english comment.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the english comment. </summary>
|
||||
/// <value> The comment en. </value>
|
||||
[XmlAttribute("comment_en")]
|
||||
public string Comment_EN
|
||||
{
|
||||
@@ -365,9 +320,10 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value> The title. </value>
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
@@ -384,9 +340,10 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value> The comment. </value>
|
||||
public string Comment
|
||||
{
|
||||
get
|
||||
@@ -403,9 +360,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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 ':'.
|
||||
/// </summary>
|
||||
/// <value> The e mail title. </value>
|
||||
public string EMailTitle
|
||||
{
|
||||
get
|
||||
@@ -415,9 +372,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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 ':'.
|
||||
/// </summary>
|
||||
/// <value> The phone title. </value>
|
||||
public string PhoneTitle
|
||||
{
|
||||
get
|
||||
@@ -430,11 +387,10 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Removes unwanted chars in a string.
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>fixed string</returns>
|
||||
/// <summary> Removes unwanted chars in a string. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="str"> input string. </param>
|
||||
/// <returns> fixed string. </returns>
|
||||
private string FixOpeninghoursString(string str)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
@@ -1,42 +1,37 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the openinghours model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for opening hours.
|
||||
/// </summary>
|
||||
/// <summary> Model for opening hours. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <typeparam name="T"> Generic type parameter. </typeparam>
|
||||
[XmlRoot("root")]
|
||||
public class OpeninghoursModel<T> where T: OpeninghoursInstitutionModel
|
||||
public class OpeninghoursModel<T> where T : OpeninghoursInstitutionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Time when the model was created.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Time when the model was created. </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets feed information item list.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Gets or sets feed information item list. </summary>
|
||||
private ObservableCollection<T> institutions;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the OpeninghoursModel class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public OpeninghoursModel()
|
||||
{
|
||||
this.institutions = new ObservableCollection<T>();
|
||||
@@ -47,9 +42,8 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model.
|
||||
/// </summary>
|
||||
/// <summary> Gets the creation time of the model. </summary>
|
||||
/// <value> The create time. </value>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
@@ -57,10 +51,9 @@ namespace CampusAppWPortalLib8.Model.Openinghours
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Institutions.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Gets or sets the Institutions. </summary>
|
||||
/// <value> The institutions. </value>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("institution")]
|
||||
public ObservableCollection<T> Institutions
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IPersonFunctionModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>01.10.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Declares the IPersonFunctionModel interface</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Person
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for PersonFunctionModel classes
|
||||
/// </summary>
|
||||
/// <summary> Interface for PersonFunctionModel classes. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public interface IPersonFunctionModel
|
||||
{
|
||||
/// <summary>Gets or sets the identifier of the person.</summary>
|
||||
/// <value>The identifier of the person.</value>
|
||||
/// <summary> Gets or sets the identifier of the person. </summary>
|
||||
/// <value> The identifier of the person. </value>
|
||||
string PersonID { get; set; }
|
||||
|
||||
/// <summary>Gets or sets zero-based index of the function.</summary>
|
||||
/// <value>The function index.</value>
|
||||
/// <summary> Gets or sets zero-based index of the function. </summary>
|
||||
/// <value> The function index. </value>
|
||||
int FunctionIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IPersonModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>01.10.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Declares the IPersonModel interface</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Person
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for PersonModel classes
|
||||
/// </summary>
|
||||
/// <typeparam name="T">PersonFunctionModel template</typeparam>
|
||||
/// <summary> Interface for PersonModel classes. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <typeparam name="T"> PersonFunctionModel template. </typeparam>
|
||||
public interface IPersonModel<T> where T : IPersonFunctionModel
|
||||
{
|
||||
/// <summary>Gets or sets the functions of a person.</summary>
|
||||
/// <value>The functions.</value>
|
||||
/// <summary> Gets or sets the functions of a person. </summary>
|
||||
/// <value> The functions. </value>
|
||||
ObservableCollection<T> Functions { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the identifier.</summary>
|
||||
/// <value>The identifier.</value>
|
||||
/// <summary> Gets or sets the identifier. </summary>
|
||||
/// <value> The identifier. </value>
|
||||
string ID { get; set; }
|
||||
|
||||
/// <summary>Sets person identifier to function.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Sets person identifier to function. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
void SetPersonIdToFunction();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +1,50 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PersonFunctionModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>05.09.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the person function model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Person
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>Person function model.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Person function model. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.IPersonFunctionModel"/>
|
||||
public class PersonFunctionModel : IPersonFunctionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The first tel.</summary>
|
||||
/// <summary> The first tel. </summary>
|
||||
private string tel1;
|
||||
|
||||
/// <summary>The second tel.</summary>
|
||||
/// <summary> The second tel. </summary>
|
||||
private string tel2;
|
||||
|
||||
/// <summary>The fax.</summary>
|
||||
/// <summary> The fax. </summary>
|
||||
private string fax;
|
||||
|
||||
/// <summary>The mail.</summary>
|
||||
/// <summary> The mail. </summary>
|
||||
private string mail;
|
||||
|
||||
/// <summary>The function.</summary>
|
||||
/// <summary> The function. </summary>
|
||||
private string function;
|
||||
|
||||
/// <summary>The appointment.</summary>
|
||||
/// <summary> The appointment. </summary>
|
||||
private string appointment;
|
||||
|
||||
/// <summary>The building.</summary>
|
||||
/// <summary> The building. </summary>
|
||||
private string building;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the tel 1.</summary>
|
||||
/// <value>The tel 1.</value>
|
||||
/// <summary> Gets or sets the tel 1. </summary>
|
||||
/// <value> The tel 1. </value>
|
||||
[XmlAttribute("telefon")]
|
||||
public string Tel1
|
||||
{
|
||||
@@ -60,8 +62,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the tel 2.</summary>
|
||||
/// <value>The tel 2.</value>
|
||||
/// <summary> Gets or sets the tel 2. </summary>
|
||||
/// <value> The tel 2. </value>
|
||||
[XmlAttribute("telefon2")]
|
||||
public string Tel2
|
||||
{
|
||||
@@ -79,8 +81,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the fax.</summary>
|
||||
/// <value>The fax.</value>
|
||||
/// <summary> Gets or sets the fax. </summary>
|
||||
/// <value> The fax. </value>
|
||||
[XmlAttribute("fax")]
|
||||
public string Fax
|
||||
{
|
||||
@@ -98,8 +100,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the function.</summary>
|
||||
/// <value>The function.</value>
|
||||
/// <summary> Gets or sets the function. </summary>
|
||||
/// <value> The function. </value>
|
||||
[XmlAttribute("funktion")]
|
||||
public string Function
|
||||
{
|
||||
@@ -117,8 +119,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the appointment.</summary>
|
||||
/// <value>The appointment.</value>
|
||||
/// <summary> Gets or sets the appointment. </summary>
|
||||
/// <value> The appointment. </value>
|
||||
[XmlAttribute("einrichtung")]
|
||||
public string Appointment
|
||||
{
|
||||
@@ -136,8 +138,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the building.</summary>
|
||||
/// <value>The building.</value>
|
||||
/// <summary> Gets or sets the building. </summary>
|
||||
/// <value> The building. </value>
|
||||
[XmlAttribute("gebaeude")]
|
||||
public string Building
|
||||
{
|
||||
@@ -155,8 +157,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the mail.</summary>
|
||||
/// <value>The mail.</value>
|
||||
/// <summary> Gets or sets the mail. </summary>
|
||||
/// <value> The mail. </value>
|
||||
[XmlAttribute("mail")]
|
||||
public string Mail
|
||||
{
|
||||
@@ -174,12 +176,12 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the identifier of the person.</summary>
|
||||
/// <value>The identifier of the person.</value>
|
||||
/// <summary> Gets or sets the identifier of the person. </summary>
|
||||
/// <seealso cref="P:CampusAppWPortalLib8.Model.Person.IPersonFunctionModel.PersonID"/>
|
||||
public string PersonID { get; set; }
|
||||
|
||||
/// <summary>Gets or sets zero-based index of the function.</summary>
|
||||
/// <value>The function index.</value>
|
||||
/// <summary> Gets or sets zero-based index of the function. </summary>
|
||||
/// <seealso cref="P:CampusAppWPortalLib8.Model.Person.IPersonFunctionModel.FunctionIndex"/>
|
||||
public int FunctionIndex { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PersonListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>05.09.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the person list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Person
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>Person list model.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <typeparam name="T">personModel template</typeparam>
|
||||
/// <summary> Person list model. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <typeparam name="T"> personModel template. </typeparam>
|
||||
[XmlRoot("Uebersicht")]
|
||||
public abstract class PersonListModel<T>
|
||||
{
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the persons.</summary>
|
||||
/// <value>The persons.</value>
|
||||
/// <summary> Gets or sets the persons. </summary>
|
||||
/// <value> The persons. </value>
|
||||
[XmlElement("person")]
|
||||
public ObservableCollection<T> Persons { get; set; }
|
||||
|
||||
@@ -29,29 +29,28 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Sets person identifier to function.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Sets person identifier to function. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public abstract void SetPersonIdToFunction();
|
||||
|
||||
/// <summary>Gets a person.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>The person.</returns>
|
||||
/// <summary> Gets a person. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <param name="id"> The identifier. </param>
|
||||
/// <returns> The person. </returns>
|
||||
public abstract T GetPerson(string id);
|
||||
|
||||
/// <summary>Removes the non function and set identifiers person.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Removes the non function and set identifiers person. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public void RemoveNonFunctionAndSetIdsPerson()
|
||||
{
|
||||
this.RemoveNonFunctionPerson();
|
||||
this.SetPersonIdToFunction();
|
||||
}
|
||||
|
||||
/// <summary>Removes the non function person.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Removes the non function person. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public abstract void RemoveNonFunctionPerson();
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +1,44 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PersonModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>05.09.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the person model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Person
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>Person model.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <typeparam name="T">template for the PersonFunction-Class</typeparam>
|
||||
/// <summary> A data Model for the person. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.IPersonModel{T}"/>
|
||||
public class PersonModel<T> : IPersonModel<T> where T : IPersonFunctionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The akadgrad.</summary>
|
||||
/// <summary> The akadgrad. </summary>
|
||||
private string akadgrad;
|
||||
|
||||
/// <summary>Name of the sur.</summary>
|
||||
/// <summary> Name of the sur. </summary>
|
||||
private string surName;
|
||||
|
||||
/// <summary>The person's first name.</summary>
|
||||
/// <summary> The person's first name. </summary>
|
||||
private string firstName;
|
||||
|
||||
/// <summary>The identifier.</summary>
|
||||
/// <summary> The identifier. </summary>
|
||||
private string id;
|
||||
|
||||
/// <summary>The functions.</summary>
|
||||
/// <summary> The functions. </summary>
|
||||
private ObservableCollection<T> functions;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the identifier.</summary>
|
||||
/// <value>The identifier.</value>
|
||||
/// <summary> Gets or sets the identifier. </summary>
|
||||
/// <value> The identifier. </value>
|
||||
[XmlAttribute("id")]
|
||||
public string ID
|
||||
{
|
||||
@@ -56,8 +57,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the akadgrad.</summary>
|
||||
/// <value>The akadgrad.</value>
|
||||
/// <summary> Gets or sets the akadgrad. </summary>
|
||||
/// <value> The akadgrad. </value>
|
||||
[XmlAttribute("akadgrad")]
|
||||
public string Akadgrad
|
||||
{
|
||||
@@ -75,8 +76,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the name of the sur.</summary>
|
||||
/// <value>The name of the sur.</value>
|
||||
/// <summary> Gets or sets the name of the sur. </summary>
|
||||
/// <value> The name of the sur. </value>
|
||||
[XmlAttribute("nachname")]
|
||||
public string SurName
|
||||
{
|
||||
@@ -94,8 +95,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the person's first name.</summary>
|
||||
/// <value>The name of the first.</value>
|
||||
/// <summary> Gets or sets the person's first name. </summary>
|
||||
/// <value> The name of the first. </value>
|
||||
[XmlAttribute("vorname")]
|
||||
public string FirstName
|
||||
{
|
||||
@@ -113,8 +114,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the functions of a person.</summary>
|
||||
/// <value>The functions.</value>
|
||||
/// <summary> Gets or sets the functions of a person. </summary>
|
||||
/// <value> The functions. </value>
|
||||
[XmlElement("funktion")]
|
||||
public ObservableCollection<T> Functions
|
||||
{
|
||||
@@ -133,8 +134,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of a Person (FirstName SurName).</summary>
|
||||
/// <value>The name of a Person.</value>
|
||||
/// <summary> Gets the name of a Person (FirstName SurName). </summary>
|
||||
/// <value> The name of a Person. </value>
|
||||
public string FullName
|
||||
{
|
||||
get
|
||||
@@ -147,8 +148,8 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Sets person identifier to function.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Sets person identifier to function. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public void SetPersonIdToFunction()
|
||||
{
|
||||
if (this.id == null || this.id.Equals(string.Empty) || this.functions == null)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RSSChannelModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the RSS channel model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.RSS
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -12,21 +13,17 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Channel Model, which contains the RSS feed item list.
|
||||
/// </summary>
|
||||
/// <summary> Channel Model, which contains the RSS feed item list. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public class RSSChannelModel
|
||||
{
|
||||
/// <summary>
|
||||
/// RSS feed information item list.
|
||||
/// </summary>
|
||||
/// <summary> RSS feed information item list. </summary>
|
||||
private ObservableCollection<RSSModel> item;
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RSSChannelModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="RSSChannelModel" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public RSSChannelModel()
|
||||
{
|
||||
this.item = new ObservableCollection<RSSModel>();
|
||||
@@ -37,9 +34,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the RSS feed item list.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the RSS feed item list. </summary>
|
||||
/// <value> The item. </value>
|
||||
[XmlElement("item")]
|
||||
public ObservableCollection<RSSModel> Item
|
||||
{
|
||||
@@ -61,6 +57,9 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary> Order by date. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="asc"> (Optional) the ascending. </param>
|
||||
public void OrderByDate(bool asc = false)
|
||||
{
|
||||
this.item.CollectionChanged -= this.OnListChanged;
|
||||
@@ -86,12 +85,12 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="sender">item list</param>
|
||||
/// <param name="e">event args</param>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> item list. </param>
|
||||
/// <param name="e"> event args. </param>
|
||||
private void OnListChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
if (e.Action == NotifyCollectionChangedAction.Add)
|
||||
|
||||
@@ -1,60 +1,56 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RSSModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the RSS model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.RSS
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using System.ComponentModel;
|
||||
|
||||
/// <summary>
|
||||
/// Contains the RSS feed information.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Contains the RSS feed information. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:System.ComponentModel.INotifyPropertyChanged"/>
|
||||
public class RSSModel : INotifyPropertyChanged
|
||||
{
|
||||
#region Member
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Index of this object.
|
||||
/// </summary>
|
||||
/// <summary> Index of this object. </summary>
|
||||
private int index = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Title of the fees
|
||||
/// </summary>
|
||||
/// <summary> Title of the fees. </summary>
|
||||
private string title;
|
||||
|
||||
/// <summary>
|
||||
/// Description text of the feed.
|
||||
/// </summary>
|
||||
/// <summary> Description text of the feed. </summary>
|
||||
private string text;
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp (publication date) of the event or news.
|
||||
/// </summary>
|
||||
/// <summary> Timestamp (publication date) of the event or news. </summary>
|
||||
private DateTime timestamp;
|
||||
|
||||
/// <summary>
|
||||
/// Url of the feed.
|
||||
/// </summary>
|
||||
/// <summary> Url of the feed. </summary>
|
||||
private string link;
|
||||
|
||||
/// <summary> true to show, false to hide the text. </summary>
|
||||
private bool textVisible = true;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region event
|
||||
|
||||
/// <summary> Occurs when Property Changed. </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the feed.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the title of the feed. </summary>
|
||||
/// <value> The title. </value>
|
||||
[XmlElement("title")]
|
||||
public string Title
|
||||
{
|
||||
@@ -72,9 +68,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the text of the feed.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the text of the feed. </summary>
|
||||
/// <value> The text. </value>
|
||||
[XmlElement("description")]
|
||||
public string Text
|
||||
{
|
||||
@@ -92,9 +87,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp of the feed as string.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the timestamp of the feed as string. </summary>
|
||||
/// <value> The timestamp. </value>
|
||||
[XmlElement("pubDate")]
|
||||
public string Timestamp
|
||||
{
|
||||
@@ -112,9 +106,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp of the feed as DateTime object.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the timestamp of the feed as DateTime object. </summary>
|
||||
/// <value> The DateTime timestamp. </value>
|
||||
public DateTime DTTimestamp
|
||||
{
|
||||
get
|
||||
@@ -128,10 +121,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date of the timestamp as string.
|
||||
/// example: Mon, 25.06.2013.
|
||||
/// </summary>
|
||||
/// <summary> Gets the date of the timestamp as string. example: Mon, 25.06.2013. </summary>
|
||||
/// <value> The date. </value>
|
||||
public string Date
|
||||
{
|
||||
get
|
||||
@@ -140,10 +131,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date of the timestamp as string.
|
||||
/// example: 25.06.
|
||||
/// </summary>
|
||||
/// <summary> Gets the date of the timestamp as string. example: 25.06. </summary>
|
||||
/// <value> The short date. </value>
|
||||
public string ShortDate
|
||||
{
|
||||
get
|
||||
@@ -152,10 +141,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the time of the timestamp as string.
|
||||
/// example: 12:56.
|
||||
/// </summary>
|
||||
/// <summary> Gets the time of the timestamp as string. example: 12:56. </summary>
|
||||
/// <value> The time. </value>
|
||||
public string Time
|
||||
{
|
||||
get
|
||||
@@ -164,9 +151,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the link/url of the feed.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the link/url of the feed. </summary>
|
||||
/// <value> The link. </value>
|
||||
[XmlElement("link")]
|
||||
public string Link
|
||||
{
|
||||
@@ -184,9 +170,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ListIndex.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the ListIndex. </summary>
|
||||
/// <value> The index. </value>
|
||||
public int Index
|
||||
{
|
||||
get
|
||||
@@ -200,9 +185,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the visibility of the text.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets a value indicating whether the text visibility. </summary>
|
||||
/// <value> true if text visibility, false if not. </value>
|
||||
public bool TextVisibility
|
||||
{
|
||||
get
|
||||
@@ -221,9 +205,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the visibility of the browser.
|
||||
/// </summary>
|
||||
/// <summary> Gets a value indicating whether the browser visibility. </summary>
|
||||
/// <value> true if browser visibility, false if not. </value>
|
||||
public bool BrowserVisibility
|
||||
{
|
||||
get
|
||||
@@ -238,13 +221,11 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Comparing function for DateTime timestamps.
|
||||
/// (currently unused)
|
||||
/// </summary>
|
||||
/// <param name="item1">first item</param>
|
||||
/// <param name="item2">second item</param>
|
||||
/// <returns>-1 if item2 is older then item1, otherwise 0</returns>
|
||||
/// <summary> Comparing function for DateTime timestamps. (currently unused) </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="item1"> first item. </param>
|
||||
/// <param name="item2"> second item. </param>
|
||||
/// <returns> -1 if item2 is older then item1, otherwise 0. </returns>
|
||||
public static int CompareTimeStamp(RSSModel item1, RSSModel item2)
|
||||
{
|
||||
if (item1.DTTimestamp > item2.DTTimestamp)
|
||||
@@ -261,19 +242,21 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary> Notifies a property changed. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="info"> The information. </param>
|
||||
private void NotifyPropertyChanged(string info)
|
||||
{
|
||||
if (PropertyChanged != null)
|
||||
if (this.PropertyChanged != null)
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(info));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove or transform html-unicode specific tags into ASCII.
|
||||
/// </summary>
|
||||
/// <param name="htmluni">html string</param>
|
||||
/// <returns>ASCII string</returns>
|
||||
/// <summary> Remove or transform html-unicode specific tags into ASCII. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="htmluni"> html string. </param>
|
||||
/// <returns> ASCII string. </returns>
|
||||
private string HTMLUnicodeToString(string htmluni)
|
||||
{
|
||||
StringBuilder retValue = new StringBuilder();
|
||||
|
||||
@@ -1,41 +1,36 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RSSViewModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the RSS view model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.RSS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// ViewModel of the RSS feed, containing the feed/channel object.
|
||||
/// </summary>
|
||||
/// <summary> ViewModel of the RSS feed, containing the feed/channel object. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
[XmlRoot("root")]
|
||||
public class RSSViewModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Object to store the time when the instance was created.
|
||||
/// </summary>
|
||||
/// <summary> Object to store the time when the instance was created. </summary>
|
||||
private DateTime createTime;
|
||||
|
||||
/// <summary>
|
||||
/// Channel list for the RSS feeds.
|
||||
/// </summary>
|
||||
/// <summary> Channel list for the RSS feeds. </summary>
|
||||
private ObservableCollection<RSSChannelModel> channel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RSSViewModel" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="RSSViewModel" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public RSSViewModel()
|
||||
{
|
||||
this.channel = new ObservableCollection<RSSChannelModel>();
|
||||
@@ -46,9 +41,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the channel list.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the channel list. </summary>
|
||||
/// <value> The channel. </value>
|
||||
[XmlArray("rss")]
|
||||
[XmlArrayItem("channel")]
|
||||
public ObservableCollection<RSSChannelModel> Channel
|
||||
@@ -67,9 +61,8 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time.
|
||||
/// </summary>
|
||||
/// <summary> Gets the creation time. </summary>
|
||||
/// <value> The create time. </value>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CampusTypes.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the campus types class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the campus of the user.
|
||||
/// </summary>
|
||||
/// <summary> Specifies the campus of the user. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public enum Campus
|
||||
{
|
||||
/// <summary> An enum constant representing the user setting campus option. </summary>
|
||||
UserSettingCampus = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Cottbus -> MainCampus
|
||||
/// </summary>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DegreeTypes.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the degree types class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the degrees.
|
||||
/// </summary>
|
||||
/// <summary> Specifies the degrees. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public enum DegreeType
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RolesTypes.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the roles types class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the role of the user.
|
||||
/// </summary>
|
||||
/// <summary> Specifies the role of the user. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public enum RoleType
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StudentCouncilListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the student council list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
{
|
||||
using System;
|
||||
@@ -13,24 +14,23 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menus in one week
|
||||
/// </summary>
|
||||
/// <summary> Model for menus in one week. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
[XmlRoot("root")]
|
||||
public class StudentCouncilListModel
|
||||
{
|
||||
#region Members
|
||||
/// <summary>
|
||||
/// Time when the model was created
|
||||
/// </summary>
|
||||
/// <summary> Time when the model was created. </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilListModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public StudentCouncilListModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
@@ -39,16 +39,15 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
/// <summary>
|
||||
/// Gets or sets the StudentCouncils
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Gets or sets the StudentCouncils. </summary>
|
||||
/// <value> The student councils. </value>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("studentcouncil")]
|
||||
public ObservableCollection<StudentCouncilModel> StudentCouncils { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model
|
||||
/// </summary>
|
||||
/// <summary> Gets the creation time of the model. </summary>
|
||||
/// <value> The create time. </value>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
@@ -60,10 +59,13 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
/// <summary>
|
||||
/// Method group the StudentCouncilList by Faculty
|
||||
/// </summary>
|
||||
/// <returns>a Dictionary, where the Key is name of the Faculty und the value is a List of StudentCouncil</returns>
|
||||
|
||||
/// <summary> Method group the StudentCouncilList by Faculty. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <returns>
|
||||
/// a Dictionary, where the Key is name of the Faculty und the value is a List of
|
||||
/// StudentCouncil.
|
||||
/// </returns>
|
||||
public Dictionary<string, List<StudentCouncilModel>> GetStudentCouncilsGroupByFaculty()
|
||||
{
|
||||
List<IGrouping<string, StudentCouncilModel>> tmpList = this.StudentCouncils.GroupBy(p => p.Faculty).ToList();
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StudentCouncilModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the student council model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
{
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
/// <summary> Model for menu. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class StudentCouncilModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// name of the faculty.
|
||||
/// </summary>
|
||||
/// <summary> name of the faculty. </summary>
|
||||
private string faculty;
|
||||
|
||||
#endregion
|
||||
@@ -28,8 +25,9 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public StudentCouncilModel()
|
||||
{
|
||||
}
|
||||
@@ -38,9 +36,8 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the faculty of the StudentCouncil.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the faculty of the StudentCouncil. </summary>
|
||||
/// <value> The faculty. </value>
|
||||
[XmlAttribute("faculty")]
|
||||
public string Faculty
|
||||
{
|
||||
@@ -63,21 +60,18 @@ namespace CampusAppWPortalLib8.Model.StudentCouncil
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the StudentCouncil.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the name of the StudentCouncil. </summary>
|
||||
/// <value> The name. </value>
|
||||
[XmlAttribute("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the webpage-url of the StudentCouncil.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the webpage-url of the StudentCouncil. </summary>
|
||||
/// <value> The URL. </value>
|
||||
[XmlAttribute("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email-address of the StudentCouncil.
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the email-address of the StudentCouncil. </summary>
|
||||
/// <value> The email. </value>
|
||||
[XmlAttribute("email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
// <copyright file="CampusListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CampusListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>08.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the campus list picker item list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// This Class creates a list of degrees
|
||||
/// </summary>
|
||||
/// <summary> This Class creates a list of degrees. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel"/>
|
||||
public class CampusListPickerItemListModel : ListPickerItemListModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CampusListPickerItemListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="CampusListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public CampusListPickerItemListModel()
|
||||
: base()
|
||||
{
|
||||
@@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the LoadList-Method <see cref="ListPickerItemListModel"/>
|
||||
/// </summary>
|
||||
/// <summary> Overrides the LoadList-Method <see cref="ListPickerItemListModel"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel.LoadList()"/>
|
||||
protected override void LoadList()
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.Campus.CB_MAIN).ToString(), AppResources.Campus_CBMain));
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CleanUrlParamModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>06.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the clean URL parameter model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// This class is a Model for the URLParameter like GET-Parameter
|
||||
/// </summary>
|
||||
/// <summary> This class is a Model for the URLParameter like GET-Parameter. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.UrlParamModel"/>
|
||||
public class CleanUrlParamModel : UrlParamModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the CleanUrlParamModel class.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <param name="key">the key for the parameter.</param>
|
||||
/// <summary> Initializes a new instance of the CleanUrlParamModel class. </summary>
|
||||
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
||||
/// <param name="key"> the key for the parameter. </param>
|
||||
public CleanUrlParamModel(string key)
|
||||
: base(key)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the CleanUrlParamModel class.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <param name="key"> the key for the parameter.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <summary> Initializes a new instance of the CleanUrlParamModel class. </summary>
|
||||
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
||||
/// <param name="key"> the key for the parameter. </param>
|
||||
/// <param name="value"> The value. </param>
|
||||
public CleanUrlParamModel(string key, string value)
|
||||
: base(key, value)
|
||||
{
|
||||
@@ -34,9 +35,8 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets the token, which indicate that the parameterList started
|
||||
/// </summary>
|
||||
/// <summary> Gets the token, which indicate that the parameterList started. </summary>
|
||||
/// <seealso cref="P:CampusAppWPortalLib8.Model.Utility.UrlParamModel.ParamToken"/>
|
||||
public override string ParamToken
|
||||
{
|
||||
get
|
||||
@@ -48,10 +48,9 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method return a formatted string like Key=Value
|
||||
/// </summary>
|
||||
/// <returns> return formatted string</returns>
|
||||
/// <summary> Method return a formatted string like Key=Value. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.UrlParamModel.ToString()"/>
|
||||
public override string ToString()
|
||||
{
|
||||
if (!this.IsParamValid())
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
// <copyright file="CourseListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CourseListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>25.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the course list picker item list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
using System.Linq;
|
||||
|
||||
/// <summary>
|
||||
/// This is a class for the courseList
|
||||
/// </summary>
|
||||
/// <summary> This is a class for the courseList. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel"/>
|
||||
public abstract class CourseListPickerItemListModel : ListPickerItemListModel
|
||||
{
|
||||
#region Method
|
||||
|
||||
/// <summary>Fall back list.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <summary> Fall back list. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
protected void FallBackList()
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel("017", "Bauingenieurwesen"));
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
// <copyright file="CourseModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CourseModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>25.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the course model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
using System;
|
||||
|
||||
/// <summary>Course model.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <summary> Course model. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
/// <seealso cref="T:System.IEquatable{CampusAppWPortalLib8.Model.Utility.CourseModel}"/>
|
||||
public class CourseModel : IEquatable<CourseModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the CourseModel class.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <param name="courseNumber">The course number.</param>
|
||||
/// <param name="courseText"> The course text.</param>
|
||||
/// <summary> Initializes a new instance of the CourseModel class. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
/// <param name="courseNumber"> The course number. </param>
|
||||
/// <param name="courseText"> The course text. </param>
|
||||
public CourseModel(string courseNumber, string courseText)
|
||||
{
|
||||
this.CourseNumber = courseNumber;
|
||||
@@ -29,22 +31,22 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the course number.</summary>
|
||||
/// <value>The course number.</value>
|
||||
/// <summary> Gets or sets the course number. </summary>
|
||||
/// <value> The course number. </value>
|
||||
public string CourseNumber { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the course text.</summary>
|
||||
/// <value>The course text.</value>
|
||||
/// <summary> Gets or sets the course text. </summary>
|
||||
/// <value> The course text. </value>
|
||||
public string CourseText { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Tests if this CourseModel is considered equal to another.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <param name="other">The course model to compare to this object.</param>
|
||||
/// <returns>true if the objects are considered equal, false if they are not.</returns>
|
||||
/// <summary> Tests if this CourseModel is considered equal to another. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
/// <param name="other"> The course model to compare to this object. </param>
|
||||
/// <returns> true if the objects are considered equal, false if they are not. </returns>
|
||||
public bool Equals(CourseModel other)
|
||||
{
|
||||
if (this.CourseNumber.Equals(other.CourseNumber))
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
// <copyright file="DegreeListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DegreeListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>25.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the degree list picker item list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// This Class creates a list of degrees
|
||||
/// </summary>
|
||||
/// <summary> This Class creates a list of degrees. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel"/>
|
||||
public class DegreeListPickerItemListModel : ListPickerItemListModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DegreeListPickerItemListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="DegreeListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public DegreeListPickerItemListModel()
|
||||
: base()
|
||||
{
|
||||
@@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the LoadList-Method <see cref="ListPickerItemListModel"/>
|
||||
/// </summary>
|
||||
/// <summary> Overrides the LoadList-Method <see cref="ListPickerItemListModel"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel.LoadList()"/>
|
||||
protected override void LoadList()
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.DegreeType.BACHELOR).ToString(), AppResources.Degree_Bachelor));
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>25.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the list picker item list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// Class for a List of ListPickerItems
|
||||
/// </summary>
|
||||
/// <summary> Class for a List of ListPickerItems. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class ListPickerItemListModel
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// reference of the itemList
|
||||
/// </summary>
|
||||
/// <summary> reference of the itemList. </summary>
|
||||
private List<ListPickerItemModel> list;
|
||||
|
||||
#endregion
|
||||
@@ -26,8 +24,9 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ListPickerItemListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="ListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ListPickerItemListModel()
|
||||
{
|
||||
this.list = new List<ListPickerItemModel>();
|
||||
@@ -37,9 +36,8 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ItemList
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the ItemList. </summary>
|
||||
/// <value> The list. </value>
|
||||
public List<ListPickerItemModel> List
|
||||
{
|
||||
get
|
||||
@@ -62,11 +60,10 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method return a the Index of an item which has a certain value
|
||||
/// </summary>
|
||||
/// <param name="value">a certain value</param>
|
||||
/// <returns>return index of value or default(0)</returns>
|
||||
/// <summary> Method return a the Index of an item which has a certain value. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="value"> a certain value. </param>
|
||||
/// <returns> return index of value or default(0) </returns>
|
||||
public virtual int GetIndexOrDefault(string value)
|
||||
{
|
||||
int index = 0;
|
||||
@@ -85,41 +82,37 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
return index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// add an new item to the list
|
||||
/// </summary>
|
||||
/// <param name="value">value of the item</param>
|
||||
/// <param name="text">text of the item</param>
|
||||
/// <summary> add an new item to the list. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="value"> value of the item. </param>
|
||||
/// <param name="text"> text of the item. </param>
|
||||
public void AddItem(string value, string text)
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel(value, text));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// add an new item to the list
|
||||
/// </summary>
|
||||
/// <param name="item">new item of the list</param>
|
||||
/// <summary> add an new item to the list. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="item"> new item of the list. </param>
|
||||
public void AddItem(ListPickerItemModel item)
|
||||
{
|
||||
this.list.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// remove an item
|
||||
/// </summary>
|
||||
/// <param name="value">value of the item</param>
|
||||
/// <param name="text">text of the item</param>
|
||||
/// <returns>true if removing was successful, otherwise false</returns>
|
||||
/// <summary> remove an item. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="value"> value of the item. </param>
|
||||
/// <param name="text"> text of the item. </param>
|
||||
/// <returns> true if removing was successful, otherwise false. </returns>
|
||||
public bool RemoveItem(string value, string text)
|
||||
{
|
||||
return this.RemoveItem(new ListPickerItemModel(value, text));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// remove an item
|
||||
/// </summary>
|
||||
/// <param name="item">item which has to be remove</param>
|
||||
/// <returns>true if removing was successful, otherwise false</returns>
|
||||
/// <summary> remove an item. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="item"> item which has to be remove. </param>
|
||||
/// <returns> true if removing was successful, otherwise false. </returns>
|
||||
public bool RemoveItem(ListPickerItemModel item)
|
||||
{
|
||||
return this.list.Remove(item);
|
||||
@@ -129,12 +122,8 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Method load an default list
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// load an empty list
|
||||
/// </remarks>
|
||||
/// <summary> Method load an default list. </summary>
|
||||
/// <remarks> load an empty list. </remarks>
|
||||
protected virtual void LoadList()
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListPickerItemModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the list picker item model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for the ListPickerItems
|
||||
/// </summary>
|
||||
/// <summary> Model for the ListPickerItems. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class ListPickerItemModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ListPickerItemModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="ListPickerItemModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ListPickerItemModel()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ListPickerItemModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="ListPickerItemModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="value">string for the value property of an item</param>
|
||||
/// <param name="text">string for the text property of an item</param>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="value"> string for the value property of an item. </param>
|
||||
/// <param name="text"> string for the text property of an item. </param>
|
||||
public ListPickerItemModel(string value, string text)
|
||||
{
|
||||
this.Value = value;
|
||||
@@ -36,14 +38,12 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Value of an Item
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the Value of an Item. </summary>
|
||||
/// <value> The value. </value>
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Text (caption) of an Item
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the Text (caption) of an Item. </summary>
|
||||
/// <value> The text. </value>
|
||||
public string Text { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
// <copyright file="RoleListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RoleListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>25.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the role list picker item list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the RoleList
|
||||
/// </summary>
|
||||
/// <summary> Class for the RoleList. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel"/>
|
||||
public class RoleListPickerItemListModel : ListPickerItemListModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RoleListPickerItemListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="RoleListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public RoleListPickerItemListModel()
|
||||
: base()
|
||||
{
|
||||
@@ -29,9 +31,9 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the LoadList-Method <see cref="ListPickerItemListModel"/>
|
||||
/// </summary>
|
||||
/// <summary> Overrides the LoadList-Method <see cref="ListPickerItemListModel"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel.LoadList()"/>
|
||||
protected override void LoadList()
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel(CampusAppWPortalLib8.Model.Settings.RoleType.STUDENT.ToString(), AppResources.Setting_RoleStudent));
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
// <copyright file="SemesterListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SemesterListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>25.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the semester list picker item list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for the SemesterList
|
||||
/// </summary>
|
||||
/// <summary> Class for the SemesterList. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel"/>
|
||||
public class SemesterListPickerItemListModel : ListPickerItemListModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SemesterListPickerItemListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="SemesterListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public SemesterListPickerItemListModel()
|
||||
: base()
|
||||
{
|
||||
@@ -26,9 +29,9 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the LoadList-Method <see cref="ListPickerItemListModel"/>
|
||||
/// </summary>
|
||||
/// <summary> Overrides the LoadList-Method <see cref="ListPickerItemListModel"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel.LoadList()"/>
|
||||
protected override void LoadList()
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel("20132", "WiSe 13/14"));
|
||||
|
||||
@@ -1,42 +1,38 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="URLParamModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>17.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the URL parameter model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// This class is a Model for the URLParameter like GET-Parameter
|
||||
/// </summary>
|
||||
/// <summary> This class is a Model for the URLParameter like GET-Parameter. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class UrlParamModel
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Variable of the key
|
||||
/// </summary>
|
||||
/// <summary> Variable of the key. </summary>
|
||||
protected readonly string key;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UrlParamModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="key">the key for the parameter</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="UrlParamModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="key"> the key for the parameter. </param>
|
||||
public UrlParamModel(string key)
|
||||
{
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UrlParamModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="key">the key for the parameter</param>>
|
||||
/// <param name="value">value of the parameter</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="UrlParamModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="key"> the key for the parameter. </param>
|
||||
/// <param name="value"> value of the parameter. </param>
|
||||
public UrlParamModel(string key, string value)
|
||||
{
|
||||
this.key = key;
|
||||
@@ -46,14 +42,12 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the Parameter
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the value of the Parameter. </summary>
|
||||
/// <value> The value. </value>
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the key of the parameter
|
||||
/// </summary>
|
||||
/// <summary> Gets the key of the parameter. </summary>
|
||||
/// <value> The key. </value>
|
||||
public string Key
|
||||
{
|
||||
get
|
||||
@@ -62,9 +56,8 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the token, which indicate that the parameterList started
|
||||
/// </summary>
|
||||
/// <summary> Gets the token, which indicate that the parameterList started. </summary>
|
||||
/// <value> The parameter token. </value>
|
||||
public virtual string ParamToken
|
||||
{
|
||||
get
|
||||
@@ -76,10 +69,9 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the parameter is valid
|
||||
/// </summary>
|
||||
/// <returns>true if is it valid, otherwise false</returns>
|
||||
/// <summary> Method check if the parameter is valid. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <returns> true if is it valid, otherwise false. </returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method return a formatted string like Key=Value
|
||||
/// </summary>
|
||||
/// <returns> return formatted string</returns>
|
||||
/// <summary> Method return a formatted string like Key=Value. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Object.ToString()"/>
|
||||
public override string ToString()
|
||||
{
|
||||
if (!this.IsParamValid())
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<CollectionProperty Name="RecognizedWords">
|
||||
<Value>akadgrad</Value>
|
||||
<Value>api</Value>
|
||||
<Value>fiedlchr</Value>
|
||||
<Value>nfc</Value>
|
||||
<Value>param</Value>
|
||||
<Value>qr</Value>
|
||||
@@ -16,7 +17,7 @@
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
|
||||
<AnalyzerSettings>
|
||||
<StringProperty Name="CompanyName">BTU/IIT</StringProperty>
|
||||
<StringProperty Name="Copyright">BTU/IIT</StringProperty>
|
||||
<StringProperty Name="Copyright">The MIT License (MIT). Copyright (c) 2013 BTU/IIT.</StringProperty>
|
||||
</AnalyzerSettings>
|
||||
</Analyzer>
|
||||
</Analyzers>
|
||||
|
||||
Reference in New Issue
Block a user