diff --git a/CampusAppWP8/CampusAppWP8/App.xaml.cs b/CampusAppWP8/CampusAppWP8/App.xaml.cs
index 55788b88..9d7a8955 100644
--- a/CampusAppWP8/CampusAppWP8/App.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/App.xaml.cs
@@ -1,12 +1,15 @@
-using CampusAppWP8.Resources;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-using System;
+using System;
using System.Diagnostics;
-using System.IO.IsolatedStorage;
+using System.Resources;
using System.Windows;
using System.Windows.Markup;
using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using CampusAppWP8.Resources;
+using System.IO.IsolatedStorage;
+using CampusAppWP8.File.Setting;
+using CampusAppWP8.Model.Setting;
namespace CampusAppWP8
@@ -128,13 +131,36 @@ namespace CampusAppWP8
// Dieser Code wird beim Reaktivieren der Anwendung nicht ausgeführt
private void Application_Launching(object sender, LaunchingEventArgs e)
{
+ this.LoadSettings();
+ }
+
+ private void LoadSettings()
+ {
+ UserProfilFile userFile;
+ userFile = Settings.UserProfil;
+ if (userFile.Model == null)
+ {
+ userFile.onLoaded += new UserProfilFile.OnLoaded(this.UserSettingsLoaded);
+ userFile.LoadData();
+ }
+ else
+ {
+ this.UserSettingsLoaded();
+ }
+ }
+ private void UserSettingsLoaded()
+ {
+ if (Settings.UserProfil.Model == null)
+ {
+ Settings.UserProfil.Model = new UserProfilModel();
+ }
}
// Code, der ausgeführt werden soll, wenn die Anwendung aktiviert wird (in den Vordergrund gebracht wird)
// Dieser Code wird beim ersten Starten der Anwendung nicht ausgeführt
private void Application_Activated(object sender, ActivatedEventArgs e)
{
-
+ this.LoadSettings();
}
// Code, der ausgeführt werden soll, wenn die Anwendung deaktiviert wird (in den Hintergrund gebracht wird)
diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
index 30b3410b..847a75fc 100644
--- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
+++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
@@ -98,7 +98,18 @@
+
+
+
+
+
+
+
+
+ UserProfil.xaml
+
+
@@ -290,6 +301,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/CampusAppWP8/CampusAppWP8/File/Setting/UserProfilFile.cs b/CampusAppWP8/CampusAppWP8/File/Setting/UserProfilFile.cs
new file mode 100644
index 00000000..64dc798b
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/File/Setting/UserProfilFile.cs
@@ -0,0 +1,67 @@
+//-----------------------------------------------------------------------
+//
+// Company copyright tag.
+//
+// stubbfel
+// 23.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.File.Setting
+{
+ using System.IO;
+ using CampusAppWP8.Model;
+ using CampusAppWP8.Model.Setting;
+ using CampusAppWP8.Resources;
+
+ ///
+ /// Class for handle the user-profile-file
+ ///
+ public class UserProfilFile : XmlModel
+ {
+ #region Constructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UserProfilFile()
+ : base(ModelType.File, Constants.FileProfil_User)
+ {
+ this.isFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
+ this.isFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);
+ }
+
+ // Constructor
+ #endregion
+
+ ///
+ /// Method implement CheckIsFileUpToDate()-Method .
+ ///
+ /// model object
+ /// file info object
+ /// true, if file is up-to-date, otherwise false
+ private bool CheckIsFileUpToDateOnLoad(UserProfilModel model, FileInfo info)
+ {
+ if (model == null)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ ///
+ /// Method implement CheckIsFileUpToDate()-Method .
+ ///
+ /// model object
+ /// file info object
+ /// true, if file is up-to-date, otherwise false
+ private bool CheckIsFileUpToDateOnSave(UserProfilModel model, FileInfo info)
+ {
+ if (model != null && !model.HasChanged())
+ {
+ return true;
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs
index cca12fe5..748d039e 100644
--- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs
@@ -7,11 +7,9 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Lecture
{
- using System.Collections.Generic;
- using System.Linq;
using System.Runtime.Serialization;
+ using CampusAppWP8.Model.Setting;
using CampusAppWP8.Model.Utility;
- using CampusAppWP8.Resources;
///
/// Model for the LecturePage
@@ -57,27 +55,27 @@ namespace CampusAppWP8.Model.Lecture
///
/// need to be extend to full list
///
- private List courseList;
+ private ListPickerItemListModel courseList;
///
/// List of the degrees
///
- private List degreeList;
+ private ListPickerItemListModel degreeList;
///
/// List of the semester
///
- private List semesterList;
+ private ListPickerItemListModel semesterList;
///
/// List for the number of semester (from)
///
- private List fromNumberList;
+ private ListPickerItemListModel fromNumberList;
///
/// List for the number of semester (to)
///
- private List toNumberList;
+ private ListPickerItemListModel toNumberList;
#endregion
@@ -88,6 +86,9 @@ namespace CampusAppWP8.Model.Lecture
///
public LecturePageModel()
{
+ this.courseList = new CourseListPickerItemListModel();
+ this.degreeList = new DegreeListPickerItemListModel();
+ this.semesterList = new SemesterListPickerItemListModel();
}
#endregion
@@ -105,7 +106,7 @@ namespace CampusAppWP8.Model.Lecture
set
{
- if (value != this.selectCourseIndex && this.courseList != null && value < this.courseList.Count)
+ if (value != this.selectCourseIndex && this.courseList != null && value < this.courseList.List.Count)
{
this.selectCourseIndex = value;
}
@@ -124,7 +125,7 @@ namespace CampusAppWP8.Model.Lecture
set
{
- if (value != this.selectDegreeIndex && this.degreeList != null && value < this.degreeList.Count)
+ if (value != this.selectDegreeIndex && this.degreeList != null && value < this.degreeList.List.Count)
{
this.selectDegreeIndex = value;
}
@@ -143,7 +144,7 @@ namespace CampusAppWP8.Model.Lecture
set
{
- if (value != this.selectSemesterIndex && this.semesterList != null && value < this.semesterList.Count)
+ if (value != this.selectSemesterIndex && this.semesterList != null && value < this.semesterList.List.Count)
{
this.selectSemesterIndex = value;
}
@@ -162,7 +163,7 @@ namespace CampusAppWP8.Model.Lecture
set
{
- if (value != this.selectFromIndex && this.fromNumberList != null && value < this.fromNumberList.Count)
+ if (value != this.selectFromIndex && this.fromNumberList != null && value < this.fromNumberList.List.Count)
{
this.selectFromIndex = value;
}
@@ -181,7 +182,7 @@ namespace CampusAppWP8.Model.Lecture
set
{
- if (value != this.selectToIndex && this.toNumberList != null && value < this.toNumberList.Count)
+ if (value != this.selectToIndex && this.toNumberList != null && value < this.toNumberList.List.Count)
{
this.selectToIndex = value;
}
@@ -191,7 +192,7 @@ namespace CampusAppWP8.Model.Lecture
///
/// Gets List for the courses of the BTU
///
- public List CourseList
+ public ListPickerItemListModel CourseList
{
get
{
@@ -202,7 +203,7 @@ namespace CampusAppWP8.Model.Lecture
///
/// Gets List of the degrees
///
- public List DegreeList
+ public ListPickerItemListModel DegreeList
{
get
{
@@ -213,7 +214,7 @@ namespace CampusAppWP8.Model.Lecture
///
/// Gets List of the semester
///
- public List SemesterList
+ public ListPickerItemListModel SemesterList
{
get
{
@@ -224,7 +225,7 @@ namespace CampusAppWP8.Model.Lecture
///
/// Gets List for the number of semester
///
- public List FromNumberList
+ public ListPickerItemListModel FromNumberList
{
get
{
@@ -235,7 +236,7 @@ namespace CampusAppWP8.Model.Lecture
///
/// Gets the NumberList
///
- public List ToNumberList
+ public ListPickerItemListModel ToNumberList
{
get
{
@@ -253,11 +254,12 @@ namespace CampusAppWP8.Model.Lecture
///
public void LoadLists()
{
- this.LoadCourseList();
- this.LoadDegreeList();
this.LoadFromNumberList();
this.LoadToNumberList();
- this.LoadSemesterList();
+ UserProfilModel userModel = Settings.UserProfil.Model;
+ this.selectCourseIndex = this.courseList.GetIndexOrDefault(((int)userModel.Course).ToString().PadLeft(3, '0'));
+ this.selectDegreeIndex = this.degreeList.GetIndexOrDefault(((int)userModel.Degree).ToString());
+ this.selectSemesterIndex = this.semesterList.GetIndexOrDefault(((int)userModel.Semester).ToString());
}
#endregion
@@ -270,13 +272,13 @@ namespace CampusAppWP8.Model.Lecture
public void LoadFromNumberList()
{
string selectValue = null;
- if (this.fromNumberList != null)
+ if (this.fromNumberList != null && this.fromNumberList.List.Count > 0)
{
- selectValue = this.fromNumberList[this.SelectFromIndex].Value;
+ selectValue = this.fromNumberList.List[this.SelectFromIndex].Value;
}
this.fromNumberList = this.CreateNumberList(1, 10);
- this.SelectFromIndex = this.GetIndexOrDefault(this.fromNumberList, selectValue);
+ this.SelectFromIndex = this.fromNumberList.GetIndexOrDefault(selectValue);
}
///
@@ -285,13 +287,13 @@ namespace CampusAppWP8.Model.Lecture
public void LoadToNumberList()
{
string selectValue = null;
- if (this.toNumberList != null)
+ if (this.toNumberList != null && this.toNumberList.List.Count > 0)
{
- selectValue = this.toNumberList[this.SelectToIndex].Value;
+ selectValue = this.toNumberList.List[this.SelectToIndex].Value;
}
this.toNumberList = this.CreateNumberList(this.SelectFromIndex + 1, 10);
- this.SelectToIndex = this.GetIndexOrDefault(this.toNumberList, selectValue);
+ this.SelectToIndex = this.toNumberList.GetIndexOrDefault(selectValue);
}
///
@@ -300,10 +302,10 @@ namespace CampusAppWP8.Model.Lecture
/// startValue of the list
/// endValue of the list
/// return list
- private List CreateNumberList(int startvalue, int endvalue)
+ private ListPickerItemListModel CreateNumberList(int startvalue, int endvalue)
{
- List list = new List();
- string degree = this.DegreeList[this.SelectDegreeIndex].Value;
+ ListPickerItemListModel list = new ListPickerItemListModel();
+ string degree = this.DegreeList.List[this.SelectDegreeIndex].Value;
for (int i = startvalue; i <= endvalue; i++)
{
@@ -312,108 +314,11 @@ namespace CampusAppWP8.Model.Lecture
break;
}
- list.Add(new ListPickerItemModel() { Text = i.ToString(), Value = i.ToString() });
+ list.AddItem(i.ToString(), i.ToString());
}
return list;
}
-
- ///
- /// Load the SemesterList
- ///
- private void LoadSemesterList()
- {
- this.semesterList = new List();
- this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 13", Value = "20131" });
- this.semesterList.Add(new ListPickerItemModel() { Text = "WiSe 13/14", Value = "20132" });
- this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 14", Value = "20131" });
- }
-
- ///
- /// Load the DegreeList
- ///
- private void LoadDegreeList()
- {
- this.degreeList = new List();
- this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Bachelor, Value = "82" });
- this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Master, Value = "88" });
- this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Diploma, Value = "11" });
- }
-
- ///
- /// Load the DegreeList
- ///
- private void LoadCourseList()
- {
- this.courseList = new List();
- this.courseList.Add(new ListPickerItemModel() { Text = "Architektur", Value = "013" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Bauingenieurwesen", Value = "017" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Betriebswirtschaftslehre", Value = "021" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsrecht für Technologieunternehmen", Value = "042" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Elektrotechnik", Value = "048" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Informatik ", Value = "079" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Maschinenbau", Value = "104" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Mathematik", Value = "105" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Physik ", Value = "128" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsingenieurwesen", Value = "179" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftswissenschaften ", Value = "184" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Biomedizinische Gerätetechnik ", Value = "215" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik", Value = "226" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsmathematik ", Value = "276" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Kultur und Technik ", Value = "711" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Physik der Halbleiter-Technologie", Value = "744" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Angewandte Mathematik ", Value = "749" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Technologie- und Innovationsmanagement", Value = "764" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Stadt- und Regionalplanung", Value = "766" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Informations- und Medientechnik ", Value = "767" });
- this.courseList.Add(new ListPickerItemModel() { Text = "World Heritage Studies", Value = "768" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen und Verfahrenstechnik", Value = "770" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Environmental and Resource Management", Value = "771" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Landnutzung und Wasserbewirtschaftung", Value = "772" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Bauen und Erhalten", Value = "773" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen", Value = "774" });
- this.courseList.Add(new ListPickerItemModel() { Text = "eBusiness", Value = "794" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Civil Engineering", Value = "798" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Structural Engineering", Value = "799" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Electrical Power Engineering ", Value = "800" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Euro Hydroinformatics and Water Management", Value = "841" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Technologien Biogener Rohstoffe", Value = "842" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Environmental Technologies", Value = "843" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Process Engineering and Plant Design", Value = "844" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Architekturvermittlung", Value = "845" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Nachwachsende Rohstoffe und Erneuerbare Energien", Value = "851" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Energieträger aus Biomasse und Abfällen", Value = "852" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Power Engineering", Value = "853" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik - Prozess- und Anlagentechnik", Value = "857" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Architektur.Studium.Generale", Value = "858" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Verarbeitungstechnologien der Werkstoffe", Value = "860" });
- this.courseList.Add(new ListPickerItemModel() { Text = "Forensic Sciences and Engineering", Value = "871" });
- this.courseList = this.courseList.OrderBy(o => o.Text).ToList();
- }
-
- ///
- /// Method return a the Index of an item which has a certain value
- ///
- /// list for items
- /// a certain value
- /// return index of value or default(0)
- private int GetIndexOrDefault(List list, string value)
- {
- int index = 0;
- int i = 0;
- foreach (ListPickerItemModel item in list)
- {
- if (item.Value.Equals(value))
- {
- index = i;
- break;
- }
-
- i++;
- }
-
- return index;
- }
#endregion
#endregion
diff --git a/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs b/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs
new file mode 100644
index 00000000..59eac750
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Setting/UserProfilModel.cs
@@ -0,0 +1,258 @@
+//-----------------------------------------------------------------------
+//
+// Company copyright tag.
+//
+// stubbfel
+// 23.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.Model.Setting
+{
+ using System.Xml.Serialization;
+ using CampusAppWP8.Resources;
+
+ ///
+ /// Model for the profile of an user
+ ///
+ [XmlRoot("root")]
+ public class UserProfilModel
+ {
+ #region Members
+
+ ///
+ /// constant for the first validate semester
+ ///
+ private static readonly int FirstSemester = int.Parse(Constants.Valid_FirstSemseter);
+
+ ///
+ /// constant for the last validate semester
+ ///
+ private static readonly int LastSemester = int.Parse(Constants.Valid_LastSemseter);
+
+ ///
+ /// constant for the max. number of a validate course
+ ///
+ private static readonly int MaxCourseNumber = int.Parse(Constants.Valid_MaxCourseNumber);
+
+ ///
+ /// constant for the default value of a semester
+ ///
+ private static readonly int DefaultSemester = int.Parse(Constants.Setting_DefaultSemester);
+
+ ///
+ /// constant for the default value of a courseNumber
+ ///
+ private static readonly int DefaultCourseNumber = int.Parse(Constants.Setting_DefaultCourseNumber);
+
+ ///
+ /// Flag which indicates that any properties has been changed
+ ///
+ private bool changed = false;
+
+ ///
+ /// Gets or Sets the course of the user
+ ///
+ private int course = UserProfilModel.DefaultCourseNumber;
+
+ ///
+ /// Gets or Sets the role of the user
+ ///
+ private RoleType role = RoleType.STUDENT;
+
+ ///
+ /// Gets or Sets the degree of the user
+ ///
+ private DegreeType degree = DegreeType.BACHELOR;
+
+ ///
+ /// Gets or Sets the semester of the user
+ ///
+ private int semester = UserProfilModel.DefaultSemester;
+
+ #endregion
+
+ #region Enums
+ ///
+ /// Specifies the degrees.
+ ///
+ public enum DegreeType
+ {
+ ///
+ /// bachelor degree
+ ///
+ BACHELOR = 82,
+
+ ///
+ /// master degree
+ ///
+ MASTER = 88,
+
+ ///
+ /// diploma degree
+ ///
+ DIPLOM = 11
+ }
+
+ ///
+ /// Specifies the role of the user.
+ ///
+ public enum RoleType
+ {
+ ///
+ /// for students (01).
+ ///
+ STUDENT = 1,
+
+ ///
+ /// for staffs (10).
+ ///
+ STAFF = 2,
+ }
+
+ #endregion
+
+ #region Proberties
+ ///
+ /// Gets or sets the course of the user
+ ///
+ [XmlElement("Course")]
+ public int Course
+ {
+ get
+ {
+ return this.course;
+ }
+
+ set
+ {
+ if (value != this.course && this.ValditateCourse(value))
+ {
+ this.course = value;
+ this.changed = true;
+ }
+ }
+ }
+
+ ///
+ /// Gets or sets the role of the user
+ ///
+ [XmlElement("Role")]
+ public RoleType Role
+ {
+ get
+ {
+ return this.role;
+ }
+
+ set
+ {
+ if (value != this.role)
+ {
+ this.role = value;
+ this.changed = true;
+ }
+ }
+ }
+
+ ///
+ /// Gets or sets the degree of the user
+ ///
+ [XmlElement("Degere")]
+ public DegreeType Degree
+ {
+ get
+ {
+ return this.degree;
+ }
+
+ set
+ {
+ if (value != this.degree)
+ {
+ this.degree = value;
+ this.changed = true;
+ }
+ }
+ }
+
+ ///
+ /// Gets or sets the semester of the user
+ ///
+ [XmlElement("Semseter")]
+ public int Semester
+ {
+ get
+ {
+ return this.semester;
+ }
+
+ set
+ {
+ if (value != this.semester && this.ValditateSemester(value))
+ {
+ this.semester = value;
+ this.changed = true;
+ }
+ }
+ }
+ #endregion
+
+ #region Methods
+
+ #region public
+
+ ///
+ /// Method return the changed flag
+ ///
+ /// if is true, set changed flag to false, otherwise do nothing (bypass)
+ /// return true, if any properties has changed, otherwise false
+ public bool HasChanged(bool reset = true)
+ {
+ bool result = this.changed;
+
+ if (reset)
+ {
+ this.changed = false;
+ }
+
+ return result;
+ }
+
+ #endregion
+
+ #region private
+
+ ///
+ /// Methods check if a value could be a valid semester
+ ///
+ /// value which has to be checked
+ /// true if it is an valid semester, otherwise false
+ private bool ValditateSemester(int possibleSemester)
+ {
+ if (possibleSemester < UserProfilModel.FirstSemester || possibleSemester > UserProfilModel.LastSemester)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ ///
+ /// Methods check if a value could be a valid course
+ ///
+ /// value which has to be checked
+ /// true if it is an valid course, otherwise false
+ private bool ValditateCourse(int possibleCourse)
+ {
+ if (possibleCourse > UserProfilModel.MaxCourseNumber)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListModel.cs
new file mode 100644
index 00000000..4c85b0f8
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Utility/CourseListPickerItemListModel.cs
@@ -0,0 +1,86 @@
+//
+// Company copyright tag.List
+//
+// stubbfel
+// 25.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.Model.Utility
+{
+ using System.Linq;
+
+ ///
+ /// This is a class for the courseList
+ ///
+ public class CourseListPickerItemListModel : ListPickerItemListModel
+ {
+ #region Constructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CourseListPickerItemListModel()
+ : base()
+ {
+ }
+
+ #endregion
+
+ #region Method
+
+ #region private
+
+ ///
+ /// Overrides the LoadList-Method
+ ///
+ protected override void LoadList()
+ {
+ this.AddItem(new ListPickerItemModel("013", "Architektur"));
+ this.AddItem(new ListPickerItemModel("017", "Bauingenieurwesen"));
+ this.AddItem(new ListPickerItemModel("021", "Betriebswirtschaftslehre"));
+ this.AddItem(new ListPickerItemModel("042", "Wirtschaftsrecht für Technologieunternehmen"));
+ this.AddItem(new ListPickerItemModel("048", "Elektrotechnik"));
+ this.AddItem(new ListPickerItemModel("079", "Informatik "));
+ this.AddItem(new ListPickerItemModel("104", "Maschinenbau"));
+ this.AddItem(new ListPickerItemModel("105", "Mathematik"));
+ this.AddItem(new ListPickerItemModel("128", "Physik "));
+ this.AddItem(new ListPickerItemModel("179", "Wirtschaftsingenieurwesen"));
+ this.AddItem(new ListPickerItemModel("184", "Wirtschaftswissenschaften "));
+ this.AddItem(new ListPickerItemModel("215", "Biomedizinische Gerätetechnik "));
+ this.AddItem(new ListPickerItemModel("226", "Verfahrenstechnik"));
+ this.AddItem(new ListPickerItemModel("276", "Wirtschaftsmathematik "));
+ this.AddItem(new ListPickerItemModel("711", "Kultur und Technik "));
+ this.AddItem(new ListPickerItemModel("744", "Physik der Halbleiter-Technologie"));
+ this.AddItem(new ListPickerItemModel("749", "Angewandte Mathematik "));
+ this.AddItem(new ListPickerItemModel("764", "Technologie- und Innovationsmanagement"));
+ this.AddItem(new ListPickerItemModel("766", "Stadt- und Regionalplanung"));
+ this.AddItem(new ListPickerItemModel("767", "Informations- und Medientechnik "));
+ this.AddItem(new ListPickerItemModel("768", "World Heritage Studies"));
+ this.AddItem(new ListPickerItemModel("770", "Umweltingenieurwesen und Verfahrenstechnik"));
+ this.AddItem(new ListPickerItemModel("771", "Environmental and Resource Management"));
+ this.AddItem(new ListPickerItemModel("772", "Landnutzung und Wasserbewirtschaftung"));
+ this.AddItem(new ListPickerItemModel("773", "Bauen und Erhalten"));
+ this.AddItem(new ListPickerItemModel("774", "Umweltingenieurwesen"));
+ this.AddItem(new ListPickerItemModel("794", "eBusiness"));
+ this.AddItem(new ListPickerItemModel("798", "Civil Engineering"));
+ this.AddItem(new ListPickerItemModel("799", "Structural Engineering"));
+ this.AddItem(new ListPickerItemModel("800", "Electrical Power Engineering "));
+ this.AddItem(new ListPickerItemModel("841", "Euro Hydroinformatics and Water Management"));
+ this.AddItem(new ListPickerItemModel("842", "Technologien Biogener Rohstoffe"));
+ this.AddItem(new ListPickerItemModel("843", "Environmental Technologies"));
+ this.AddItem(new ListPickerItemModel("844", "Process Engineering and Plant Design"));
+ this.AddItem(new ListPickerItemModel("845", "Architekturvermittlung"));
+ this.AddItem(new ListPickerItemModel("851", "Nachwachsende Rohstoffe und Erneuerbare Energien"));
+ this.AddItem(new ListPickerItemModel("852", "Energieträger aus Biomasse und Abfällen"));
+ this.AddItem(new ListPickerItemModel("853", "Power Engineering"));
+ this.AddItem(new ListPickerItemModel("857", "Verfahrenstechnik - Prozess- und Anlagentechnik"));
+ this.AddItem(new ListPickerItemModel("858", "Architektur.Studium.Generale"));
+ this.AddItem(new ListPickerItemModel("860", "Verarbeitungstechnologien der Werkstoffe"));
+ this.AddItem(new ListPickerItemModel("871", "Forensic Sciences and Engineering"));
+ this.List = this.List.OrderBy(o => o.Text).ToList();
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/DegreeListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/DegreeListPickerItemListModel.cs
new file mode 100644
index 00000000..19e997bb
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Utility/DegreeListPickerItemListModel.cs
@@ -0,0 +1,46 @@
+//
+// Company copyright tag.List
+//
+// stubbfel
+// 25.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.Model.Utility
+{
+ using CampusAppWP8.Resources;
+
+ ///
+ /// This Class creates a list of degrees
+ ///
+ public class DegreeListPickerItemListModel : ListPickerItemListModel
+ {
+ #region Constructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DegreeListPickerItemListModel()
+ : base()
+ {
+ }
+
+ #endregion
+
+ #region Method
+
+ #region private
+
+ ///
+ /// Overrides the LoadList-Method
+ ///
+ protected override void LoadList()
+ {
+ this.AddItem(new ListPickerItemModel(((int)CampusAppWP8.Model.Setting.UserProfilModel.DegreeType.BACHELOR).ToString(), AppResources.Degree_Bachelor));
+ this.AddItem(new ListPickerItemModel(((int)CampusAppWP8.Model.Setting.UserProfilModel.DegreeType.MASTER).ToString(), AppResources.Degree_Master));
+ this.AddItem(new ListPickerItemModel(((int)CampusAppWP8.Model.Setting.UserProfilModel.DegreeType.DIPLOM).ToString(), AppResources.Degree_Diploma));
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemListModel.cs
new file mode 100644
index 00000000..5cb196fb
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemListModel.cs
@@ -0,0 +1,148 @@
+//-----------------------------------------------------------------------
+//
+// Company copyright tag.List
+//
+// stubbfel
+// 25.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.Model.Utility
+{
+ using System.Collections.Generic;
+
+ ///
+ /// Class for a List of ListPickerItems
+ ///
+ public class ListPickerItemListModel
+ {
+ #region Members
+
+ ///
+ /// reference of the itemList
+ ///
+ private List list;
+
+ #endregion
+
+ #region Constructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ListPickerItemListModel()
+ {
+ this.list = new List();
+ this.LoadList();
+ }
+
+ #endregion
+
+ #region Property
+
+ ///
+ /// Gets or sets the ItemList
+ ///
+ public List List
+ {
+ get
+ {
+ return this.list;
+ }
+
+ set
+ {
+ if (value != this.list)
+ {
+ this.list = value;
+ }
+ }
+ }
+
+ #endregion
+
+ #region Method
+
+ #region public
+
+ ///
+ /// Method return a the Index of an item which has a certain value
+ ///
+ /// a certain value
+ /// return index of value or default(0)
+ public virtual int GetIndexOrDefault(string value)
+ {
+ int index = 0;
+ int i = 0;
+ foreach (ListPickerItemModel item in this.list)
+ {
+ if (item.Value.Equals(value))
+ {
+ index = i;
+ break;
+ }
+
+ i++;
+ }
+
+ return index;
+ }
+
+ ///
+ /// add an new item to the list
+ ///
+ /// value of the item
+ /// text of the item
+ public void AddItem(string value, string text)
+ {
+ this.AddItem(new ListPickerItemModel(value, text));
+ }
+
+ ///
+ /// add an new item to the list
+ ///
+ /// new item of the list
+ public void AddItem(ListPickerItemModel item)
+ {
+ this.list.Add(item);
+ }
+
+ ///
+ /// remove an item
+ ///
+ /// value of the item
+ /// text of the item
+ /// true if removing was successful, otherwise false
+ public bool RemoveItem(string value, string text)
+ {
+ return this.RemoveItem(new ListPickerItemModel(value, text));
+ }
+
+ ///
+ /// remove an item
+ ///
+ /// item which has to be remove
+ /// true if removing was successful, otherwise false
+ public bool RemoveItem(ListPickerItemModel item)
+ {
+ return this.list.Remove(item);
+ }
+
+ #endregion
+
+ #region private
+
+ ///
+ /// Method load an default list
+ ///
+ ///
+ /// load an empty list
+ ///
+ protected virtual void LoadList()
+ {
+ return;
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs
index f5e6cba8..5dceec55 100644
--- a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs
@@ -12,6 +12,24 @@ namespace CampusAppWP8.Model.Utility
///
public class ListPickerItemModel
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ListPickerItemModel()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// string for the value property of an item
+ /// string for the text property of an item
+ public ListPickerItemModel(string value, string text)
+ {
+ this.Value = value;
+ this.Text = text;
+ }
+
///
/// Gets or sets the Value of an Item
///
diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/RoleListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/RoleListPickerItemListModel.cs
new file mode 100644
index 00000000..72aac6b8
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Utility/RoleListPickerItemListModel.cs
@@ -0,0 +1,45 @@
+//
+// Company copyright tag.List
+//
+// stubbfel
+// 25.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.Model.Utility
+{
+ using CampusAppWP8.Resources;
+
+ ///
+ /// Class for the RoleList
+ ///
+ public class RoleListPickerItemListModel : ListPickerItemListModel
+ {
+ #region Constructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RoleListPickerItemListModel()
+ : base()
+ {
+ }
+
+ #endregion
+
+ #region Method
+
+ #region private
+
+ ///
+ /// Overrides the LoadList-Method
+ ///
+ protected override void LoadList()
+ {
+ this.AddItem(new ListPickerItemModel(CampusAppWP8.Model.Setting.UserProfilModel.RoleType.STUDENT.ToString(), AppResources.Setting_RoleStudent));
+ this.AddItem(new ListPickerItemModel(CampusAppWP8.Model.Setting.UserProfilModel.RoleType.STAFF.ToString(), AppResources.Setting_RoleStaff));
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/SemesterListPickerItemListModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/SemesterListPickerItemListModel.cs
new file mode 100644
index 00000000..bd6e2159
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Utility/SemesterListPickerItemListModel.cs
@@ -0,0 +1,46 @@
+//
+// Company copyright tag.List
+//
+// stubbfel
+// 25.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.Model.Utility
+{
+ using CampusAppWP8.Resources;
+
+ ///
+ /// Class for the SemesterList
+ ///
+ public class SemesterListPickerItemListModel : ListPickerItemListModel
+ {
+ #region Constructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public SemesterListPickerItemListModel()
+ : base()
+ {
+ }
+
+ #endregion
+
+ #region Method
+
+ #region private
+
+ ///
+ /// Overrides the LoadList-Method
+ ///
+ protected override void LoadList()
+ {
+ this.AddItem(new ListPickerItemModel("20131", "SoSe 13"));
+ this.AddItem(new ListPickerItemModel("20132", "WiSe 13/14"));
+ this.AddItem(new ListPickerItemModel("20141", "SoSe 14"));
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs b/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs
index ffb56040..e606f082 100644
--- a/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/XmlModel.cs
@@ -38,6 +38,7 @@ namespace CampusAppWP8.Model
public XmlModel(ModelType modelType, string sourceName)
: base(modelType, sourceName)
{
+ this.ValidRootName = Constants.XMLRootElementName;
}
///
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs
index 6d9b5f85..53f8cf73 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs
@@ -101,11 +101,11 @@ namespace CampusAppWP8.Pages.Lecture
///
private void SetupListPickers()
{
- this.Course.ItemsSource = this.pageModel.CourseList;
- this.Degree.ItemsSource = this.pageModel.DegreeList;
- this.From.ItemsSource = this.pageModel.FromNumberList;
- this.To.ItemsSource = this.pageModel.ToNumberList;
- this.Semester.ItemsSource = this.pageModel.SemesterList;
+ this.Course.ItemsSource = this.pageModel.CourseList.List;
+ this.Degree.ItemsSource = this.pageModel.DegreeList.List;
+ this.From.ItemsSource = this.pageModel.FromNumberList.List;
+ this.To.ItemsSource = this.pageModel.ToNumberList.List;
+ this.Semester.ItemsSource = this.pageModel.SemesterList.List;
// load values from last request
LecturePageModel lastPageModel = App.LoadFromIsolatedStorage(Constants.IsolatedStorage_LecturePageModel);
@@ -218,7 +218,7 @@ namespace CampusAppWP8.Pages.Lecture
this.pageModel.SelectDegreeIndex = this.Degree.SelectedIndex;
this.pageModel.LoadFromNumberList();
- this.From.ItemsSource = this.pageModel.FromNumberList;
+ this.From.ItemsSource = this.pageModel.FromNumberList.List;
}
///
@@ -236,7 +236,7 @@ namespace CampusAppWP8.Pages.Lecture
this.pageModel.SelectDegreeIndex = this.Degree.SelectedIndex;
this.pageModel.SelectFromIndex = this.From.SelectedIndex;
this.pageModel.LoadToNumberList();
- this.To.ItemsSource = this.pageModel.ToNumberList;
+ this.To.ItemsSource = this.pageModel.ToNumberList.List;
}
#endregion
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml
new file mode 100644
index 00000000..0db945a9
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs
new file mode 100644
index 00000000..f5ab784a
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml.cs
@@ -0,0 +1,90 @@
+//-----------------------------------------------------------------------
+//
+// Company copyright tag.
+//
+// stubbfel
+// 23.07.2013
+//----------------------------------------------------------------------
+namespace CampusAppWP8.Pages.Setting
+{
+ using System;
+ using System.Windows.Navigation;
+ using CampusAppWP8.File.Setting;
+ using CampusAppWP8.Model.Utility;
+ using CampusAppWP8.Utility;
+ using Microsoft.Phone.Controls;
+
+ ///
+ /// Class for the UserProfilePage
+ ///
+ public partial class UserProfil : PhoneApplicationPage
+ {
+ ///
+ /// Reference of the profileFile
+ ///
+ private UserProfilFile userFile;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UserProfil()
+ {
+ this.InitializeComponent();
+ this.userFile = Settings.UserProfil;
+
+ this.SetupListPickers();
+ }
+
+ ///
+ /// Override the OnNavigatedFrom method
+ ///
+ /// Arguments of navigation
+ protected override void OnNavigatedFrom(NavigationEventArgs e)
+ {
+ if (NavigationMode.Back == e.NavigationMode)
+ {
+ this.SaveProfile();
+ }
+ }
+
+ ///
+ /// Method sets the ItemSource of the ListPickers
+ ///
+ private void SetupListPickers()
+ {
+ CourseListPickerItemListModel courseList = new CourseListPickerItemListModel();
+ DegreeListPickerItemListModel degreeList = new DegreeListPickerItemListModel();
+ SemesterListPickerItemListModel semesterList = new SemesterListPickerItemListModel();
+ RoleListPickerItemListModel roleList = new RoleListPickerItemListModel();
+
+ this.Course.ItemsSource = courseList.List;
+ this.Degree.ItemsSource = degreeList.List;
+ this.Semster.ItemsSource = semesterList.List;
+ this.Role.ItemsSource = roleList.List;
+
+ this.Course.SelectedIndex = courseList.GetIndexOrDefault(this.userFile.Model.Course.ToString().PadLeft(3, '0'));
+ this.Degree.SelectedIndex = degreeList.GetIndexOrDefault(((int)this.userFile.Model.Degree).ToString());
+ this.Semster.SelectedIndex = semesterList.GetIndexOrDefault(this.userFile.Model.Semester.ToString());
+ this.Role.SelectedIndex = roleList.GetIndexOrDefault(this.userFile.Model.Role.ToString());
+ }
+
+ ///
+ /// Method save the current profile
+ ///
+ private void SaveProfile()
+ {
+ try
+ {
+ this.userFile.Model.Course = int.Parse(((ListPickerItemModel)this.Course.SelectedItem).Value);
+ this.userFile.Model.Degree = (CampusAppWP8.Model.Setting.UserProfilModel.DegreeType)Enum.Parse(typeof(CampusAppWP8.Model.Setting.UserProfilModel.DegreeType), ((ListPickerItemModel)this.Degree.SelectedItem).Value);
+ this.userFile.Model.Semester = int.Parse(((ListPickerItemModel)this.Semster.SelectedItem).Value);
+ this.userFile.Model.Role = (CampusAppWP8.Model.Setting.UserProfilModel.RoleType)Enum.Parse(typeof(CampusAppWP8.Model.Setting.UserProfilModel.RoleType), ((ListPickerItemModel)this.Role.SelectedItem).Value);
+ this.userFile.SaveData();
+ }
+ catch (Exception e)
+ {
+ Logger.LogException(e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml
index 42dc15ff..22cd2213 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml
@@ -137,5 +137,11 @@
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs
index eaa6d530..c6f84e3c 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs
@@ -13,6 +13,7 @@ namespace CampusAppWP8.Pages
using System.Windows.Navigation;
using CampusAppWP8.Resources;
using Microsoft.Phone.Controls;
+ using Microsoft.Phone.Shell;
///
/// Class for the StartPage
@@ -25,6 +26,11 @@ namespace CampusAppWP8.Pages
public StartPage()
{
this.InitializeComponent();
+ ApplicationBarMenuItem menuItem1 = ApplicationBar.MenuItems[0] as ApplicationBarMenuItem;
+ if (menuItem1 != null)
+ {
+ menuItem1.Text = AppResources.Setting_UserProfilAppBarTitle;
+ }
}
///
@@ -74,10 +80,22 @@ namespace CampusAppWP8.Pages
}
}
- private void OpenDepartmentApp(object sender, RoutedEventArgs e)
+ private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
{
- Uri url = new Uri(Constants.PathDepartment_DepartmentIndexPage, UriKind.Relative);
+ Uri url = new Uri(Constants.PathSetting_User, UriKind.Relative);
NavigationService.Navigate(url);
}
+
+ private void ApplicationBar_StateChanged(object sender, ApplicationBarStateChangedEventArgs e)
+ {
+ if (e.IsMenuVisible)
+ {
+ ApplicationBar.Opacity = 0.99;
+ }
+ else
+ {
+ ApplicationBar.Opacity = 0.5;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
index a51dd3a1..9e14041b 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
@@ -573,6 +573,78 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Mitarbeiter ähnelt.
+ ///
+ public static string Setting_RoleStaff {
+ get {
+ return ResourceManager.GetString("Setting_RoleStaff", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Student ähnelt.
+ ///
+ public static string Setting_RoleStudent {
+ get {
+ return ResourceManager.GetString("Setting_RoleStudent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Profileinstellungen ähnelt.
+ ///
+ public static string Setting_User {
+ get {
+ return ResourceManager.GetString("Setting_User", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
+ ///
+ public static string Setting_UserCourse {
+ get {
+ return ResourceManager.GetString("Setting_UserCourse", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Abschluss ähnelt.
+ ///
+ public static string Setting_UserDegree {
+ get {
+ return ResourceManager.GetString("Setting_UserDegree", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Profileinstellungen ähnelt.
+ ///
+ public static string Setting_UserProfilAppBarTitle {
+ get {
+ return ResourceManager.GetString("Setting_UserProfilAppBarTitle", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Rolle ähnelt.
+ ///
+ public static string Setting_UserRole {
+ get {
+ return ResourceManager.GetString("Setting_UserRole", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Semster ähnelt.
+ ///
+ public static string Setting_UserSemester {
+ get {
+ return ResourceManager.GetString("Setting_UserSemester", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Freitag ähnelt.
///
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
index 1272c78b..350cd768 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
@@ -320,4 +320,28 @@
Aktualisieren
+
+ Profileinstellungen
+
+
+ Studiengang
+
+
+ Abschluss
+
+
+ Profileinstellungen
+
+
+ Rolle
+
+
+ Semster
+
+
+ Mitarbeiter
+
+
+ Student
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs
index 03c0063d..479a1426 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs
@@ -132,6 +132,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die user.xml ähnelt.
+ ///
+ public static string FileProfil_User {
+ get {
+ return ResourceManager.GetString("FileProfil_User", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die StudentCouncils.xml ähnelt.
///
@@ -438,6 +447,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die /Pages/Setting/UserProfil.xaml ähnelt.
+ ///
+ public static string PathSetting_User {
+ get {
+ return ResourceManager.GetString("PathSetting_User", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/StudentCouncil/StudentCouncilPage.xaml ähnelt.
///
@@ -447,6 +465,24 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die 767 ähnelt.
+ ///
+ public static string Setting_DefaultCourseNumber {
+ get {
+ return ResourceManager.GetString("Setting_DefaultCourseNumber", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die 20131 ähnelt.
+ ///
+ public static string Setting_DefaultSemester {
+ get {
+ return ResourceManager.GetString("Setting_DefaultSemester", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die ToggleContent ähnelt.
///
@@ -555,6 +591,33 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die 20121 ähnelt.
+ ///
+ public static string Valid_FirstSemseter {
+ get {
+ return ResourceManager.GetString("Valid_FirstSemseter", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die 20502 ähnelt.
+ ///
+ public static string Valid_LastSemseter {
+ get {
+ return ResourceManager.GetString("Valid_LastSemseter", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die 999 ähnelt.
+ ///
+ public static string Valid_MaxCourseNumber {
+ get {
+ return ResourceManager.GetString("Valid_MaxCourseNumber", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die root ähnelt.
///
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
index af5239ef..ba9aa34f 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
@@ -284,5 +284,26 @@
IsolatedStorage_OpeninghoursModel
+
+
+ user.xml
+
+
+ /Pages/Setting/UserProfil.xaml
+
+
+ 767
+
+
+ 20131
+
+
+ 20121
+
+
+ 20502
+
+
+ 999
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Settings.cs b/CampusAppWP8/CampusAppWP8/Settings.cs
new file mode 100644
index 00000000..efb0f5b6
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Settings.cs
@@ -0,0 +1,42 @@
+//-----------------------------------------------------------------------
+//
+// Company copyright tag.
+//
+// stubbfel
+// 23.07.2013
+//----------------------------------------------------------------------
+
+namespace CampusAppWP8
+{
+ using CampusAppWP8.File.Setting;
+
+ ///
+ /// Class handle all setting (files)
+ ///
+ public static class Settings
+ {
+ ///
+ /// reference of the user-profile-file
+ ///
+ private static UserProfilFile userProfil = new UserProfilFile();
+
+ ///
+ /// Gets or sets the user-profile-file
+ ///
+ public static UserProfilFile UserProfil
+ {
+ get
+ {
+ return Settings.userProfil;
+ }
+
+ set
+ {
+ if (value != Settings.userProfil)
+ {
+ Settings.userProfil = value;
+ }
+ }
+ }
+ }
+}