Merge branch 'release/r#146' into develmaster
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
using CampusAppWP8.File.Setting;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO.IsolatedStorage;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Navigation;
|
||||
using Windows.Devices.Geolocation;
|
||||
|
||||
|
||||
namespace CampusAppWP8
|
||||
@@ -143,18 +140,7 @@ namespace CampusAppWP8
|
||||
/// </summary>
|
||||
private void LoadSettings()
|
||||
{
|
||||
UserProfilFile userFile;
|
||||
userFile = Settings.UserProfil;
|
||||
if (userFile.Model == null)
|
||||
{
|
||||
userFile.onLoaded += new UserProfilFile.OnLoaded(this.UserSettingsLoaded);
|
||||
userFile.LoadData();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.UserSettingsLoaded();
|
||||
}
|
||||
|
||||
this.UserSettingsLoaded();
|
||||
Thread thread = new Thread(new ThreadStart(Utilities.DetermineAndStoreCurrentPosition));
|
||||
thread.Start();
|
||||
}
|
||||
@@ -164,9 +150,9 @@ namespace CampusAppWP8
|
||||
/// </summary>
|
||||
private void UserSettingsLoaded()
|
||||
{
|
||||
if (Settings.UserProfil.Model == null)
|
||||
if (Settings.UserProfil == null)
|
||||
{
|
||||
Settings.UserProfil.Model = new UserProfilModel();
|
||||
Settings.UserProfil = new UserProfilModel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +161,7 @@ namespace CampusAppWP8
|
||||
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)
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
</Compile>
|
||||
<Compile Include="Feed\Departments\DepartmentFavoriteFeed.cs" />
|
||||
<Compile Include="Const.cs" />
|
||||
<Compile Include="File\Setting\UserProfilFile.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceModel.cs" />
|
||||
<Compile Include="Model\GeoDb\SpsModel.cs" />
|
||||
<Compile Include="Model\Mensa\MealModel.cs" />
|
||||
@@ -108,6 +107,7 @@
|
||||
<Compile Include="Model\Utility\CourseListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\DegreeListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\CleanUrlParamModel.cs" />
|
||||
<Compile Include="Model\Utility\CampusListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\RoleListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\SemesterListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemListModel.cs" />
|
||||
@@ -445,7 +445,9 @@
|
||||
<HintPath>..\packages\SharpZipLib-WP7.0.86.0.518\lib\sl4-windowsphone71\SharpZipLib.WindowsPhone7.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Folder Include="File\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="UserProfilFile.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>23.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.File.Setting
|
||||
{
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Class for handle the user-profile-file
|
||||
/// </summary>
|
||||
public class UserProfilFile : XmlModel<UserProfilModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserProfilFile" /> class.
|
||||
/// </summary>
|
||||
public UserProfilFile()
|
||||
: base(ModelType.File, Constants.FileProfil_User)
|
||||
{
|
||||
this.isFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
|
||||
this.isFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);
|
||||
}
|
||||
|
||||
// Constructor
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDateOnLoad(UserProfilModel model, FileInfo info)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDateOnSave(UserProfilModel model, FileInfo info)
|
||||
{
|
||||
if (model != null && !model.HasChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -256,7 +256,7 @@ namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
this.LoadFromNumberList();
|
||||
this.LoadToNumberList();
|
||||
UserProfilModel userModel = Settings.UserProfil.Model;
|
||||
UserProfilModel userModel = Settings.UserProfil;
|
||||
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());
|
||||
|
||||
@@ -33,41 +33,6 @@ namespace CampusAppWP8.Model.Setting
|
||||
/// </summary>
|
||||
private static readonly int MaxCourseNumber = int.Parse(Constants.Valid_MaxCourseNumber);
|
||||
|
||||
/// <summary>
|
||||
/// constant for the default value of a semester
|
||||
/// </summary>
|
||||
private static readonly int DefaultSemester = int.Parse(Constants.Setting_DefaultSemester);
|
||||
|
||||
/// <summary>
|
||||
/// constant for the default value of a courseNumber
|
||||
/// </summary>
|
||||
private static readonly int DefaultCourseNumber = int.Parse(Constants.Setting_DefaultCourseNumber);
|
||||
|
||||
/// <summary>
|
||||
/// Flag which indicates that any properties has been changed
|
||||
/// </summary>
|
||||
private bool changed = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the course of the user
|
||||
/// </summary>
|
||||
private int course = UserProfilModel.DefaultCourseNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the role of the user
|
||||
/// </summary>
|
||||
private RoleType role = RoleType.STUDENT;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the degree of the user
|
||||
/// </summary>
|
||||
private DegreeType degree = DegreeType.BACHELOR;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the semester of the user
|
||||
/// </summary>
|
||||
private int semester = UserProfilModel.DefaultSemester;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Enums
|
||||
@@ -108,89 +73,119 @@ namespace CampusAppWP8.Model.Setting
|
||||
STAFF = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the campus of the user.
|
||||
/// </summary>
|
||||
public enum Campus
|
||||
{
|
||||
/// <summary>
|
||||
/// Cottbus -> MainCampus
|
||||
/// </summary>
|
||||
CB_MAIN = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Cottbus -> NorthCampus
|
||||
/// </summary>
|
||||
CB_NORTH = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Cottbus -> SouthCampus
|
||||
/// </summary>
|
||||
CB_SOUTH = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Senftenberg -> MainCampus
|
||||
/// </summary>
|
||||
SFB_MAIN = 3
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the course of the user
|
||||
/// </summary>
|
||||
[XmlElement("Course")]
|
||||
public int Course
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.course;
|
||||
return App.LoadFromAppState<int>(Constants.UserSettings_Course);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.course && this.ValditateCourse(value))
|
||||
if (this.ValditateCourse(value))
|
||||
{
|
||||
this.course = value;
|
||||
this.changed = true;
|
||||
App.SaveToAppState<int>(Constants.UserSettings_Course, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the defaultCampus of the user
|
||||
/// </summary>
|
||||
public Campus DefaultCampus
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<Campus>(Constants.UserSettings_DefaultCampus);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<Campus>(Constants.UserSettings_DefaultCampus, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the role of the user
|
||||
/// </summary>
|
||||
[XmlElement("Role")]
|
||||
public RoleType Role
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.role;
|
||||
return App.LoadFromAppState<RoleType>(Constants.UserSettings_Role);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.role)
|
||||
{
|
||||
this.role = value;
|
||||
this.changed = true;
|
||||
}
|
||||
App.SaveToAppState<RoleType>(Constants.UserSettings_Role, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the degree of the user
|
||||
/// </summary>
|
||||
[XmlElement("Degere")]
|
||||
public DegreeType Degree
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.degree;
|
||||
return App.LoadFromAppState<DegreeType>(Constants.UserSettings_Degree);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.degree)
|
||||
{
|
||||
this.degree = value;
|
||||
this.changed = true;
|
||||
}
|
||||
App.SaveToAppState<DegreeType>(Constants.UserSettings_Degree, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the semester of the user
|
||||
/// </summary>
|
||||
[XmlElement("Semseter")]
|
||||
public int Semester
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.semester;
|
||||
return App.LoadFromAppState<int>(Constants.UserSettings_Semester);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.semester && this.ValditateSemester(value))
|
||||
if (this.ValditateSemester(value))
|
||||
{
|
||||
this.semester = value;
|
||||
this.changed = true;
|
||||
App.SaveToAppState<int>(Constants.UserSettings_Semester, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,27 +193,6 @@ namespace CampusAppWP8.Model.Setting
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method return the changed flag
|
||||
/// </summary>
|
||||
/// <param name="reset"> if is true, set changed flag to false, otherwise do nothing (bypass)</param>
|
||||
/// <returns>return true, if any properties has changed, otherwise false</returns>
|
||||
public bool HasChanged(bool reset = true)
|
||||
{
|
||||
bool result = this.changed;
|
||||
|
||||
if (reset)
|
||||
{
|
||||
this.changed = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
// <copyright file="CampusListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.List
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>08.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class creates a list of degrees
|
||||
/// </summary>
|
||||
public class CampusListPickerItemListModel : ListPickerItemListModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DegreeListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
public CampusListPickerItemListModel()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the LoadList-Method <see cref="ListPickerItemListModel"/>
|
||||
/// </summary>
|
||||
protected override void LoadList()
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN).ToString(), AppResources.Campus_CBMain));
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_NORTH).ToString(), AppResources.Campus_CBNorth));
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_SOUTH).ToString(), AppResources.Campus_CBSouth));
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.SFB_MAIN).ToString(), AppResources.Campus_SFBMain));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,7 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -108,6 +109,28 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="3">
|
||||
<StackPanel >
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_UserCampus, Source={StaticResource LocalizedStrings}}"/>
|
||||
<!-- Listpicket of courses -->
|
||||
<toolkit:ListPicker Name="Campus" ExpansionMode="FullScreenOnly" FullModeHeader="{Binding Path=LocalizedResources.ListPickerHeaderCampus, Source={StaticResource LocalizedStrings}}" >
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<TextBlock Text="{Binding Text}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="4">
|
||||
<StackPanel >
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_UserRole, Source={StaticResource LocalizedStrings}}"/>
|
||||
<!-- Listpicket of courses -->
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.File.Setting;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the UserProfilePage
|
||||
@@ -22,7 +22,7 @@ namespace CampusAppWP8.Pages.Setting
|
||||
/// <summary>
|
||||
/// Reference of the profileFile
|
||||
/// </summary>
|
||||
private UserProfilFile userFile;
|
||||
private UserProfilModel userProfil;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserProfil" /> class.
|
||||
@@ -30,7 +30,7 @@ namespace CampusAppWP8.Pages.Setting
|
||||
public UserProfil()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.userFile = Settings.UserProfil;
|
||||
this.userProfil = Settings.UserProfil;
|
||||
|
||||
this.SetupListPickers();
|
||||
}
|
||||
@@ -56,16 +56,19 @@ namespace CampusAppWP8.Pages.Setting
|
||||
DegreeListPickerItemListModel degreeList = new DegreeListPickerItemListModel();
|
||||
SemesterListPickerItemListModel semesterList = new SemesterListPickerItemListModel();
|
||||
RoleListPickerItemListModel roleList = new RoleListPickerItemListModel();
|
||||
CampusListPickerItemListModel campusList = new CampusListPickerItemListModel();
|
||||
|
||||
this.Course.ItemsSource = courseList.List;
|
||||
this.Degree.ItemsSource = degreeList.List;
|
||||
this.Semster.ItemsSource = semesterList.List;
|
||||
this.Role.ItemsSource = roleList.List;
|
||||
this.Campus.ItemsSource = campusList.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());
|
||||
this.Course.SelectedIndex = courseList.GetIndexOrDefault(this.userProfil.Course.ToString().PadLeft(3, '0'));
|
||||
this.Degree.SelectedIndex = degreeList.GetIndexOrDefault(((int)this.userProfil.Degree).ToString());
|
||||
this.Semster.SelectedIndex = semesterList.GetIndexOrDefault(this.userProfil.Semester.ToString());
|
||||
this.Role.SelectedIndex = roleList.GetIndexOrDefault(this.userProfil.Role.ToString());
|
||||
this.Campus.SelectedIndex = campusList.GetIndexOrDefault(((int)this.userProfil.DefaultCampus).ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -75,11 +78,11 @@ namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
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();
|
||||
this.userProfil.Course = int.Parse(((ListPickerItemModel)this.Course.SelectedItem).Value);
|
||||
this.userProfil.Degree = (CampusAppWP8.Model.Setting.UserProfilModel.DegreeType)Enum.Parse(typeof(CampusAppWP8.Model.Setting.UserProfilModel.DegreeType), ((ListPickerItemModel)this.Degree.SelectedItem).Value);
|
||||
this.userProfil.Semester = int.Parse(((ListPickerItemModel)this.Semster.SelectedItem).Value);
|
||||
this.userProfil.Role = (CampusAppWP8.Model.Setting.UserProfilModel.RoleType)Enum.Parse(typeof(CampusAppWP8.Model.Setting.UserProfilModel.RoleType), ((ListPickerItemModel)this.Role.SelectedItem).Value);
|
||||
this.userProfil.DefaultCampus = (CampusAppWP8.Model.Setting.UserProfilModel.Campus)Enum.Parse(typeof(CampusAppWP8.Model.Setting.UserProfilModel.Campus), ((ListPickerItemModel)this.Campus.SelectedItem).Value);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CampusAppWP8.Pages
|
||||
menuItem1.Text = AppResources.Setting_UserProfilAppBarTitle;
|
||||
}
|
||||
|
||||
if (Settings.AppSetting.InitApp)
|
||||
if (!Settings.AppSetting.InitApp)
|
||||
{
|
||||
this.ShowOptIns();
|
||||
Settings.AppSetting.InitApp = true;
|
||||
|
||||
@@ -105,6 +105,42 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Cottbus Hauptcampus ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus_CBMain {
|
||||
get {
|
||||
return ResourceManager.GetString("Campus_CBMain", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Cottbus Nordcampus ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus_CBNorth {
|
||||
get {
|
||||
return ResourceManager.GetString("Campus_CBNorth", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Cottbus Südcampus ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus_CBSouth {
|
||||
get {
|
||||
return ResourceManager.GetString("Campus_CBSouth", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Senftenberg Hauptcampus ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus_SFBMain {
|
||||
get {
|
||||
return ResourceManager.GetString("Campus_SFBMain", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt.
|
||||
/// </summary>
|
||||
@@ -214,7 +250,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Dürfen Positionsdaten enhober und verwendet werdet? ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Dürfen Positionsdaten enhoben und verwendet werden? ähnelt.
|
||||
/// </summary>
|
||||
public static string GeoWatch_OptInText {
|
||||
get {
|
||||
@@ -393,6 +429,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Campusauswahl ähnelt.
|
||||
/// </summary>
|
||||
public static string ListPickerHeaderCampus {
|
||||
get {
|
||||
return ResourceManager.GetString("ListPickerHeaderCampus", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Studiengangsauswahl ähnelt.
|
||||
/// </summary>
|
||||
@@ -663,6 +708,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Campus ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_UserCampus {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_UserCampus", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
|
||||
/// </summary>
|
||||
@@ -700,7 +754,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Semster ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Semester ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_UserSemester {
|
||||
get {
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
<value>Rolle</value>
|
||||
</data>
|
||||
<data name="Setting_UserSemester" xml:space="preserve">
|
||||
<value>Semster</value>
|
||||
<value>Semester</value>
|
||||
</data>
|
||||
<data name="Setting_RoleStaff" xml:space="preserve">
|
||||
<value>Mitarbeiter</value>
|
||||
@@ -363,6 +363,24 @@
|
||||
<value>Ortung</value>
|
||||
</data>
|
||||
<data name="GeoWatch_OptInText" xml:space="preserve">
|
||||
<value>Dürfen Positionsdaten enhober und verwendet werdet?</value>
|
||||
<value>Dürfen Positionsdaten enhoben und verwendet werden?</value>
|
||||
</data>
|
||||
<data name="Campus_CBMain" xml:space="preserve">
|
||||
<value>Cottbus Hauptcampus</value>
|
||||
</data>
|
||||
<data name="Campus_CBNorth" xml:space="preserve">
|
||||
<value>Cottbus Nordcampus</value>
|
||||
</data>
|
||||
<data name="Campus_CBSouth" xml:space="preserve">
|
||||
<value>Cottbus Südcampus</value>
|
||||
</data>
|
||||
<data name="Campus_SFBMain" xml:space="preserve">
|
||||
<value>Senftenberg Hauptcampus</value>
|
||||
</data>
|
||||
<data name="ListPickerHeaderCampus" xml:space="preserve">
|
||||
<value>Campusauswahl</value>
|
||||
</data>
|
||||
<data name="Setting_UserCampus" xml:space="preserve">
|
||||
<value>Campus</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -726,6 +726,51 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die UserSettings.Course ähnelt.
|
||||
/// </summary>
|
||||
public static string UserSettings_Course {
|
||||
get {
|
||||
return ResourceManager.GetString("UserSettings_Course", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die UserSettings.DefaultCampus ähnelt.
|
||||
/// </summary>
|
||||
public static string UserSettings_DefaultCampus {
|
||||
get {
|
||||
return ResourceManager.GetString("UserSettings_DefaultCampus", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die UserSettings.Degree ähnelt.
|
||||
/// </summary>
|
||||
public static string UserSettings_Degree {
|
||||
get {
|
||||
return ResourceManager.GetString("UserSettings_Degree", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die UserSettings.Role ähnelt.
|
||||
/// </summary>
|
||||
public static string UserSettings_Role {
|
||||
get {
|
||||
return ResourceManager.GetString("UserSettings_Role", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die UserSettings.Semester ähnelt.
|
||||
/// </summary>
|
||||
public static string UserSettings_Semester {
|
||||
get {
|
||||
return ResourceManager.GetString("UserSettings_Semester", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 20121 ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -351,4 +351,19 @@
|
||||
<data name="UrlSpsService" xml:space="preserve">
|
||||
<value>http://141.43.76.140/service/sps</value>
|
||||
</data>
|
||||
<data name="UserSettings_Course" xml:space="preserve">
|
||||
<value>UserSettings.Course</value>
|
||||
</data>
|
||||
<data name="UserSettings_Degree" xml:space="preserve">
|
||||
<value>UserSettings.Degree</value>
|
||||
</data>
|
||||
<data name="UserSettings_Role" xml:space="preserve">
|
||||
<value>UserSettings.Role</value>
|
||||
</data>
|
||||
<data name="UserSettings_Semester" xml:space="preserve">
|
||||
<value>UserSettings.Semester</value>
|
||||
</data>
|
||||
<data name="UserSettings_DefaultCampus" xml:space="preserve">
|
||||
<value>UserSettings.DefaultCampus</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
namespace CampusAppWP8
|
||||
{
|
||||
using CampusAppWP8.File.Setting;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
|
||||
/// <summary>
|
||||
@@ -19,7 +18,7 @@ namespace CampusAppWP8
|
||||
/// <summary>
|
||||
/// reference of the user-profile-file
|
||||
/// </summary>
|
||||
private static UserProfilFile userProfil = new UserProfilFile();
|
||||
private static UserProfilModel userProfil = new UserProfilModel();
|
||||
|
||||
/// <summary>
|
||||
/// reference of the appSettings
|
||||
@@ -29,7 +28,7 @@ namespace CampusAppWP8
|
||||
/// <summary>
|
||||
/// Gets or sets the user-profile-file
|
||||
/// </summary>
|
||||
public static UserProfilFile UserProfil
|
||||
public static UserProfilModel UserProfil
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user