Merge branch 'release/#r' into develmaster
@@ -12,11 +12,12 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Styles/ListButton.xaml"/>
|
||||
<ResourceDictionary Source="Styles/StartPageStyles.xaml"/>
|
||||
<ResourceDictionary Source="Styles/Labels.xaml"/>
|
||||
<ResourceDictionary Source="Styles/UniColors.xaml"/>
|
||||
<ResourceDictionary>
|
||||
<local:LocalizedStrings xmlns:local="clr-namespace:CampusAppWP8" x:Key="LocalizedStrings"/>
|
||||
<local:ThemelizedIcons xmlns:local="clr-namespace:CampusAppWP8" x:Key="ThemelizedIcons"/>
|
||||
<local:Const xmlns:local="clr-namespace:CampusAppWP8" x:Key="Const"/>
|
||||
<local:BoolToVisibilityConverter xmlns:local="clr-namespace:CampusAppWP8.Utility" x:Key="BoolToVisibilityConverter"/>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.IO.IsolatedStorage;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
|
||||
@@ -157,19 +158,32 @@ namespace CampusAppWP8
|
||||
Settings.AppSetting.InitApp = false;
|
||||
}
|
||||
|
||||
Color appColor = ((SolidColorBrush)App.Current.Resources["PhoneAccentBrush"]).Color;
|
||||
if (!Settings.AppSetting.DisplaySetting.PhoneAccentColor.Equals(appColor))
|
||||
{
|
||||
if (Settings.AppSetting.DisplaySetting.AppAccentColor.Equals(Settings.AppSetting.DisplaySetting.PhoneAccentColor))
|
||||
{
|
||||
Settings.AppSetting.DisplaySetting.AppAccentColor = appColor;
|
||||
}
|
||||
Settings.AppSetting.DisplaySetting.PhoneAccentColor = appColor;
|
||||
}
|
||||
|
||||
appColor = Settings.AppSetting.DisplaySetting.AppAccentColor;
|
||||
Utilities.SwitchAccentColor(appColor);
|
||||
|
||||
this.UserSettingsLoaded();
|
||||
|
||||
Settings.AppSetting.UniNetwork = Utilities.IsUniNetworkAvailable();
|
||||
if (!Settings.AppSetting.UniNetwork)
|
||||
Settings.AppSetting.NetworkSetting.UniNetwork = Utilities.IsUniNetworkAvailable();
|
||||
if (!Settings.AppSetting.NetworkSetting.UniNetwork)
|
||||
{
|
||||
Settings.AppSetting.WifiEnable = Utilities.IsWifiAvailable();
|
||||
Settings.AppSetting.NetworkSetting.WifiEnable = Utilities.IsWifiAvailable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.AppSetting.WifiEnable = true;
|
||||
Settings.AppSetting.NetworkSetting.WifiEnable = true;
|
||||
}
|
||||
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
|
||||
if (Settings.AppSetting.LocatingSetting.GeoWatchEnable)
|
||||
{
|
||||
Thread thread = new Thread(new ThreadStart(this.PositionThread));
|
||||
thread.Start();
|
||||
|
||||
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/cancel_159.png
Normal file
|
After Width: | Height: | Size: 913 B |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/prefs2_159.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/reset_159.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/showDay_159.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/zoomin_159.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/zoomout_159.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/cancel_159.png
Normal file
|
After Width: | Height: | Size: 890 B |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/edit_159.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/prefs2_159.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/reset_159.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 982 B |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/zoomin_159.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
@@ -133,10 +133,25 @@
|
||||
<Compile Include="Model\Person\PersonWp8Model.cs" />
|
||||
<Compile Include="Model\Setting\AppSettings.cs" />
|
||||
<Compile Include="Model\Setting\BTUTagHandlerTypes.cs" />
|
||||
<Compile Include="Model\Setting\BTUTagSetting.cs" />
|
||||
<Compile Include="Model\Setting\DisplaySetting.cs" />
|
||||
<Compile Include="Model\Setting\FunctionSettings.cs" />
|
||||
<Compile Include="Model\Setting\ISetting.cs" />
|
||||
<Compile Include="Model\Setting\LocatingSetting.cs" />
|
||||
<Compile Include="Model\Setting\NetworkSetting.cs" />
|
||||
<Compile Include="Model\Setting\SettingsTypes.cs" />
|
||||
<Compile Include="Model\Setting\TagHandlerListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Setting\TimeTableSetting.cs" />
|
||||
<Compile Include="Model\Setting\UserProfilModel.cs" />
|
||||
<Compile Include="Model\TimeTable\AppointmentListModel.cs" />
|
||||
<Compile Include="Model\TimeTable\AppointmentModel.cs" />
|
||||
<Compile Include="Model\Utility\AppAccentColorListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\ColorListPickerItemModel.cs" />
|
||||
<Compile Include="Pages\Setting\FunctionSettingPage.xaml.cs">
|
||||
<DependentUpon>FunctionSettingPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Setting\IRefreshingPage.cs" />
|
||||
<Compile Include="Model\Setting\MensaSetting.cs" />
|
||||
<Compile Include="Pages\TimeTable\Appointment.xaml.cs">
|
||||
<DependentUpon>Appointment.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -155,7 +170,9 @@
|
||||
<DependentUpon>TimeTableWeek.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\TimeTable\WeekViewPageItem.cs" />
|
||||
<Compile Include="Utility\DoubleNaNConverter.cs" />
|
||||
<Compile Include="Utility\Converter\DoubleNaNConverter.cs" />
|
||||
<Compile Include="Utility\Converter\RoomToStringConverter.cs" />
|
||||
<Compile Include="Utility\Converter\FrameworkElementToRectConverter.cs" />
|
||||
<Compile Include="Utility\ICalObject.cs" />
|
||||
<Compile Include="Utility\ICSClasses.cs" />
|
||||
<Compile Include="Utility\ICSManager.cs" />
|
||||
@@ -239,13 +256,15 @@
|
||||
</Compile>
|
||||
<Compile Include="Utility\AppUriMapper.cs" />
|
||||
<Compile Include="Utility\BackgroundTasks.cs" />
|
||||
<Compile Include="Utility\BoolToVisibilityConverter.cs" />
|
||||
<Compile Include="Utility\Converter\BoolToVisibilityConverter.cs" />
|
||||
<Compile Include="Utility\FrameworkAnimator.cs" />
|
||||
<Compile Include="Utility\IdToPlaceConverter.cs" />
|
||||
<Compile Include="Utility\Converter\IdToPlaceConverter.cs" />
|
||||
<Compile Include="Utility\ListFiller.cs" />
|
||||
<Compile Include="Utility\Lui\Button\AddButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\AddPersonButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\DelButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\ResetSettingButtonAppBar.cs" />
|
||||
<Compile Include="Utility\Lui\Button\ToDefaultButton.cs" />
|
||||
<Compile Include="Utility\Lui\Header\DefaultHeader.xaml.cs">
|
||||
<DependentUpon>DefaultHeader.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -266,7 +285,7 @@
|
||||
<DependentUpon>WeekViewDay.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Lui\Tiles\TileCreator.cs" />
|
||||
<Compile Include="Utility\MealIdToPriceConverter.cs" />
|
||||
<Compile Include="Utility\Converter\MealIdToPriceConverter.cs" />
|
||||
<Compile Include="Utility\NDEF\BTUTagMessage.cs" />
|
||||
<Compile Include="Pages\Dev\NFC.xaml.cs">
|
||||
<DependentUpon>NFC.xaml</DependentUpon>
|
||||
@@ -482,6 +501,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Setting\FunctionSettingPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Setting\Impressum.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -522,6 +545,14 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\UniColors.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\Labels.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\StartPageStyles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -572,20 +603,36 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Background.jpg" />
|
||||
<Content Include="Assets\Icons\DarkTheme\cancel_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\edit_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\events_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\lectures_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\lehrstuehle_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\mensaplan_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\pos_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\prefs2_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\reset_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\showDay_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\showWeek_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\speaker_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\stundenplan_add_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\zoomin_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\zoomout_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\cancel_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\edit_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\events_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\lectures_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\lehrstuehle_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\mensaplan_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\pos_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\prefs2_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\reset_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\showDay_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\showWeek_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\speaker_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\stundenplan_add_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\zoomin_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\zoomout_159.png" />
|
||||
<Content Include="Assets\Maps\campusmap.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\add_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\add_contact_159.png" />
|
||||
|
||||
@@ -8,26 +8,99 @@
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
using CampusAppWP8.Pages.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary> Model for settings of the app. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class AppSettings
|
||||
public class AppSettings : ISetting
|
||||
{
|
||||
#region member
|
||||
|
||||
/// <summary> The mensa setting. </summary>
|
||||
private static FunctionSettings functionSetting = new FunctionSettings();
|
||||
|
||||
/// <summary> The network setting. </summary>
|
||||
private static NetworkSetting networkSetting = new NetworkSetting();
|
||||
|
||||
/// <summary> The locating setting. </summary>
|
||||
private static LocatingSetting locatingSetting = new LocatingSetting();
|
||||
|
||||
private static DisplaySetting displaySetting = new DisplaySetting();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the GeoWatch-Flag. </summary>
|
||||
/// <value> true if geo watch enable, false if not. </value>
|
||||
public bool GeoWatchEnable
|
||||
/// <summary> Gets or sets the display setting. </summary>
|
||||
/// <value> The display setting. </value>
|
||||
public DisplaySetting DisplaySetting
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_GeoWatchEnable);
|
||||
return AppSettings.displaySetting;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_GeoWatchEnable, value);
|
||||
if (AppSettings.displaySetting != value)
|
||||
{
|
||||
AppSettings.displaySetting = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the locating setting. </summary>
|
||||
/// <value> The locating setting. </value>
|
||||
public LocatingSetting LocatingSetting
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppSettings.locatingSetting;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (AppSettings.locatingSetting != value)
|
||||
{
|
||||
AppSettings.locatingSetting = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the network setting. </summary>
|
||||
/// <value> The network setting. </value>
|
||||
public NetworkSetting NetworkSetting
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppSettings.networkSetting;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (AppSettings.networkSetting != value)
|
||||
{
|
||||
AppSettings.networkSetting = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the function settings. </summary>
|
||||
/// <value> The function settings. </value>
|
||||
public FunctionSettings FunctionSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppSettings.functionSetting;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (AppSettings.functionSetting != value)
|
||||
{
|
||||
AppSettings.functionSetting = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,51 +134,6 @@ namespace CampusAppWP8.Model.Setting
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the uni network. </summary>
|
||||
/// <value> true if uni network, false if not. </value>
|
||||
public bool UniNetwork
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_UniNet);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_UniNet, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether this object is WiFi enable. </summary>
|
||||
/// <value> true if WiFi enable, false if not. </value>
|
||||
public bool WifiEnable
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_WifiEnable);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_WifiEnable, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the only WiFi. </summary>
|
||||
/// <value> true if only wifi, false if not. </value>
|
||||
public bool OnlyWifi
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_OnlyWifi);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_OnlyWifi, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the DeploymentNumber of the app. </summary>
|
||||
/// <value> The deployment number. </value>
|
||||
public int DeploymentNumber
|
||||
@@ -121,21 +149,29 @@ namespace CampusAppWP8.Model.Setting
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the tag default handler. </summary>
|
||||
/// <value> The tag default handler. </value>
|
||||
public BTUTagDefaultHandler TagDefaultHandler
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
get
|
||||
// set Deploynumber
|
||||
int appDeploy;
|
||||
bool parseResult = int.TryParse(Constants.DeploymentNumber, out appDeploy);
|
||||
if (parseResult)
|
||||
{
|
||||
return App.LoadFromAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler);
|
||||
this.DeploymentNumber = appDeploy;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler, value);
|
||||
}
|
||||
this.DevMode = false;
|
||||
this.InitApp = false;
|
||||
this.FunctionSettings.SetSettingToDefault();
|
||||
this.NetworkSetting.SetSettingToDefault();
|
||||
this.LocatingSetting.SetSettingToDefault();
|
||||
this.DisplaySetting.SetSettingToDefault();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
48
CampusAppWP8/CampusAppWP8/Model/Setting/BTUTagSetting.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="BTUTagSetting.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the btu tag setting class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary> A btu tag setting. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
||||
public class BTUTagSetting : ISetting
|
||||
{
|
||||
#region property
|
||||
|
||||
/// <summary> Gets or sets the tag default handler. </summary>
|
||||
/// <value> The tag default handler. </value>
|
||||
public BTUTagDefaultHandler TagDefaultHandler
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Model.Setting.ISetting.SetSettingToDefault()"/>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
this.TagDefaultHandler = BTUTagDefaultHandler.InfoPage;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
64
CampusAppWP8/CampusAppWP8/Model/Setting/DisplaySetting.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using CampusAppWP8.Resources;
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DisplaySetting.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>26.11.2013</date>
|
||||
// <summary>Implements the display setting class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
/// <summary> A display setting. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
||||
public class DisplaySetting : ISetting
|
||||
{
|
||||
#region property
|
||||
|
||||
/// <summary> Gets or sets the color of the application accent. </summary>
|
||||
/// <value> The color of the application accent. </value>
|
||||
public Color AppAccentColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<Color>(Constants.Setting_AppAccentColor);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<Color>(Constants.Setting_AppAccentColor, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the color of the phone accent. </summary>
|
||||
/// <value> The color of the phone accent. </value>
|
||||
public Color PhoneAccentColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<Color>(Constants.Setting_PhoneAccentColor);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<Color>(Constants.Setting_PhoneAccentColor, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Model.Setting.ISetting.SetSettingToDefault()"/>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
this.AppAccentColor = this.PhoneAccentColor;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
97
CampusAppWP8/CampusAppWP8/Model/Setting/FunctionSettings.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="FunctionSettings.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the function settings class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
|
||||
/// <summary> A function settings. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
||||
public class FunctionSettings : ISetting
|
||||
{
|
||||
#region member
|
||||
|
||||
/// <summary> The mensa setting. </summary>
|
||||
private static MensaSetting mensaSetting = new MensaSetting();
|
||||
|
||||
/// <summary> The tag setting. </summary>
|
||||
private static BTUTagSetting tagSetting = new BTUTagSetting();
|
||||
|
||||
/// <summary> The time table setting. </summary>
|
||||
private static TimeTableSetting timeTableSetting = new TimeTableSetting();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets the time table setting. </summary>
|
||||
/// <value> The time table setting. </value>
|
||||
public TimeTableSetting TimeTableSetting
|
||||
{
|
||||
get
|
||||
{
|
||||
return FunctionSettings.timeTableSetting;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
FunctionSettings.timeTableSetting = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the tag setting. </summary>
|
||||
/// <value> The tag setting. </value>
|
||||
public BTUTagSetting TagSetting
|
||||
{
|
||||
get
|
||||
{
|
||||
return FunctionSettings.tagSetting;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (FunctionSettings.tagSetting != value)
|
||||
{
|
||||
FunctionSettings.tagSetting = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the mensa setting. </summary>
|
||||
/// <value> The mensa setting. </value>
|
||||
public MensaSetting MensaSetting
|
||||
{
|
||||
get
|
||||
{
|
||||
return FunctionSettings.mensaSetting;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != FunctionSettings.mensaSetting)
|
||||
{
|
||||
FunctionSettings.mensaSetting = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Model.Setting.ISetting.SetSettingToDefault()"/>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
this.TagSetting.SetSettingToDefault();
|
||||
this.MensaSetting.SetSettingToDefault();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
18
CampusAppWP8/CampusAppWP8/Model/Setting/ISetting.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ISetting.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Declares the ISetting interface</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
/// <summary> Interface for setting. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public interface ISetting
|
||||
{
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
void SetSettingToDefault();
|
||||
}
|
||||
}
|
||||
48
CampusAppWP8/CampusAppWP8/Model/Setting/LocatingSetting.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LocatingSetting.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the locating setting class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary> A locating setting. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
||||
public class LocatingSetting : ISetting
|
||||
{
|
||||
#region property
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the GeoWatch-Flag. </summary>
|
||||
/// <value> true if geo watch enable, false if not. </value>
|
||||
public bool GeoWatchEnable
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_GeoWatchEnable);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_GeoWatchEnable, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Model.Setting.ISetting.SetSettingToDefault()"/>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
this.GeoWatchEnable = false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
88
CampusAppWP8/CampusAppWP8/Model/Setting/MensaSetting.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaSetting.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the mensa setting class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Settings;
|
||||
|
||||
/// <summary> A mensa setting. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public class MensaSetting : ISetting
|
||||
{
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the atom mensa selection. </summary>
|
||||
/// <value> true if atom mensa selection, false if not. </value>
|
||||
public bool AtomMensaSelection
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_MensaSetting_AtomMensaSelection);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_MensaSetting_AtomMensaSelection, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the default mensa. </summary>
|
||||
/// <value> The default mensa. </value>
|
||||
public Campus DefaultMensa
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<Campus>(Constants.Setting_Mensa_DefaultCampus);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<Campus>(Constants.Setting_Mensa_DefaultCampus, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected mensa. That means if the Campus is UserSettingCampus then
|
||||
/// return the Campus from user profil.
|
||||
/// </summary>
|
||||
/// <value> The selected mensa. </value>
|
||||
public Campus SelectedMensa
|
||||
{
|
||||
get
|
||||
{
|
||||
Campus mensa = App.LoadFromAppState<Campus>(Constants.Setting_Mensa_DefaultCampus);
|
||||
if (mensa == Campus.UserSettingCampus)
|
||||
{
|
||||
mensa = Settings.UserProfil.DefaultCampus;
|
||||
}
|
||||
return mensa;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<Campus>(Constants.Setting_Mensa_DefaultCampus, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
// set Deploynumber
|
||||
this.AtomMensaSelection = true;
|
||||
this.DefaultMensa = Campus.UserSettingCampus;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
89
CampusAppWP8/CampusAppWP8/Model/Setting/NetworkSetting.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NetworkSetting.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the network setting class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary> A network setting. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
||||
public class NetworkSetting : ISetting
|
||||
{
|
||||
#region property
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the uni network. </summary>
|
||||
/// <value> true if uni network, false if not. </value>
|
||||
public bool UniNetwork
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_UniNet);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_UniNet, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether this object is WiFi enable. </summary>
|
||||
/// <value> true if WiFi enable, false if not. </value>
|
||||
public bool WifiEnable
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_WifiEnable);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_WifiEnable, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the only WiFi. </summary>
|
||||
/// <value> true if only wifi, false if not. </value>
|
||||
public bool OnlyWifi
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_OnlyWifi);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_OnlyWifi, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Model.Setting.ISetting.SetSettingToDefault()"/>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
this.OnlyWifi = false;
|
||||
|
||||
this.UniNetwork = Utilities.IsUniNetworkAvailable();
|
||||
if (!this.UniNetwork)
|
||||
{
|
||||
this.WifiEnable = Utilities.IsWifiAvailable();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.WifiEnable = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
48
CampusAppWP8/CampusAppWP8/Model/Setting/SettingsTypes.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SettingsTypes.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the settings types class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
/// <summary> Values that represent SettingType. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public enum SettingType
|
||||
{
|
||||
/// <summary> An enum constant representing the setting option. </summary>
|
||||
Setting,
|
||||
|
||||
/// <summary> An enum constant representing the appsetting option. </summary>
|
||||
Appsetting,
|
||||
|
||||
/// <summary> An enum constant representing the user setting option. </summary>
|
||||
UserSetting,
|
||||
|
||||
/// <summary> An enum constant representing the appsetting functionsetting option. </summary>
|
||||
Appsetting_Functionsetting,
|
||||
|
||||
/// <summary> An enum constant representing the appsetting networksetting option. </summary>
|
||||
Appsetting_Networksetting,
|
||||
|
||||
/// <summary> An enum constant representing the appsetting locatingsetting option. </summary>
|
||||
Appsetting_Locatingsetting,
|
||||
|
||||
/// <summary>
|
||||
/// An enum constant representing the appsetting functionsetting mensasetting option.
|
||||
/// </summary>
|
||||
Appsetting_Functionsetting_Mensasetting,
|
||||
|
||||
/// <summary>
|
||||
/// An enum constant representing the appsetting functionsetting tagsetting option.
|
||||
/// </summary>
|
||||
Appsetting_Functionsetting_Tagsetting,
|
||||
|
||||
/// <summary>
|
||||
/// An enum constant representing the appsetting functionsetting time tablesetting option.
|
||||
/// </summary>
|
||||
Appsetting_Functionsetting_TimeTablesetting
|
||||
}
|
||||
}
|
||||
32
CampusAppWP8/CampusAppWP8/Model/Setting/TimeTableSetting.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="TimeTableSetting.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the time table setting class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
/// <summary> A time table setting. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
||||
public class TimeTableSetting : ISetting
|
||||
{
|
||||
|
||||
#region Property
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Model.Setting.ISetting.SetSettingToDefault()"/>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,14 +8,14 @@
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Setting
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Settings;
|
||||
|
||||
/// <summary> Model for the profile of an user. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
[XmlRoot("root")]
|
||||
public class UserProfilModel
|
||||
public class UserProfilModel : ISetting
|
||||
{
|
||||
#region Members
|
||||
|
||||
@@ -116,6 +116,24 @@ namespace CampusAppWP8.Model.Setting
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public void SetSettingToDefault()
|
||||
{
|
||||
// set Deploynumber
|
||||
this.Course = 0;
|
||||
this.DefaultCampus = Campus.CB_MAIN;
|
||||
this.Degree = DegreeType.BACHELOR;
|
||||
this.Role = RoleType.STUDENT;
|
||||
this.Semester = this.CalcCurrentSemester();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary> Methods check if a value could be a valid semester. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="possibleSemester"> value which has to be checked. </param>
|
||||
@@ -144,6 +162,30 @@ namespace CampusAppWP8.Model.Setting
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary> Calculates the current semester. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <returns> The calculated current semester. </returns>
|
||||
private int CalcCurrentSemester()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
int result = 0;
|
||||
|
||||
result = now.Year * 10;
|
||||
|
||||
if (now.Month < 10)
|
||||
{
|
||||
result += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += 2;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="AppAccentColorListPickerItemListModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>26.11.2013</date>
|
||||
// <summary>Implements the application accent color list picker item list model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
using System.Windows.Media;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary> A data Model for the application accent color list picker item list. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemListTemplateModel{System.Windows.Media.Color}"/>
|
||||
public class AppAccentColorListPickerItemListModel : CampusAppWPortalLib8.Model.Utility.ListPickerItemListTemplateModel<SolidColorBrush>
|
||||
{
|
||||
#region member
|
||||
|
||||
/// <summary> The faculty 1 color. </summary>
|
||||
private static readonly SolidColorBrush Faculty1Color = (SolidColorBrush)App.Current.Resources[Constants.Brush_Faculty1];
|
||||
|
||||
/// <summary> The faculty 2 color. </summary>
|
||||
private static readonly SolidColorBrush Faculty2Color = (SolidColorBrush)App.Current.Resources[Constants.Brush_Faculty2];
|
||||
|
||||
/// <summary> The faculty 3 color. </summary>
|
||||
private static readonly SolidColorBrush Faculty3Color = (SolidColorBrush)App.Current.Resources[Constants.Brush_Faculty3];
|
||||
|
||||
/// <summary> The faculty 4 color. </summary>
|
||||
private static readonly SolidColorBrush Faculty4Color = (SolidColorBrush)App.Current.Resources[Constants.Brush_Faculty4];
|
||||
|
||||
/// <summary> The faculty 5 color. </summary>
|
||||
private static readonly SolidColorBrush Faculty5Color = (SolidColorBrush)App.Current.Resources[Constants.Brush_Faculty5];
|
||||
|
||||
/// <summary> The faculty. </summary>
|
||||
private readonly string faculty = CampusAppWPortalLib8.Resources.AppResources.Faculty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the AppAccentColorListPickerItemListModel class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
public AppAccentColorListPickerItemListModel()
|
||||
: base()
|
||||
{
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary> Gets index or default. </summary>
|
||||
/// <remarks> Stubbfel, 27.11.2013. </remarks>
|
||||
/// <param name="value"> The value. </param>
|
||||
/// <returns> The index or default. </returns>
|
||||
public override int GetIndexOrDefault(SolidColorBrush value)
|
||||
{
|
||||
int index = 0;
|
||||
foreach (ColorListPickerItemModel brush in this.List)
|
||||
{
|
||||
if (brush.Value.Color.Equals(value.Color))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
/// <summary> Loads the list. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
protected override void LoadList()
|
||||
{
|
||||
this.AddItem(new ColorListPickerItemModel(new SolidColorBrush(Settings.AppSetting.DisplaySetting.PhoneAccentColor), CampusAppWP8.Resources.AppResources.AccentColor));
|
||||
this.AddItem(new ColorListPickerItemModel(AppAccentColorListPickerItemListModel.Faculty1Color, this.faculty + " 1"));
|
||||
this.AddItem(new ColorListPickerItemModel(AppAccentColorListPickerItemListModel.Faculty2Color, this.faculty + " 2"));
|
||||
this.AddItem(new ColorListPickerItemModel(AppAccentColorListPickerItemListModel.Faculty3Color, this.faculty + " 3"));
|
||||
this.AddItem(new ColorListPickerItemModel(AppAccentColorListPickerItemListModel.Faculty4Color, this.faculty + " 4"));
|
||||
this.AddItem(new ColorListPickerItemModel(AppAccentColorListPickerItemListModel.Faculty5Color, this.faculty + " 5"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ColorListPickerItemModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>26.11.2013</date>
|
||||
// <summary>Implements the color list picker item model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
using System.Windows.Media;
|
||||
|
||||
/// <summary> A data Model for the color list picker item. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemTemplateModel{System.Windows.Media.Color}"/>
|
||||
public class ColorListPickerItemModel : CampusAppWPortalLib8.Model.Utility.ListPickerItemTemplateModel<SolidColorBrush>
|
||||
{
|
||||
/// <summary> Initializes a new instance of the ColorListPickerItemModel class. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
public ColorListPickerItemModel()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary> Initializes a new instance of the ColorListPickerItemModel class. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <param name="value"> The value. </param>
|
||||
/// <param name="text"> The text. </param>
|
||||
public ColorListPickerItemModel(SolidColorBrush value, string text)
|
||||
: base(value, text)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ namespace CampusAppWP8.Pages.BTTTag
|
||||
InitializeComponent();
|
||||
this.taghandlerModel = new TagHandlerListPickerItemListModel();
|
||||
this.TagHandler.ItemsSource = this.taghandlerModel.List;
|
||||
int tagselIndex = this.taghandlerModel.GetIndexOrDefault(Settings.AppSetting.TagDefaultHandler.ToString());
|
||||
int tagselIndex = this.taghandlerModel.GetIndexOrDefault(Settings.AppSetting.FunctionSettings.TagSetting.TagDefaultHandler.ToString());
|
||||
this.TagHandler.SelectedIndex = tagselIndex;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CampusAppWP8.Pages.BTTTag
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
Settings.AppSetting.TagDefaultHandler = (CampusAppWP8.Model.Setting.BTUTagDefaultHandler)Enum.Parse(typeof(CampusAppWP8.Model.Setting.BTUTagDefaultHandler), ((CampusAppWPortalLib8.Model.Utility.ListPickerItemModel)this.TagHandler.SelectedItem).Value);
|
||||
Settings.AppSetting.FunctionSettings.TagSetting.TagDefaultHandler = (CampusAppWP8.Model.Setting.BTUTagDefaultHandler)Enum.Parse(typeof(CampusAppWP8.Model.Setting.BTUTagDefaultHandler), ((CampusAppWPortalLib8.Model.Utility.ListPickerItemModel)this.TagHandler.SelectedItem).Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
if (device != null)
|
||||
if (this.device != null)
|
||||
{
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (device != null)
|
||||
if (this.device != null)
|
||||
{
|
||||
this.device.StopSubscribingForMessage(this.ndefId);
|
||||
}
|
||||
@@ -495,10 +495,11 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <param name="message"> the message of the device. </param>
|
||||
private void NDEFHandler(ProximityDevice sender, ProximityMessage message)
|
||||
{
|
||||
if (device == null)
|
||||
if (this.device == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// create ndefMessage
|
||||
this.device.StopSubscribingForMessage(message.SubscriptionId);
|
||||
var ndefMessage = message.Data;
|
||||
@@ -558,7 +559,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
|
||||
@@ -603,7 +604,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <param name="places"> The places. </param>
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <param name="scroll"> (Optional) the scroll. </param>
|
||||
private void AddPins(List<PlaceModel> places,PinType type, bool scroll = true)
|
||||
private void AddPins(List<PlaceModel> places, PinType type, bool scroll = true)
|
||||
{
|
||||
foreach (PlaceModel place in places)
|
||||
{
|
||||
@@ -687,7 +688,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <param name="scroll"> (Optional) the scroll. </param>
|
||||
private void ShowCurrentPosition(bool scroll = true)
|
||||
{
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
if (Settings.AppSetting.LocatingSetting.GeoWatchEnable)
|
||||
{
|
||||
Utilities.DetermineAndStoreCurrentPositionForce();
|
||||
if (this.Dispatcher != null)
|
||||
@@ -720,7 +721,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
GeoMapPoint currentPosition = App.LoadFromAppState<GeoMapPoint>(Constants.GeoWatch_CurrentPositionPoint);
|
||||
if (currentPosition == null || currentPosition.Latitude == 0 || currentPosition.Longitude == 0)
|
||||
{
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
if (Settings.AppSetting.LocatingSetting.GeoWatchEnable)
|
||||
{
|
||||
MessageBoxes.ShowMainModelInfoMessageBox(AppResources.MsgBox_NoLocation);
|
||||
}
|
||||
@@ -730,7 +731,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
else
|
||||
{
|
||||
this.ClearMap(new List<string>() { MapPinModel.CurrentPositionPlacePinString });
|
||||
this.SetPinToPosition(currentPosition.Latitude,currentPosition.Longitude, PinType.CurrentPosition, scroll);
|
||||
this.SetPinToPosition(currentPosition.Latitude, currentPosition.Longitude, PinType.CurrentPosition, scroll);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,7 +851,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
this.SearchByText(sender, e);
|
||||
this.MapScroller.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:lu="clr-namespace:CampusAppWP8.Utility.Lui"
|
||||
xmlns:conv="clr-namespace:CampusAppWP8.Utility.Converter"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -17,53 +19,102 @@
|
||||
shell:SystemTray.IsVisible="True"
|
||||
x:Name="root">
|
||||
|
||||
<phone:PhoneApplicationPage.Resources>
|
||||
<conv:RoomToStringConverter x:Key="RoomConverter"/>
|
||||
<conv:FrameworkElementToRectConverter x:Key="RectConverter"/>
|
||||
|
||||
</phone:PhoneApplicationPage.Resources>
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="0"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--row_0-->
|
||||
<StackPanel Grid.Row="0">
|
||||
<header:DefaultHeader Name="DefHeader" HeaderName="{Binding Path=LocalizedResources.CampusMapApp_RoomListTitle, Source={StaticResource LocalizedStrings}}"/>
|
||||
<header:DefaultHeader x:Name="DefHeader" HeaderName="{Binding Path=LocalizedResources.CampusMapApp_RoomListTitle, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<!--row_1-->
|
||||
<Grid Grid.Row="1" Margin="24,-12,24,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{Binding Path=LocalizedResources.LayerListPicker_Label, Source={StaticResource LocalizedStrings}}" Margin="24,0,24,0"/>
|
||||
<TextBlock x:Name="LayerTag" Grid.Column="1" Text="" HorizontalAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="{Binding Path=LocalizedResources.LayerListPicker_Label, Source={StaticResource LocalizedStrings}}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="0,0,24,0"/>
|
||||
<TextBlock
|
||||
x:Name="LayerTag"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Grid.Column="2" Click="SearchRoom" Margin="0,0,0,-10" Padding="0">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="50" Height="50" Margin="0"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Canvas Grid.Row="2" x:Name="MainCanvas" Margin="12">
|
||||
<ViewportControl Name="VPC" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Bounds="0,-200,720,1200" Width="{Binding ActualWidth, ElementName=MainCanvas, Mode=OneWay}" Height="{Binding ActualHeight, ElementName=MainCanvas, Mode=OneWay}">
|
||||
<Canvas Name="MapCanvas" Height="800" Width="480" VerticalAlignment="Top" HorizontalAlignment="Left" ManipulationDelta="MapCanvas_ManipulationDelta" ManipulationStarted="MapCanvas_ManipulationStarted" ManipulationCompleted="MapCanvas_ManipulationCompleted" Margin="-188,-200,-188,-200">
|
||||
<Image Name="imgMap" Height="{Binding ImageHeigh}" Width="{Binding ImageWidth}" Source="{Binding ImageSource}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<Canvas.RenderTransform>
|
||||
<ScaleTransform/>
|
||||
</Canvas.RenderTransform>
|
||||
</Canvas>
|
||||
</ViewportControl>
|
||||
|
||||
<!--row_2-->
|
||||
<toolkit:ListPicker
|
||||
x:Name="RoomPicker"
|
||||
Grid.Row="2"
|
||||
SelectionChanged="RoomPicker_SelectionChanged"
|
||||
ItemsSource="{Binding RoomPickerList, ElementName=root, Mode=OneWay}"
|
||||
FullModeHeader="{Binding Path=LocalizedResources.Rooms, Source={StaticResource LocalizedStrings}}"
|
||||
Opacity="0">
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate x:Name="RoomPickerItemTemplate">
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<lu:MultiValueTextBlock Value1="{Binding BindsDirectlyToSource=True}" Converter="{StaticResource RoomConverter}" TextStyle="{StaticResource PhoneTextGroupHeaderStyle}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
|
||||
<Grid x:Name="BtnGrid" Width="{Binding ActualWidth, ElementName=MainCanvas, Mode=OneWay}" Height="60">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.Column="0" BorderThickness="2" BorderBrush="{StaticResource PhoneAccentBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<TextBlock Text="ZoomIn" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource PhoneAccentBrush}" Tap="ZoomIn_Tap"/>
|
||||
</Border>
|
||||
<Border Grid.Column="1" BorderThickness="2" BorderBrush="{StaticResource PhoneAccentBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<TextBlock Text="ZoomOut" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource PhoneAccentBrush}" Tap="ZoomOut_Tap"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Canvas>
|
||||
<!--row_3-->
|
||||
<ViewportControl
|
||||
x:Name="VPC"
|
||||
Grid.Row="3"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="12"
|
||||
Bounds="{Binding ViewBounds, ElementName=root, Mode=OneWay}"
|
||||
>
|
||||
<Canvas
|
||||
x:Name="MapCanvas"
|
||||
Height="{Binding Height, Mode=OneWay, ElementName=imgMap}"
|
||||
Width="{Binding Width, Mode=OneWay, ElementName=imgMap}"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Left"
|
||||
ManipulationDelta="MapCanvas_ManipulationDelta"
|
||||
ManipulationStarted="MapCanvas_ManipulationStarted"
|
||||
ManipulationCompleted="MapCanvas_ManipulationCompleted"
|
||||
SizeChanged="MapCanvas_SizeChanged"
|
||||
>
|
||||
<Image
|
||||
x:Name="imgMap"
|
||||
Height="{Binding ImageHeight}"
|
||||
Width="{Binding ImageWidth}"
|
||||
Source="{Binding ImageSource}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"/>
|
||||
<Canvas.RenderTransform>
|
||||
<ScaleTransform/>
|
||||
</Canvas.RenderTransform>
|
||||
</Canvas>
|
||||
</ViewportControl>
|
||||
</Grid>
|
||||
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized" />
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Default" />
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -10,6 +10,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -51,8 +52,19 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <summary> The offset point. </summary>
|
||||
private MapPoint offsetPoint;
|
||||
|
||||
/// <summary> The selected layer. </summary>
|
||||
private string selectedLayer = string.Empty;
|
||||
|
||||
/// <summary> List of room pickers. </summary>
|
||||
private ObservableCollection<object> roomPickerList = new ObservableCollection<object>();
|
||||
/// <summary> The view bounds. </summary>
|
||||
private Rect viewBounds = new Rect();
|
||||
|
||||
/// <summary> The marker pin. </summary>
|
||||
private UIElement markerPin = null;
|
||||
/// <summary> The canvas scale. </summary>
|
||||
private double canvasScale = 1.0;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
@@ -62,10 +74,25 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
public RoomListPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
ApplicationBarIconButton btnZoomIn = new ApplicationBarIconButton();
|
||||
btnZoomIn.IconUri = new Uri(Icons.ZoomIn, UriKind.Relative);
|
||||
btnZoomIn.Text = AppResources.ZoomIn;
|
||||
btnZoomIn.Click += this.BtnZoomIn_Click;
|
||||
|
||||
ApplicationBarIconButton btnZoomOut = new ApplicationBarIconButton();
|
||||
btnZoomOut.IconUri = new Uri(Icons.ZoomOut, UriKind.Relative);
|
||||
btnZoomOut.Text = AppResources.ZoomOut;
|
||||
btnZoomOut.Click += this.BtnZoomOut_Click;
|
||||
|
||||
this.ApplicationBar.Buttons.Add(btnZoomIn);
|
||||
this.ApplicationBar.Buttons.Add(btnZoomOut);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary> Gets or sets the selected layer. </summary>
|
||||
/// <value> The selected layer. </value>
|
||||
private string SelectedLayer
|
||||
{
|
||||
get
|
||||
@@ -75,8 +102,27 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
set
|
||||
{
|
||||
this.selectedLayer = value;
|
||||
this.LayerTag.Text = value;
|
||||
if (this.selectedLayer != value)
|
||||
{
|
||||
this.selectedLayer = value;
|
||||
this.LayerTag.Text = value;
|
||||
this.UpdateRoomList(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a list of room pickers. </summary>
|
||||
/// <value> A List of room pickers. </value>
|
||||
public ObservableCollection<object> RoomPickerList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.roomPickerList;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.roomPickerList = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +216,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
x = room.GeoRefPoint.Longitude;
|
||||
y = room.GeoRefPoint.Latitude;
|
||||
MapPoint roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
MapPoint viewPoint = roompoint - this.mappoint + this.offsetPoint;
|
||||
MapPoint viewPoint = roompoint + this.offsetPoint; //- this.mappoint
|
||||
|
||||
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, PinType.InfoRedPlace, new List<PlaceModel> { room }));
|
||||
}
|
||||
@@ -320,7 +366,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
x = room.GeoRefPoint.Longitude;
|
||||
y = room.GeoRefPoint.Latitude;
|
||||
MapPoint roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
MapPoint viewPoint = roompoint - this.mappoint + this.offsetPoint;
|
||||
MapPoint viewPoint = roompoint + this.offsetPoint; // -this.mappoint;
|
||||
|
||||
PinType type;
|
||||
|
||||
@@ -375,11 +421,15 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
this.MapCanvas.DataContext = this.buildingMap;
|
||||
|
||||
Canvas.SetLeft(this.imgMap, -1 * this.mappoint.X);
|
||||
Canvas.SetTop(this.imgMap, -1 * this.mappoint.Y);
|
||||
Canvas.SetZIndex(this.imgMap, 0);
|
||||
//Canvas.SetLeft(this.imgMap, -1 * this.mappoint.X);
|
||||
//Canvas.SetTop(this.imgMap, -1 * this.mappoint.Y);
|
||||
//Canvas.SetZIndex(this.imgMap, 0);
|
||||
}
|
||||
|
||||
/// <summary> Raises the system. event. </summary>
|
||||
/// <remarks> Fiedler, 18.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnMenuItemClicked(object sender, System.EventArgs e)
|
||||
{
|
||||
if (this.SelectedLayer.Equals((sender as ApplicationBarMenuItem).Text) == false)
|
||||
@@ -423,25 +473,138 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <summary> Event handler. Called by ZoomIn for tap events. </summary>
|
||||
/// <remarks> Fiedler, 15.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Gesture event information. </param>
|
||||
private void ZoomIn_Tap(object sender, System.Windows.Input.GestureEventArgs e)
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void BtnZoomIn_Click(object sender, EventArgs e)
|
||||
{
|
||||
//throw new NotImplementedException("TODO");
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleX *= 1.5;
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleY *= 1.5;
|
||||
if (this.canvasScale >= 3)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.canvasScale *= 1.1;
|
||||
}
|
||||
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleX = this.canvasScale;
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleY = this.canvasScale;
|
||||
|
||||
this.ReCalcBounds();
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by ZoomOut for tap events. </summary>
|
||||
/// <remarks> Fiedler, 15.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Gesture event information. </param>
|
||||
private void ZoomOut_Tap(object sender, System.Windows.Input.GestureEventArgs e)
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void BtnZoomOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
//throw new NotImplementedException("TODO");
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleX /= 1.5;
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleY /= 1.5;
|
||||
double tempW = (this.MapCanvas.ActualWidth / this.VPC.ActualWidth);
|
||||
double tempH = (this.MapCanvas.ActualHeight / this.VPC.ActualHeight);
|
||||
|
||||
if (tempW == 1 || tempH == 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ((this.MapCanvas.ActualWidth * this.canvasScale * 0.95) < this.VPC.ActualWidth || (this.MapCanvas.ActualHeight * this.canvasScale * 0.95) < this.VPC.ActualHeight)
|
||||
{
|
||||
tempW = (this.VPC.ActualWidth / this.MapCanvas.ActualWidth);
|
||||
tempH = (this.VPC.ActualHeight / this.MapCanvas.ActualHeight);
|
||||
|
||||
if (tempH < tempW)
|
||||
{
|
||||
this.canvasScale = tempW;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.canvasScale = tempH;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.canvasScale *= 0.95;
|
||||
}
|
||||
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleX = this.canvasScale;
|
||||
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleY = this.canvasScale;
|
||||
|
||||
this.ReCalcBounds();
|
||||
}
|
||||
|
||||
/// <summary> Searches for the first room. </summary>
|
||||
/// <remarks> Fiedler, 18.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void SearchRoom(object sender, EventArgs e)
|
||||
{
|
||||
this.RoomPicker.Open();
|
||||
}
|
||||
|
||||
/// <summary> Updates the room list described by level. </summary>
|
||||
/// <remarks> Fiedler, 18.11.2013. </remarks>
|
||||
/// <param name="level"> The level. </param>
|
||||
private void UpdateRoomList(string level)
|
||||
{
|
||||
CampusBuildingLayerModel layer = this.building.Layers[level];
|
||||
this.roomPickerList.Clear();
|
||||
|
||||
foreach (PlaceModel room in layer.Rooms.Places)
|
||||
{
|
||||
if(room.GetInformationsValue(Constants.PisInformationName_Typ).Equals(Constants.PisInformationValue_Entrance) == false)
|
||||
{
|
||||
this.roomPickerList.Add(room);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary> Event handler. Called by RoomPicker for selection changed events. </summary>
|
||||
/// <remarks> Fiedler, 18.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Selection changed event information. </param>
|
||||
private void RoomPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems != null && e.AddedItems.Count > 0 && e.RemovedItems != null && e.RemovedItems.Count > 0)
|
||||
{
|
||||
if (this.markerPin != null)
|
||||
{
|
||||
this.MapCanvas.Children.Remove(this.markerPin);
|
||||
}
|
||||
|
||||
PlaceModel room = e.AddedItems[0] as PlaceModel;
|
||||
MapPoint viewPoint
|
||||
= this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(room.GeoRefPoint.Longitude, room.GeoRefPoint.Latitude)))
|
||||
+ this.offsetPoint;
|
||||
|
||||
this.markerPin = this.buildingMap.AddPin(viewPoint, PinType.InfoRedPlace);
|
||||
|
||||
this.MapCanvas.Children.Add(this.markerPin);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by MapCanvas for size changed events. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Size changed event information. </param>
|
||||
private void MapCanvas_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
this.ReCalcBounds();
|
||||
this.VPC.SetViewportOrigin(new Point(this.mappoint.X, this.mappoint.Y));
|
||||
}
|
||||
|
||||
/// <summary> Re calculate bounds. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
private void ReCalcBounds()
|
||||
{
|
||||
this.viewBounds.Width = this.MapCanvas.RenderSize.Width * (this.MapCanvas.RenderTransform as ScaleTransform).ScaleX;
|
||||
this.viewBounds.Height = this.MapCanvas.RenderSize.Height * (this.MapCanvas.RenderTransform as ScaleTransform).ScaleY;
|
||||
|
||||
Point newPos = new Point();
|
||||
newPos.X = this.VPC.Viewport.X + ((this.viewBounds.Width - this.VPC.Bounds.Width) * 0.5);
|
||||
newPos.Y = this.VPC.Viewport.Y + ((this.viewBounds.Height - this.VPC.Bounds.Height) * 0.5);
|
||||
|
||||
this.VPC.Bounds = this.viewBounds;
|
||||
|
||||
this.VPC.SetViewportOrigin(newPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -251,7 +251,7 @@ namespace CampusAppWP8.Pages.Dev
|
||||
else
|
||||
{
|
||||
string qrContent = result.Text;
|
||||
switch (Settings.AppSetting.TagDefaultHandler)
|
||||
switch (Settings.AppSetting.FunctionSettings.TagSetting.TagDefaultHandler)
|
||||
{
|
||||
case BTUTagDefaultHandler.CampusMap:
|
||||
this.GoToCampusMappage(qrContent);
|
||||
|
||||
@@ -8,12 +8,18 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility.Lui.Page"
|
||||
xmlns:conv="clr-namespace:CampusAppWP8.Utility.Converter"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<page:PortraitLandscapePage.Resources>
|
||||
<conv:BoolToVisibilityConverter x:Key="VisConverter"/>
|
||||
</page:PortraitLandscapePage.Resources>
|
||||
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -40,7 +46,7 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid x:Name="EventTextGrid" Grid.Row="0" Visibility="{Binding Path=TextVisibility, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Grid x:Name="EventTextGrid" Grid.Row="0" Visibility="{Binding Path=TextVisibility, Mode=OneWay, Converter={StaticResource VisConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" MaxHeight="300"/>
|
||||
<RowDefinition Height="*" />
|
||||
@@ -52,7 +58,7 @@
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<phone:WebBrowser x:Name="EventWebBrowser" Source="{Binding Path=Link, Mode=OneWay}" Grid.Row="0" IsScriptEnabled="True" Visibility="{Binding Path=BrowserVisibility, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||
<phone:WebBrowser x:Name="EventWebBrowser" Source="{Binding Path=Link, Mode=OneWay}" Grid.Row="0" IsScriptEnabled="True" Visibility="{Binding Path=BrowserVisibility, Mode=OneWay, Converter={StaticResource VisConverter}}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
private bool forceLoad = false;
|
||||
|
||||
/// <summary> Identifier for the location. </summary>
|
||||
public int locationID = -1;
|
||||
private int locationID = -1;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
if (mensaCampus == Campus.UserSettingCampus)
|
||||
{
|
||||
this.InitializeFeed(Settings.UserProfil.DefaultCampus);
|
||||
this.InitializeFeed(Settings.AppSetting.FunctionSettings.MensaSetting.SelectedMensa);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -231,14 +231,14 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
if (Settings.AppSetting.LocatingSetting.GeoWatchEnable && Settings.AppSetting.FunctionSettings.MensaSetting.AtomMensaSelection)
|
||||
{
|
||||
Thread thread = new Thread(new ThreadStart(this.DeterminCurrentCampusAndLoadFeed));
|
||||
thread.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.InitializeFeed(Settings.UserProfil.DefaultCampus);
|
||||
this.InitializeFeed(Settings.AppSetting.FunctionSettings.MensaSetting.SelectedMensa);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +445,6 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
copyText = Wp8StringManager.AddNewLine(copyText);
|
||||
}
|
||||
|
||||
|
||||
Clipboard.SetText(copyText);
|
||||
}
|
||||
|
||||
@@ -455,7 +454,6 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void CopyWeek(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (this.MensaPivot == null || this.feed == null || this.feed.Model == null)
|
||||
{
|
||||
return;
|
||||
@@ -471,6 +469,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
startDate = menu.Date;
|
||||
}
|
||||
|
||||
endDate = menu.Date;
|
||||
|
||||
copyText += menu.Day + " (" + menu.Date + "):";
|
||||
@@ -481,8 +480,8 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
copyText += meal.MealName + ": " + meal.MealDesc;
|
||||
copyText = Wp8StringManager.AddNewLine(copyText);
|
||||
}
|
||||
copyText = Wp8StringManager.AddNewLine(copyText);
|
||||
|
||||
copyText = Wp8StringManager.AddNewLine(copyText);
|
||||
}
|
||||
|
||||
string headline = AppResources.MensaApp_Weekplan + " (" + startDate + " - " + endDate + ") - " + AppResources.Setting_UserCampus + " " + this.feed.Title + " :";
|
||||
|
||||
@@ -8,12 +8,18 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility.Lui.Page"
|
||||
xmlns:conv="clr-namespace:CampusAppWP8.Utility.Converter"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<page:PortraitLandscapePage.Resources>
|
||||
<conv:BoolToVisibilityConverter x:Key="VisConverter"/>
|
||||
</page:PortraitLandscapePage.Resources>
|
||||
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -39,7 +45,7 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid x:Name="NewsTextGrid" Grid.Row="0" Visibility="{Binding Path=TextVisibility, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Grid x:Name="NewsTextGrid" Grid.Row="0" Visibility="{Binding Path=TextVisibility, Mode=OneWay, Converter={StaticResource VisConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" MaxHeight="300"/>
|
||||
<RowDefinition Height="*" />
|
||||
@@ -51,7 +57,7 @@
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<phone:WebBrowser x:Name="NewsWebBrowser" Source="{Binding Path=Link, Mode=OneWay}" Grid.Row="0" IsScriptEnabled="True" Visibility="{Binding Path=BrowserVisibility, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||
<phone:WebBrowser x:Name="NewsWebBrowser" Source="{Binding Path=Link, Mode=OneWay}" Grid.Row="0" IsScriptEnabled="True" Visibility="{Binding Path=BrowserVisibility, Mode=OneWay, Converter={StaticResource VisConverter}}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility.Lui.Page"
|
||||
xmlns:utility="clr-namespace:CampusAppWP8.Utility"
|
||||
xmlns:conv="clr-namespace:CampusAppWP8.Utility.Converter"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -18,8 +18,8 @@
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<page:PortraitLandscapePage.Resources>
|
||||
<utility:BoolToVisibilityConverter x:Key="VisConverter"/>
|
||||
<utility:IdToPlaceConverter x:Key="PlaceConverter"/>
|
||||
<conv:BoolToVisibilityConverter x:Key="VisConverter"/>
|
||||
<conv:IdToPlaceConverter x:Key="PlaceConverter"/>
|
||||
</page:PortraitLandscapePage.Resources>
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility.Lui.Page"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -25,48 +26,138 @@
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0">
|
||||
<header:DefaultHeader Name="DefHeader" HeaderName="{Binding Path=LocalizedResources.Setting_App, Source={StaticResource LocalizedStrings}}"/>
|
||||
<header:DefaultHeader x:Name="DefHeader" HeaderName="{Binding Path=LocalizedResources.Setting_General, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1">
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Margin="12,0,12,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<toolkit:ToggleSwitch Name="GeoWatchToggle" Content="{Binding Path=LocalizedResources.Setting_AppGeoWatch, Source={StaticResource LocalizedStrings}}"></toolkit:ToggleSwitch>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1">
|
||||
<toolkit:ToggleSwitch Name="OnlyWiFiToggle" Content="{Binding Path=LocalizedResources.Setting_AppOnlyWifi, Source={StaticResource LocalizedStrings}}"></toolkit:ToggleSwitch>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2">
|
||||
<lui:NavigateButton Content="{Binding Path=LocalizedResources.BTUTag_Title, Source={StaticResource LocalizedStrings}}" Url="{Binding Path=Constants.PathBTUTag_Info, Source={StaticResource Const}}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="3" >
|
||||
<TextBlock Margin="12,0,0,0" Text="{Binding Path=LocalizedResources.Setting_TagHandler, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker Name="TagHandler" ExpansionMode="FullScreenOnly" FullModeHeader="{Binding Path=LocalizedResources.ListPickerHeaderTag, Source={StaticResource LocalizedStrings}}" >
|
||||
<phone:Pivot Grid.Row="1" Name="GeneralSettingPivot">
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,-36,0,0">
|
||||
<TextBlock Text="{Binding}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:PivotItem Header="{Binding Path=LocalizedResources.Setting_GeneralNetwork, Source={StaticResource LocalizedStrings}}">
|
||||
<ScrollViewer Grid.Row="1">
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid Margin="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<toolkit:ToggleSwitch Name="GeoWatchToggle" Content="{Binding Path=LocalizedResources.Setting_AppGeoWatch, Source={StaticResource LocalizedStrings}}"></toolkit:ToggleSwitch>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1">
|
||||
<toolkit:ToggleSwitch Name="OnlyWiFiToggle" Content="{Binding Path=LocalizedResources.Setting_AppOnlyWifi, Source={StaticResource LocalizedStrings}}"></toolkit:ToggleSwitch>
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="{Binding Path=LocalizedResources.SettingToDefault, Source={StaticResource LocalizedStrings}}"
|
||||
Style="{StaticResource SettingLabel}"/>
|
||||
<lui:ToDefaultButton
|
||||
Grid.Column="1"
|
||||
SettingType="{Binding Path=Constants.Setting_AppSetting_NetworkSetting_Enum, Source={StaticResource Const}}" Height="100"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</phone:PivotItem>
|
||||
<phone:PivotItem
|
||||
Header="{Binding Path=LocalizedResources.Setting_Display_Short, Source={StaticResource LocalizedStrings}}">
|
||||
<StackPanel >
|
||||
<TextBlock
|
||||
Text="{Binding Path=LocalizedResources.AccentColor, Source={StaticResource LocalizedStrings}}" Style="{StaticResource SettingLabel}"/>
|
||||
<!-- Listpicket of courses -->
|
||||
<toolkit:ListPicker Name="AccentColorPicker" FullModeHeader="{Binding Path=LocalizedResources.AccentColorPicker, Source={StaticResource LocalizedStrings}}" VerticalAlignment="Center" SelectionChanged="AccentColorPicker_SelectionChanged">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Rectangle Fill="{Binding Value}" Height="24" Width="24" Stroke="Black"/>
|
||||
<TextBlock Text="{Binding Text}" Margin="12,0,0,0"/>
|
||||
</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>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,12,0,0">
|
||||
<Rectangle Fill="{Binding Value}" Height="48" Width="48" Stroke="Black"/>
|
||||
<TextBlock Text="{Binding Text}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap" Margin="24,0,0,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</phone:PivotItem>
|
||||
|
||||
<phone:PivotItem
|
||||
Header="{Binding Path=LocalizedResources.Setting_Function_Short, Source={StaticResource LocalizedStrings}}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Grid.Row="0">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBoxItem>
|
||||
<lui:NavigateButton
|
||||
Style="{StaticResource ListButtonStyle}"
|
||||
Url="{Binding Path=Constants.PathSetting_Function, Source={StaticResource Const}}"
|
||||
QuerryStringName="{Binding Path=Constants.Param_FunctionSetting_Index, Source={StaticResource Const}}"
|
||||
QuerryStringValue="{Binding Path=Constants.FunctionSetting_Mensa, Source={StaticResource Const}}">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
</lui:NavigateButton>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem>
|
||||
<lui:NavigateButton
|
||||
Style="{StaticResource ListButtonStyle}"
|
||||
Url="{Binding Path=Constants.PathSetting_Function, Source={StaticResource Const}}"
|
||||
QuerryStringName="{Binding Path=Constants.Param_FunctionSetting_Index, Source={StaticResource Const}}"
|
||||
QuerryStringValue="{Binding Path=Constants.FunctionSetting_TimeTable, Source={StaticResource Const}}">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
</lui:NavigateButton>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem>
|
||||
<lui:NavigateButton
|
||||
Style="{StaticResource ListButtonStyle}"
|
||||
Url="{Binding Path=Constants.PathSetting_Function, Source={StaticResource Const}}"
|
||||
QuerryStringName="{Binding Path=Constants.Param_FunctionSetting_Index, Source={StaticResource Const}}"
|
||||
QuerryStringValue="{Binding Path=Constants.FunctionSetting_Tag, Source={StaticResource Const}}">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_Tag, Source={StaticResource LocalizedStrings}}"/>
|
||||
</lui:NavigateButton>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="{Binding Path=LocalizedResources.SettingToDefault, Source={StaticResource LocalizedStrings}}"
|
||||
Style="{StaticResource SettingLabel}"/>
|
||||
<lui:ToDefaultButton
|
||||
Grid.Column="1"
|
||||
SettingType="{Binding Path=Constants.Setting_AppSetting_FunctionSetting_Enum, Source={StaticResource Const}}" Height="100"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PivotItem>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Default" Opacity="1.0" >
|
||||
<lui:ResetSettingButtonAppBar Click="ResetSettingButtonAppBar_Click"/>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -9,19 +9,26 @@
|
||||
namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary> Class for the AppSettingPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class AppSettingPage : PhoneApplicationPage
|
||||
/// <seealso cref="T:CampusAppWP8.Pages.Setting.IRefreshingPage"/>
|
||||
public partial class AppSettingPage : PhoneApplicationPage, IRefreshingPage
|
||||
{
|
||||
#region Member
|
||||
/// <summary> The TagHandler model. </summary>
|
||||
private TagHandlerListPickerItemListModel taghandlerModel;
|
||||
#region member
|
||||
|
||||
/// <summary> List of colors of the application accents. </summary>
|
||||
private readonly AppAccentColorListPickerItemListModel appAccentColors = new AppAccentColorListPickerItemListModel();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="AppSettingPage" /> class. </summary>
|
||||
@@ -29,18 +36,42 @@ namespace CampusAppWP8.Pages.Setting
|
||||
public AppSettingPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.GeoWatchToggle.IsChecked = Settings.AppSetting.GeoWatchEnable;
|
||||
this.OnlyWiFiToggle.IsChecked = Settings.AppSetting.OnlyWifi;
|
||||
this.taghandlerModel = new TagHandlerListPickerItemListModel();
|
||||
this.TagHandler.ItemsSource = this.taghandlerModel.List;
|
||||
int tagselIndex = this.taghandlerModel.GetIndexOrDefault(Settings.AppSetting.TagDefaultHandler.ToString());
|
||||
this.TagHandler.SelectedIndex = tagselIndex;
|
||||
this.AccentColorPicker.ItemsSource = this.appAccentColors.List;
|
||||
this.LoadSettings();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary> Refresh page. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Pages.Setting.IRefreshingPage.RefreshPage()"/>
|
||||
public void RefreshPage()
|
||||
{
|
||||
this.LoadSettings();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
string functionIndex;
|
||||
if (NavigationMode.New != e.NavigationMode && NavigationContext.QueryString.TryGetValue(Constants.Param_FunctionSetting_Index, out functionIndex))
|
||||
{
|
||||
int oldIndex = App.LoadFromIsolatedStorage<int>(Constants.IsolatedStorage_GeneralSettingPageIndex);
|
||||
this.GeneralSettingPivot.SelectedIndex = oldIndex;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
@@ -48,12 +79,63 @@ namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
Settings.AppSetting.GeoWatchEnable = GeoWatchToggle.IsChecked.Value;
|
||||
Settings.AppSetting.OnlyWifi = OnlyWiFiToggle.IsChecked.Value;
|
||||
Settings.AppSetting.TagDefaultHandler = (CampusAppWP8.Model.Setting.BTUTagDefaultHandler)Enum.Parse(typeof(CampusAppWP8.Model.Setting.BTUTagDefaultHandler), ((CampusAppWPortalLib8.Model.Utility.ListPickerItemModel)this.TagHandler.SelectedItem).Value);
|
||||
this.SaveSettings();
|
||||
App.SaveToIsolatedStorage<int>(Constants.IsolatedStorage_GeneralSettingPageIndex, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
App.SaveToIsolatedStorage<int>(Constants.IsolatedStorage_FunctionSettingPageIndex, this.GeneralSettingPivot.SelectedIndex);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary> Loads the settings. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
private void LoadSettings()
|
||||
{
|
||||
this.GeoWatchToggle.IsChecked = Settings.AppSetting.LocatingSetting.GeoWatchEnable;
|
||||
this.OnlyWiFiToggle.IsChecked = Settings.AppSetting.NetworkSetting.OnlyWifi;
|
||||
this.AccentColorPicker.SelectedIndex = this.appAccentColors.GetIndexOrDefault(new SolidColorBrush(Settings.AppSetting.DisplaySetting.AppAccentColor));
|
||||
}
|
||||
|
||||
/// <summary> Saves the settings. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
private void SaveSettings()
|
||||
{
|
||||
Settings.AppSetting.LocatingSetting.GeoWatchEnable = GeoWatchToggle.IsChecked.Value;
|
||||
Settings.AppSetting.NetworkSetting.OnlyWifi = OnlyWiFiToggle.IsChecked.Value;
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by ResetSettingButtonAppBar for click events. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ResetSettingButtonAppBar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.AppSetting.SetSettingToDefault();
|
||||
this.LoadSettings();
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by AccentColorPicker for selection changed events. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Selection changed event information. </param>
|
||||
private void AccentColorPicker_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems.Count == 1 && e.RemovedItems.Count == 1)
|
||||
{
|
||||
int selectedIndex = this.AccentColorPicker.SelectedIndex;
|
||||
Color newColor = this.appAccentColors.List[selectedIndex].Value.Color;
|
||||
Utilities.SwitchAccentColor(newColor);
|
||||
Settings.AppSetting.DisplaySetting.AppAccentColor = newColor;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
174
CampusAppWP8/CampusAppWP8/Pages/Setting/FunctionSettingPage.xaml
Normal file
@@ -0,0 +1,174 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Setting.FunctionSettingPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<!--Pivotsteuerelement-->
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0">
|
||||
<header:DefaultHeader
|
||||
Name="DefHeader"
|
||||
HeaderName="{Binding Path=LocalizedResources.Setting_Function, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
<phone:Pivot Grid.Row="1" Name="SettingFunctionPivot" SelectionChanged="SettingFunctionPivot_SelectionChanged">
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,-36,0,0">
|
||||
<TextBlock Text="{Binding}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
|
||||
<!--Pivotelement eins-->
|
||||
<phone:PivotItem
|
||||
Tag="{Binding Path=Constants.FunctionSetting_Mensa, Source={StaticResource Const}}"
|
||||
Header="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<toolkit:ToggleSwitch
|
||||
Name="AtomMensaToggle"
|
||||
Content="{Binding Path=LocalizedResources.Setting_AtomMensaSelection, Source={StaticResource LocalizedStrings}}"/>
|
||||
<StackPanel >
|
||||
<TextBlock
|
||||
Text="{Binding Path=LocalizedResources.Setting_Mensa, Source={StaticResource LocalizedStrings}}" Style="{StaticResource SettingLabel}"/>
|
||||
<!-- Listpicket of courses -->
|
||||
<toolkit:ListPicker Name="Mensa" 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>
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="{Binding Path=LocalizedResources.SettingToDefault, Source={StaticResource LocalizedStrings}}"
|
||||
Style="{StaticResource SettingLabel}"/>
|
||||
<lui:ToDefaultButton
|
||||
Grid.Column="1"
|
||||
SettingType="{Binding Path=Constants.Setting_AppSetting_FunctionSetting_MensaSetting_Enum, Source={StaticResource Const}}" Height="100"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</phone:PivotItem>
|
||||
|
||||
<!--Pivotelement zwei-->
|
||||
<phone:PivotItem
|
||||
Tag="{Binding Path=Constants.FunctionSetting_TimeTable, Source={StaticResource Const}}"
|
||||
Header="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="{Binding Path=LocalizedResources.SettingToDefault, Source={StaticResource LocalizedStrings}}"
|
||||
Style="{StaticResource SettingLabel}"/>
|
||||
<lui:ToDefaultButton
|
||||
Grid.Column="1"
|
||||
SettingType="{Binding Path=Constants.Setting_AppSetting_FunctionSetting_TimeTableSetting_Enum, Source={StaticResource Const}}" Height="100"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</phone:PivotItem>
|
||||
|
||||
<!--Pivotelement drei-->
|
||||
<phone:PivotItem
|
||||
Tag="{Binding Path=Constants.FunctionSetting_Tag, Source={StaticResource Const}}"
|
||||
Header="{Binding Path=LocalizedResources.Setting_Tag, Source={StaticResource LocalizedStrings}}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<StackPanel>
|
||||
<lui:NavigateButton Content="{Binding Path=LocalizedResources.BTUTag_Title, Source={StaticResource LocalizedStrings}}" Url="{Binding Path=Constants.PathBTUTag_Info, Source={StaticResource Const}}" />
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Margin="12,0,0,0" Text="{Binding Path=LocalizedResources.Setting_TagHandler, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker Name="TagHandler" ExpansionMode="FullScreenOnly" FullModeHeader="{Binding Path=LocalizedResources.ListPickerHeaderTag, 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>
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="{Binding Path=LocalizedResources.SettingToDefault, Source={StaticResource LocalizedStrings}}"
|
||||
Style="{StaticResource SettingLabel}"/>
|
||||
<lui:ToDefaultButton
|
||||
Grid.Column="1"
|
||||
SettingType="{Binding Path=Constants.Setting_AppSetting_FunctionSetting_TagSetting_Enum, Source={StaticResource Const}}" Height="100"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</phone:PivotItem>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Default" Opacity="1.0" >
|
||||
<lui:ResetSettingButtonAppBar Click="ResetSettingButtonAppBar_Click"/>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="FunctionSettingPage.xaml.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the function setting page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> A function setting page. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class FunctionSettingPage : PhoneApplicationPage, IRefreshingPage
|
||||
{
|
||||
#region Member
|
||||
/// <summary> The TagHandler model. </summary>
|
||||
private TagHandlerListPickerItemListModel taghandlerModel;
|
||||
|
||||
/// <summary> List of campus. </summary>
|
||||
private CampusListPickerItemListModel campusList;
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the FunctionSettingPage class. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public FunctionSettingPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.LoadSettings();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary> Refresh page. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWP8.Pages.Setting.IRefreshingPage.RefreshPage()"/>
|
||||
public void RefreshPage()
|
||||
{
|
||||
this.LoadSettings();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
string functionIndex;
|
||||
|
||||
if (NavigationMode.New == e.NavigationMode && NavigationContext.QueryString.TryGetValue(Constants.Param_FunctionSetting_Index, out functionIndex))
|
||||
{
|
||||
this.SetSelectedPivotItem(functionIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
string oldIndex = App.LoadFromIsolatedStorage<string>(Constants.IsolatedStorage_FunctionSettingPageIndex);
|
||||
this.SetSelectedPivotItem(oldIndex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedFrom(e);
|
||||
this.SaveSettings();
|
||||
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
App.SaveToIsolatedStorage<string>(Constants.IsolatedStorage_FunctionSettingPageIndex, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
FrameworkElement uiElement = this.SettingFunctionPivot.SelectedItem as FrameworkElement;
|
||||
if (uiElement != null && uiElement.Tag != null)
|
||||
{
|
||||
App.SaveToIsolatedStorage<string>(Constants.IsolatedStorage_FunctionSettingPageIndex, uiElement.Tag.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary> Sets selected pivot item. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <param name="itemTag"> The item tag. </param>
|
||||
private void SetSelectedPivotItem(string itemTag)
|
||||
{
|
||||
if (itemTag != null)
|
||||
{
|
||||
foreach (FrameworkElement pivotItem in this.SettingFunctionPivot.Items)
|
||||
{
|
||||
if (pivotItem.Tag != null && itemTag.Equals(pivotItem.Tag.ToString()))
|
||||
{
|
||||
this.SettingFunctionPivot.SetValue(Pivot.SelectedItemProperty, pivotItem);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.SettingFunctionPivot.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary> Loads the settings. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
private void LoadSettings()
|
||||
{
|
||||
if (this.taghandlerModel == null)
|
||||
{
|
||||
this.taghandlerModel = new TagHandlerListPickerItemListModel();
|
||||
this.TagHandler.ItemsSource = this.taghandlerModel.List;
|
||||
}
|
||||
|
||||
int tagselIndex = this.taghandlerModel.GetIndexOrDefault(Settings.AppSetting.FunctionSettings.TagSetting.TagDefaultHandler.ToString());
|
||||
this.TagHandler.SelectedIndex = tagselIndex;
|
||||
|
||||
this.AtomMensaToggle.IsChecked = Settings.AppSetting.FunctionSettings.MensaSetting.AtomMensaSelection;
|
||||
|
||||
if (this.campusList == null)
|
||||
{
|
||||
this.campusList = new CampusListPickerItemListModel(true);
|
||||
this.Mensa.ItemsSource = campusList.List;
|
||||
}
|
||||
this.Mensa.SelectedIndex = campusList.GetIndexOrDefault(((int)Settings.AppSetting.FunctionSettings.MensaSetting.DefaultMensa).ToString());
|
||||
|
||||
}
|
||||
|
||||
/// <summary> Saves the settings. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
private void SaveSettings()
|
||||
{
|
||||
Settings.AppSetting.FunctionSettings.TagSetting.TagDefaultHandler = (CampusAppWP8.Model.Setting.BTUTagDefaultHandler)Enum.Parse(typeof(CampusAppWP8.Model.Setting.BTUTagDefaultHandler), ((CampusAppWPortalLib8.Model.Utility.ListPickerItemModel)this.TagHandler.SelectedItem).Value);
|
||||
Settings.AppSetting.FunctionSettings.MensaSetting.AtomMensaSelection = this.AtomMensaToggle.IsChecked.Value;
|
||||
Settings.AppSetting.FunctionSettings.MensaSetting.DefaultMensa = (CampusAppWPortalLib8.Model.Settings.Campus)Enum.Parse(typeof(CampusAppWPortalLib8.Model.Settings.Campus), ((ListPickerItemModel)this.Mensa.SelectedItem).Value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event handler. Called by SettingFunctionPivot for selection changed events.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Selection changed event information. </param>
|
||||
private void SettingFunctionPivot_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
this.SaveSettings();
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by ResetSettingButtonAppBar for click events. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ResetSettingButtonAppBar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.AppSetting.FunctionSettings.SetSettingToDefault();
|
||||
this.LoadSettings();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
18
CampusAppWP8/CampusAppWP8/Pages/Setting/IRefreshingPage.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IRefreshingPage.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Declares the IRefreshingPage interface</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
/// <summary> Interface for refreshing page. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public interface IRefreshingPage
|
||||
{
|
||||
/// <summary> Refresh page. </summary>
|
||||
void RefreshPage();
|
||||
}
|
||||
}
|
||||
@@ -29,33 +29,79 @@
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<StackPanel Margin="12">
|
||||
<TextBlock>Name: BTU Campus-App</TextBlock>
|
||||
<TextBlock>Version: 1.0</TextBlock>
|
||||
<TextBlock>Kontakt:</TextBlock>
|
||||
<Grid Margin="12,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center">Email:</TextBlock>
|
||||
<lui:EmailButton Grid.Row="0" Grid.Column="1" EmailAddress="campusapp@tu-cottbus.de" Height="100" />
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="12">
|
||||
<TextBlock Style="{StaticResource PhoneTextGroupHeaderStyle}">Name</TextBlock>
|
||||
<TextBlock Style="{StaticResource PhoneTextTitle2Style}" Margin="24,0,0,12">BTU CampusApp</TextBlock>
|
||||
<TextBlock Style="{StaticResource PhoneTextGroupHeaderStyle}">Version</TextBlock>
|
||||
<TextBlock Style="{StaticResource PhoneTextTitle2Style}" Margin="24,0,0,12">1.1</TextBlock>
|
||||
<TextBlock Style="{StaticResource PhoneTextGroupHeaderStyle}">Kontakt:</TextBlock>
|
||||
<Grid Margin="12,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource PhoneTextTitle2Style}">Email:</TextBlock>
|
||||
<lui:EmailButton Grid.Row="0" Grid.Column="1" EmailAddress="campusapp@tu-cottbus.de" Height="100" />
|
||||
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Website:</TextBlock>
|
||||
<lui:LinkButton Grid.Row="1" Grid.Column="1" Url="http://www.tu-cottbus.de/btu/de/service/redaktionssystem/?beitrag_id=80012374" Height="100"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource PhoneTextTitle2Style}">Website:</TextBlock>
|
||||
<lui:LinkButton Grid.Row="1" Grid.Column="1" Url="http://www.tu-cottbus.de/btu/de/service/redaktionssystem/?beitrag_id=80012374" Height="100"/>
|
||||
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center">Facebook:</TextBlock>
|
||||
<lui:LinkButton Grid.Row="2" Grid.Column="1" Url="https://www.facebook.com/btucampusapp" Height="100"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource PhoneTextTitle2Style}">Facebook:</TextBlock>
|
||||
<lui:LinkButton Grid.Row="2" Grid.Column="1" Url="https://www.facebook.com/btucampusapp" Height="100"/>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<TextBlock Style="{StaticResource PhoneTextGroupHeaderStyle}">Versionshinweise</TextBlock>
|
||||
<TextBlock Style="{StaticResource PhoneTextTitle2Style}" Margin="24,0,0,12">Version 1.1:</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="36,0,0,0">
|
||||
- neue Funktionen:<LineBreak/>
|
||||
- Stundenplan<LineBreak/>
|
||||
- Wahl der Akzentfarbe<LineBreak/>
|
||||
- Änderungen<LineBreak/>
|
||||
- Überarbeitetes Layout der Startseite<LineBreak/>
|
||||
- Überarbeitetes Einstellungsmenu<LineBreak/>
|
||||
- Überarbeitet Raumübersicht<LineBreak/>
|
||||
</TextBlock>
|
||||
<TextBlock Style="{StaticResource PhoneTextTitle2Style}" Margin="24,0,0,12">Version 1.0.0.1:</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="36,0,0,0">
|
||||
- Bugfixes:<LineBreak/>
|
||||
- Beseitigung eines Fehler beim starten der App<LineBreak/>
|
||||
</TextBlock>
|
||||
<TextBlock Style="{StaticResource PhoneTextTitle2Style}" Margin="24,0,0,12">Version 1.0:</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="36,0,0,0">
|
||||
Initaler Release <LineBreak/>
|
||||
Funktionsübersicht:<LineBreak/>
|
||||
- Vorlesungsverzeichnis (Vorlesungen, Übungen, Prüfungen etc.)<LineBreak/>
|
||||
- Mensaplan<LineBreak/>
|
||||
- Lehrstuhlübersicht<LineBreak/>
|
||||
- Fachschaftenübersicht<LineBreak/>
|
||||
- Prüfungsordnung<LineBreak/>
|
||||
- Personsuche (Mitarbeiter)<LineBreak/>
|
||||
- BTU Webmail<LineBreak/>
|
||||
- Öffnungszeiten<LineBreak/>
|
||||
- Verzeichnis mit nützlichen Links<LineBreak/>
|
||||
- News und Events rund um den Campus<LineBreak/>
|
||||
- mit Text-to-Speech−Funktion<LineBreak/>
|
||||
- Campusplan :<LineBreak/>
|
||||
- Gebäudesuchfunktion<LineBreak/>
|
||||
- Lokalisierung mittles GPS oder BTU-Tag (QR-Codes, NFC-Tags)<LineBreak/>
|
||||
- Ebenenpläne für das IKMZ und MZG<LineBreak/>
|
||||
</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextSubtleStyle}">
|
||||
© 2013 Brandenburgische Technische Universität Cottbus - Senftenberg<LineBreak/>
|
||||
Die "BTU CampusApp" wird vom Multimediazentrum (MMZ) der BTU entwickelt und vertrieben.<LineBreak/>
|
||||
Alle Rechte am Inhalt dieses Informationsangebotes liegen bei der Brandenburgischen Technischen Universität Cottbus - Senftenberg. Die Verwendung der hier veröffentlichten Informationen für BTU-externe Zwecke bedürfen einer Genehmigung.<LineBreak/>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -154,4 +155,9 @@
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Default" Opacity="1.0" >
|
||||
<lui:ResetSettingButtonAppBar Click="ResetSettingButtonAppBar_Click"/>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -115,6 +115,16 @@ namespace CampusAppWP8.Pages.Setting
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by ResetSettingButtonAppBar for click events. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ResetSettingButtonAppBar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.UserProfil.SetSettingToDefault();
|
||||
this.LoadListPicker();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<page:PortraitLandscapePage
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.StartPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -8,11 +8,10 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility.Lui.Page"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
@@ -27,9 +26,8 @@
|
||||
|
||||
<!--Panoramaelement eins-->
|
||||
<phone:PanoramaItem Name="Item1">
|
||||
<ScrollViewer Name="scoller1" Margin="12 -24 12 0">
|
||||
<StackPanel>
|
||||
<lui:NavigateButton Name="TimeTableAppButton" Style="{StaticResource StartPageButtonLong}" Grid.Column="0" Url="{Binding Path=Constants.PathTimeTable_Day, Source={StaticResource Const}}">
|
||||
<StackPanel Margin="12 -24 12 0">
|
||||
<lui:NavigateButton x:Name="TimeTableAppButton" Style="{StaticResource StartPageButtonLong}" Grid.Column="0" Url="{Binding Path=Constants.PathTimeTable_Day, Source={StaticResource Const}}" Click="TimeTable_Click">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyleLong}">
|
||||
<StackPanel Background="{StaticResource PhoneAccentBrush}" Margin="0 0 12 0">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Schedule, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImgLong}"/>
|
||||
@@ -121,14 +119,12 @@
|
||||
</toolkit:ContextMenuService.ContextMenu>
|
||||
</lui:NavigateButton>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</phone:PanoramaItem>
|
||||
|
||||
<!--Panoramaelement zwei-->
|
||||
<phone:PanoramaItem Orientation="Horizontal"
|
||||
Name="Item2">
|
||||
<ScrollViewer Name="scoller2" Margin="12 -24 12 0">
|
||||
<StackPanel>
|
||||
<StackPanel Margin="12 -24 12 0">
|
||||
<Grid Name="Row0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -237,7 +233,7 @@
|
||||
<lui:NavigateButton Name="OpenHoursAppButton" Url="{Binding Path=Constants.PathOpeninghours_OpeninghoursPage, Source={StaticResource Const}}" Grid.Column="1" Style="{StaticResource StartPageButton}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Openhours, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Name="OpenHoursAppButtonText" Text="{Binding Path=LocalizedResources.OpenHoursApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
<TextBlock Name="OpenHoursAppButtonText" Text="{Binding Path=LocalizedResources.OpenHoursApp_Title2, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
<toolkit:ContextMenuService.ContextMenu>
|
||||
<toolkit:ContextMenu>
|
||||
@@ -273,7 +269,6 @@
|
||||
</lui:NavigateButton>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</phone:PanoramaItem>
|
||||
|
||||
<!--Panoramaelement drei
|
||||
@@ -305,23 +300,22 @@
|
||||
</phone:PanoramaItem>-->
|
||||
|
||||
<phone:PanoramaItem Header="Einstellungen" Name="Item3">
|
||||
<ScrollViewer Name="scoller3">
|
||||
<StackPanel Background="{StaticResource PhoneSemitransparentBrush}" VerticalAlignment="Top">
|
||||
<lui:NavigateButton Url="{Binding Path=Constants.PathSetting_User, Source={StaticResource Const}}" BorderThickness="0" HorizontalContentAlignment="Left">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_UserProfilAppBarTitle, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_UserInfo, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Url="{Binding Path=Constants.PathSetting_App, Source={StaticResource Const}}" BorderThickness="0" HorizontalContentAlignment="Left">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_ApplAppBarTitle, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_General, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
</lui:NavigateButton>
|
||||
<!-- <lui:NavigateButton Url="{Binding Path=Constants.PathSetting_App, Source={StaticResource Const}}" BorderThickness="0" HorizontalContentAlignment="Left">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_Other, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
</lui:NavigateButton> -->
|
||||
<lui:NavigateButton Url="{Binding Path=Constants.PathSetting_Impressum, Source={StaticResource Const}}" BorderThickness="0" HorizontalContentAlignment="Left">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Setting_ImpressumTitle, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
</lui:NavigateButton>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</phone:PanoramaItem>
|
||||
|
||||
</phone:Panorama>
|
||||
</Grid>
|
||||
|
||||
|
||||
</page:PortraitLandscapePage>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -12,26 +12,23 @@ namespace CampusAppWP8.Pages
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.Utility;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Pages.TimeTable;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWP8.Utility.Lui.Page;
|
||||
using CampusAppWP8.Utility.Lui.Tiles;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using Windows.Networking.Proximity;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary> Class for the StartPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class StartPage : PortraitLandscapePage
|
||||
public partial class StartPage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
@@ -56,22 +53,16 @@ namespace CampusAppWP8.Pages
|
||||
|
||||
TimeTable.TimeTable.InitFeed();
|
||||
|
||||
|
||||
if (!Settings.AppSetting.InitApp)
|
||||
{
|
||||
this.InitPlaceFile();
|
||||
this.initCourseList = new CourseFeed();
|
||||
this.initCourseList.OnLoaded += new CourseFeed.OnIO(this.StoreCourseFeed);
|
||||
this.initCourseList.LoadData();
|
||||
|
||||
Settings.SetSettingToDefault();
|
||||
this.ShowOptIns();
|
||||
Settings.AppSetting.InitApp = true;
|
||||
|
||||
int appDeploy;
|
||||
bool parseResult = int.TryParse(Constants.DeploymentNumber, out appDeploy);
|
||||
if (parseResult)
|
||||
{
|
||||
Settings.AppSetting.DeploymentNumber = appDeploy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +72,7 @@ namespace CampusAppWP8.Pages
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary> Methods overrides the OnNavigatedTo-Method. </summary>
|
||||
/// <summary> Methods overrides the OnNavigatedTo-Method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
@@ -90,7 +81,7 @@ namespace CampusAppWP8.Pages
|
||||
if (device != null)
|
||||
{
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Methods overrides the OnNavigatedFrom-Method. </summary>
|
||||
@@ -129,7 +120,7 @@ namespace CampusAppWP8.Pages
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void NFCButton_Click(object sender,RoutedEventArgs e)
|
||||
private void NFCButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBoxes.ShowMainModelInfoMessageBox(AppResources.ScarNfc_Search);
|
||||
}
|
||||
@@ -149,13 +140,13 @@ namespace CampusAppWP8.Pages
|
||||
|
||||
if (result == MessageBoxResult.OK)
|
||||
{
|
||||
Settings.AppSetting.GeoWatchEnable = true;
|
||||
Settings.AppSetting.LocatingSetting.GeoWatchEnable = true;
|
||||
Thread thread = new Thread(new ThreadStart(this.PositionThread));
|
||||
thread.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.AppSetting.GeoWatchEnable = false;
|
||||
Settings.AppSetting.LocatingSetting.GeoWatchEnable = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +266,7 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Settings.AppSetting.TagDefaultHandler)
|
||||
switch (Settings.AppSetting.FunctionSettings.TagSetting.TagDefaultHandler)
|
||||
{
|
||||
case BTUTagDefaultHandler.CampusMap:
|
||||
this.GoToCampusMappage(nfcContent);
|
||||
@@ -351,8 +342,29 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
/// <summary> Event handler. Called by TimeTable for click events. </summary>
|
||||
/// <remarks> Fiedler, 26.11.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void TimeTable_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape)
|
||||
|| this.Orientation.Equals(PageOrientation.LandscapeLeft)
|
||||
|| this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
this.TimeTableAppButton.Url = Constants.PathTimeTable_Week;
|
||||
}
|
||||
else
|
||||
if (this.Orientation.Equals(PageOrientation.Portrait)
|
||||
|| this.Orientation.Equals(PageOrientation.PortraitDown)
|
||||
|| this.Orientation.Equals(PageOrientation.PortraitUp))
|
||||
{
|
||||
this.TimeTableAppButton.Url = Constants.PathTimeTable_Day;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,15 @@
|
||||
<!--Duration-->
|
||||
<StackPanel x:Name="StackPanelDuration" Grid.Row="4">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Duration, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker x:Name="InDuration" SelectionChanged="InDuration_SelectionChanged"/>
|
||||
<toolkit:ListPicker x:Name="InDuration" SelectionChanged="InDuration_SelectionChanged">
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<TextBlock Text="{Binding BindsDirectlyToSource=True}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
<!--End date-->
|
||||
<StackPanel x:Name="StackPanelEnd" Grid.Row="5" Visibility="Collapsed">
|
||||
|
||||
@@ -11,15 +11,18 @@
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True"
|
||||
OrientationChanged="PhoneApplicationPage_OrientationChanged">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<phone:Pivot x:Name="ThePivot" Title="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}">
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Day, Mode=OneWay, StringFormat='ddd dd.MM.yy'}"/>
|
||||
<Border BorderThickness="0" MinWidth="360">
|
||||
<TextBlock Text="{Binding Path=Day, Mode=OneWay, StringFormat='ddd dd.MM.yy'}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
|
||||
@@ -22,15 +22,24 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
using CampusAppWP8.Model.TimeTable;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary> A time table day. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class TimeTableDay : PhoneApplicationPage
|
||||
{
|
||||
/// <summary> The pivot item pages. </summary>
|
||||
private static readonly int PIVOT_ITEM_PAGES = 5;
|
||||
/// <summary> The pivot item pages half down. </summary>
|
||||
private static readonly int PIVOT_ITEM_PAGES_HALF_DOWN = 2;
|
||||
|
||||
/// <summary> List of items. </summary>
|
||||
private ObservableCollection<DayViewPageItem> itemList = new ObservableCollection<DayViewPageItem>();
|
||||
|
||||
/// <summary> Zero-based index of the last selected. </summary>
|
||||
private int lastSelectedIndex = 0;
|
||||
|
||||
|
||||
/// <summary> Initializes a new instance of the TimeTableDay class. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
public TimeTableDay()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -73,6 +82,9 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
ApplicationBar.Buttons.Add(addBtn);
|
||||
}
|
||||
|
||||
/// <summary> Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -83,6 +95,22 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
else
|
||||
{
|
||||
string dayStr = string.Empty;
|
||||
|
||||
if (NavigationContext.QueryString.TryGetValue(Constants.ParamDay, out dayStr))
|
||||
{
|
||||
long dayTicks = long.Parse(dayStr);
|
||||
DateTime dayDT = new DateTime(dayTicks);
|
||||
|
||||
dayDT.AddDays(PIVOT_ITEM_PAGES_HALF_DOWN * -1);
|
||||
|
||||
for (int i = 0; i < PIVOT_ITEM_PAGES; i++)
|
||||
{
|
||||
this.itemList[i].Day = dayDT;
|
||||
dayDT = dayDT.AddDays(1);
|
||||
}
|
||||
}
|
||||
|
||||
this.ThePivot.ItemsSource = this.itemList;
|
||||
this.lastSelectedIndex = PIVOT_ITEM_PAGES_HALF_DOWN;
|
||||
this.ThePivot.SelectedIndex = PIVOT_ITEM_PAGES_HALF_DOWN;
|
||||
@@ -91,6 +119,29 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wird aufgerufen, wenn eine Seite nicht mehr die aktive Seite in einem Frame ist.
|
||||
/// </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedFrom(e);
|
||||
|
||||
List<JournalEntry> backStack = new List<JournalEntry>(NavigationService.BackStack);
|
||||
|
||||
if (backStack.Count > 0
|
||||
&& backStack[0].Source.OriginalString.Contains(Constants.PathTimeTable_Day)
|
||||
&& e.Uri.OriginalString.Contains(Constants.PathTimeTable_Week))
|
||||
{
|
||||
NavigationService.RemoveBackEntry();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Event pivot selection changed. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Selection changed event information. </param>
|
||||
private void EventPivotSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
int indexToChange = 0;
|
||||
@@ -122,6 +173,9 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
this.lastSelectedIndex = this.ThePivot.SelectedIndex;
|
||||
}
|
||||
|
||||
/// <summary> Executes the appointment click action. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="model"> The model. </param>
|
||||
private void OnAppointmentClick(AppointmentModel model)
|
||||
{
|
||||
int index = TimeTable.Feed.Model.Appointments.IndexOf(model);
|
||||
@@ -138,6 +192,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Raises the click week event. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickWeek(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathTimeTable_Week, UriKind.Relative);
|
||||
@@ -145,6 +203,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary> Raises the click to day event. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickToDay(object sender, EventArgs e)
|
||||
{
|
||||
int index = -1;
|
||||
@@ -179,6 +241,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Raises the click properties event. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickProperties(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathTimeTable_Properties, UriKind.Relative);
|
||||
@@ -186,6 +252,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary> Raises the click add event. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickAdd(object sender, EventArgs e)
|
||||
{
|
||||
TimeTable.Feed.Model.Appointments.CollectionChanged += this.OnListChanged;
|
||||
@@ -195,6 +265,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary> Raises the notify collection changed event. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnListChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
if (e.Action == NotifyCollectionChangedAction.Add)
|
||||
@@ -236,6 +310,9 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Check appointments. </summary>
|
||||
/// <remarks> Fiedler, 25.11.2013. </remarks>
|
||||
/// <param name="index"> (Optional) zero-based index of the. </param>
|
||||
private void CheckAppointments(int index = -1)
|
||||
{
|
||||
if (index < 0)
|
||||
@@ -268,5 +345,15 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
if(e.Orientation.Equals(PageOrientation.Landscape)
|
||||
|| e.Orientation.Equals(PageOrientation.LandscapeLeft)
|
||||
|| e.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
NavigationService.Navigate(new Uri(Constants.PathTimeTable_Week, UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,10 +11,10 @@
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Landscape" Orientation="Landscape"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Landscape"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True"
|
||||
>
|
||||
OrientationChanged="PhoneApplicationPage_OrientationChanged">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
@@ -34,7 +34,8 @@
|
||||
Appointments="{Binding Path=AppointmentList, Mode=OneWay}"
|
||||
WeekNumber="{Binding Path=WeekNr, Mode=OneWay}"
|
||||
Days="5"
|
||||
ToDayColoring="True"/>
|
||||
ToDayColoring="True"
|
||||
SelectedDay="{Binding Path=SelectedDay, Mode=TwoWay}"/>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
</phone:Pivot>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
namespace CampusAppWP8.Pages.TimeTable
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
@@ -20,15 +22,24 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
using CampusAppWP8.Model.TimeTable;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary> A time table week. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class TimeTableWeek : PhoneApplicationPage
|
||||
{
|
||||
/// <summary> The pivot pages. </summary>
|
||||
private static readonly int PIVOT_PAGES = 3;
|
||||
/// <summary> The pivot pages half down. </summary>
|
||||
private static readonly int PIVOT_PAGES_HALF_DOWN = 1;
|
||||
|
||||
/// <summary> Zero-based index of the last selected. </summary>
|
||||
private int lastSelectedIndex = 0;
|
||||
|
||||
/// <summary> List of items. </summary>
|
||||
private ObservableCollection<WeekViewPageItem> itemList = new ObservableCollection<WeekViewPageItem>();
|
||||
|
||||
/// <summary> Initializes a new instance of the TimeTableWeek class. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
public TimeTableWeek()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -74,6 +85,9 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
ApplicationBar.Buttons.Add(addBtn);
|
||||
}
|
||||
|
||||
/// <summary> Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -92,13 +106,31 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wird aufgerufen, wenn eine Seite nicht mehr die aktive Seite in einem Frame ist.
|
||||
/// </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedFrom(e);
|
||||
|
||||
List<JournalEntry> backStack = new List<JournalEntry>(NavigationService.BackStack);
|
||||
|
||||
if (backStack.Count > 0
|
||||
&& backStack[0].Source.OriginalString.Contains(Constants.PathTimeTable_Week)
|
||||
&& e.Uri.OriginalString.Contains(Constants.PathTimeTable_Day))
|
||||
{
|
||||
NavigationService.RemoveBackEntry();
|
||||
}
|
||||
|
||||
TimeTable.Feed.SaveData();
|
||||
}
|
||||
|
||||
/// <summary> Gets the first day of week. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="dayInWeek"> The day in week Date/Time. </param>
|
||||
/// <returns> The first day of week. </returns>
|
||||
private DateTime GetFirstDayOfWeek(DateTime dayInWeek)
|
||||
{
|
||||
DateTime retValue = dayInWeek.Date;
|
||||
@@ -111,6 +143,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary> Gets week number. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="date"> The date Date/Time. </param>
|
||||
/// <returns> The week number. </returns>
|
||||
private int GetWeekNumber(DateTime date)
|
||||
{
|
||||
int retValue = 0;
|
||||
@@ -121,6 +157,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary> Gets day of week index. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="dayInWeek"> The day in week Date/Time. </param>
|
||||
/// <returns> The day of week index. </returns>
|
||||
private int GetDayOfWeekIndex(DateTime dayInWeek)
|
||||
{
|
||||
int retValue = -1;
|
||||
@@ -139,6 +179,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary> Raises the click day view event. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickDayView(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathTimeTable_Day, UriKind.Relative);
|
||||
@@ -146,6 +190,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary> Raises the click today event. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickToday(object sender, EventArgs e)
|
||||
{
|
||||
DateTime firstDay = this.GetFirstDayOfWeek(DateTime.Now);
|
||||
@@ -183,6 +231,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Raises the click properties event. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickProperties(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathTimeTable_Properties, UriKind.Relative);
|
||||
@@ -190,6 +242,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary> Raises the click create event. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnClickCreate(object sender, EventArgs e)
|
||||
{
|
||||
TimeTable.Feed.Model.Appointments.CollectionChanged += new NotifyCollectionChangedEventHandler(this.OnListChanged);
|
||||
@@ -199,6 +255,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary> Raises the selection changed event. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnPivotSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
int delta = this.ThePivot.SelectedIndex - this.lastSelectedIndex;
|
||||
@@ -225,6 +285,9 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
this.lastSelectedIndex = this.ThePivot.SelectedIndex;
|
||||
}
|
||||
|
||||
/// <summary> Executes the appointment click action. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="model"> The model. </param>
|
||||
private void OnAppointmentClick(AppointmentModel model)
|
||||
{
|
||||
int index = TimeTable.Feed.Model.Appointments.IndexOf(model);
|
||||
@@ -241,6 +304,10 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Raises the notify collection changed event. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnListChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
AppointmentModel tempModel = null;
|
||||
@@ -273,6 +340,12 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Check appointments. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <exception cref="NullReferenceException">
|
||||
/// Thrown when a value was unexpectedly null.
|
||||
/// </exception>
|
||||
/// <param name="pageIndex"> (Optional) zero-based index of the page. </param>
|
||||
private void CheckAppointments(int pageIndex = -1)
|
||||
{
|
||||
if (TimeTable.Feed == null)
|
||||
@@ -318,5 +391,23 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
if (e.Orientation.Equals(PageOrientation.Portrait)
|
||||
|| e.Orientation.Equals(PageOrientation.PortraitDown)
|
||||
|| e.Orientation.Equals(PageOrientation.PortraitUp))
|
||||
{
|
||||
string url = Constants.PathTimeTable_Day;
|
||||
|
||||
if ((this.ThePivot.SelectedItem as WeekViewPageItem).SelectedDay.Date.Equals(DateTime.MinValue.Date) == false)
|
||||
{
|
||||
url += "?" + Constants.ParamDay + "=" + (this.ThePivot.SelectedItem as WeekViewPageItem).SelectedDay.Ticks.ToString();
|
||||
}
|
||||
|
||||
Uri newUri = new Uri(url , UriKind.Relative);
|
||||
NavigationService.Navigate(newUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,9 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
/// <summary> List of appointments. </summary>
|
||||
private ObservableCollection<AppointmentModel> appointmentList = null;
|
||||
|
||||
/// <summary> The selected day. </summary>
|
||||
private DateTime selectedDay = DateTime.MinValue;
|
||||
|
||||
/// <summary> Tritt ein, wenn sich ein Eigenschaftswert ändert. </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
@@ -149,6 +152,21 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the selected day. </summary>
|
||||
/// <value> The selected day. </value>
|
||||
public DateTime SelectedDay
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.selectedDay;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.selectedDay = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Notifies a property changed. </summary>
|
||||
/// <remarks> Fiedler, 06.11.2013. </remarks>
|
||||
/// <param name="info"> The information. </param>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<TemplateCycle>
|
||||
<SmallImageURI IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</SmallImageURI>
|
||||
<Title>BTU CampusApp</Title>
|
||||
<Photo01ImageURI IsRelative="true" IsResource="false">Assets\Slides\Slide1.jpg</Photo01ImageURI>
|
||||
<Photo02ImageURI IsRelative="true" IsResource="false">Assets\Slides\Slide2.jpg</Photo02ImageURI>
|
||||
<Photo01ImageURI IsRelative="true" IsResource="false">Assets\Slides\Slide2.jpg</Photo01ImageURI>
|
||||
<Photo02ImageURI IsRelative="true" IsResource="false">Assets\Slides\Slide1.jpg</Photo02ImageURI>
|
||||
<Photo03ImageURI IsRelative="true" IsResource="false">Assets\Slides\Slide3.jpg</Photo03ImageURI>
|
||||
<Photo04ImageURI IsRelative="true" IsResource="false">Assets\Slides\Slide4.jpg</Photo04ImageURI>
|
||||
<Photo05ImageURI IsRelative="true" IsResource="false">Assets\Slides\Slide5.jpg</Photo05ImageURI>
|
||||
|
||||
@@ -60,6 +60,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Akzentfarbe ähnelt.
|
||||
/// </summary>
|
||||
public static string AccentColor {
|
||||
get {
|
||||
return ResourceManager.GetString("AccentColor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Akzentfarbe-Auswahl ähnelt.
|
||||
/// </summary>
|
||||
public static string AccentColorPicker {
|
||||
get {
|
||||
return ResourceManager.GetString("AccentColorPicker", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Hinzufügen ähnelt.
|
||||
/// </summary>
|
||||
@@ -1131,6 +1149,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die zurück-setzen ähnelt.
|
||||
/// </summary>
|
||||
public static string ResetBtn {
|
||||
get {
|
||||
return ResourceManager.GetString("ResetBtn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt.
|
||||
/// </summary>
|
||||
@@ -1158,6 +1185,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Räume ähnelt.
|
||||
/// </summary>
|
||||
public static string Rooms {
|
||||
get {
|
||||
return ResourceManager.GetString("Rooms", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Beispielwert für die Laufzeiteigenschaft ähnelt.
|
||||
/// </summary>
|
||||
@@ -1203,15 +1239,6 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die App-Einstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_ApplAppBarTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_ApplAppBarTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Nur mit Wlan laden ähnelt.
|
||||
/// </summary>
|
||||
@@ -1222,7 +1249,61 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Über BTU Campus-App ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die autom. Mensa-Auswahl ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AtomMensaSelection {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AtomMensaSelection", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Darstellung ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Display_Short {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Display_Short", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Funktionseinstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Function {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Function", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Funktionen ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Function_Short {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Function_Short", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Allgemeine Einstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_General {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_General", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ort. & Netz ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_GeneralNetwork {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_GeneralNetwork", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Über BTU CampusApp ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_ImpressumTitle {
|
||||
get {
|
||||
@@ -1230,6 +1311,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Mensa ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Mensa {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Mensa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Sonstige Einstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Other {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Other", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die BTU-Tag ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Tag {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Tag", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die BTU-Tag-Standardfunktion ähnelt.
|
||||
/// </summary>
|
||||
@@ -1303,11 +1411,11 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Profileinstellungen ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Persönliche Einstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_UserProfilAppBarTitle {
|
||||
public static string Setting_UserInfo {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_UserProfilAppBarTitle", resourceCulture);
|
||||
return ResourceManager.GetString("Setting_UserInfo", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1329,6 +1437,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Einstellung zurücksetzen ähnelt.
|
||||
/// </summary>
|
||||
public static string SettingToDefault {
|
||||
get {
|
||||
return ResourceManager.GetString("SettingToDefault", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die klein ähnelt.
|
||||
/// </summary>
|
||||
@@ -1571,5 +1688,23 @@ namespace CampusAppWP8.Resources {
|
||||
return ResourceManager.GetString("When", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Zoom + ähnelt.
|
||||
/// </summary>
|
||||
public static string ZoomIn {
|
||||
get {
|
||||
return ResourceManager.GetString("ZoomIn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Zoom - ähnelt.
|
||||
/// </summary>
|
||||
public static string ZoomOut {
|
||||
get {
|
||||
return ResourceManager.GetString("ZoomOut", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,8 +293,8 @@
|
||||
<data name="Setting_UserDegree" xml:space="preserve">
|
||||
<value>Abschluss</value>
|
||||
</data>
|
||||
<data name="Setting_UserProfilAppBarTitle" xml:space="preserve">
|
||||
<value>Profileinstellungen</value>
|
||||
<data name="Setting_UserInfo" xml:space="preserve">
|
||||
<value>Persönliche Einstellungen</value>
|
||||
</data>
|
||||
<data name="Setting_UserRole" xml:space="preserve">
|
||||
<value>Rolle</value>
|
||||
@@ -332,8 +332,8 @@
|
||||
<data name="Setting_AppGeoWatch" xml:space="preserve">
|
||||
<value>Ortung</value>
|
||||
</data>
|
||||
<data name="Setting_ApplAppBarTitle" xml:space="preserve">
|
||||
<value>App-Einstellungen</value>
|
||||
<data name="Setting_General" xml:space="preserve">
|
||||
<value>Allgemeine Einstellungen</value>
|
||||
</data>
|
||||
<data name="MsgBox_ErrorCampusLoc" xml:space="preserve">
|
||||
<value>Der aktuelle Campus konnte nicht ermittelt werden. Es wird der im Profil festgelegten Campus verwendet.</value>
|
||||
@@ -570,7 +570,7 @@
|
||||
<value>BTU-Tag-Standardfunktion</value>
|
||||
</data>
|
||||
<data name="Setting_ImpressumTitle" xml:space="preserve">
|
||||
<value>Über BTU Campus-App</value>
|
||||
<value>Über BTU CampusApp</value>
|
||||
</data>
|
||||
<data name="BTUTag_WrongTag" xml:space="preserve">
|
||||
<value>Der eingescannte Tag ist kein BTU-Tag</value>
|
||||
@@ -617,10 +617,55 @@
|
||||
<data name="MensaApp_Weekplan" xml:space="preserve">
|
||||
<value>Wochenplan</value>
|
||||
</data>
|
||||
<data name="ZoomIn" xml:space="preserve">
|
||||
<value>Zoom +</value>
|
||||
</data>
|
||||
<data name="ZoomOut" xml:space="preserve">
|
||||
<value>Zoom -</value>
|
||||
</data>
|
||||
<data name="Setting_TagHandlerDate" xml:space="preserve">
|
||||
<value>Termin erstellen</value>
|
||||
</data>
|
||||
<data name="LectureApp_LectureDates" xml:space="preserve">
|
||||
<value>Veranstaltungstermine</value>
|
||||
</data>
|
||||
<data name="Rooms" xml:space="preserve">
|
||||
<value>Räume</value>
|
||||
</data>
|
||||
<data name="Setting_AtomMensaSelection" xml:space="preserve">
|
||||
<value>autom. Mensa-Auswahl</value>
|
||||
</data>
|
||||
<data name="Setting_Function" xml:space="preserve">
|
||||
<value>Funktionseinstellungen</value>
|
||||
</data>
|
||||
<data name="Setting_GeneralNetwork" xml:space="preserve">
|
||||
<value>Ort. & Netz</value>
|
||||
</data>
|
||||
<data name="Setting_Other" xml:space="preserve">
|
||||
<value>Sonstige Einstellungen</value>
|
||||
</data>
|
||||
<data name="Setting_Tag" xml:space="preserve">
|
||||
<value>BTU-Tag</value>
|
||||
</data>
|
||||
<data name="ResetBtn" xml:space="preserve">
|
||||
<value>zurück-setzen</value>
|
||||
</data>
|
||||
<data name="SettingToDefault" xml:space="preserve">
|
||||
<value>Einstellung zurücksetzen</value>
|
||||
</data>
|
||||
<data name="Setting_Display_Short" xml:space="preserve">
|
||||
<value>Darstellung</value>
|
||||
</data>
|
||||
<data name="Setting_Function_Short" xml:space="preserve">
|
||||
<value>Funktionen</value>
|
||||
</data>
|
||||
<data name="Setting_Mensa" xml:space="preserve">
|
||||
<value>Mensa</value>
|
||||
</data>
|
||||
<data name="AccentColor" xml:space="preserve">
|
||||
<value>Akzentfarbe</value>
|
||||
</data>
|
||||
<data name="AccentColorPicker" xml:space="preserve">
|
||||
<value>Akzentfarbe-Auswahl</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -274,7 +274,7 @@
|
||||
<value>767</value>
|
||||
</data>
|
||||
<data name="Setting_DefaultSemester" xml:space="preserve">
|
||||
<value>20131</value>
|
||||
<value>20132</value>
|
||||
</data>
|
||||
<data name="Valid_FirstSemseter" xml:space="preserve">
|
||||
<value>20121</value>
|
||||
@@ -609,6 +609,9 @@
|
||||
<data name="UrlMensaPrice" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/canteens.php?v=1</value>
|
||||
</data>
|
||||
<data name="PisInformationValue_Entrance" xml:space="preserve">
|
||||
<value>Zugangsbereich</value>
|
||||
</data>
|
||||
<data name="ParamIsoKey" xml:space="preserve">
|
||||
<value>isolated</value>
|
||||
</data>
|
||||
@@ -621,4 +624,103 @@
|
||||
<data name="PathSetting_Impressum" xml:space="preserve">
|
||||
<value>/Pages/Setting/Impressum.xaml</value>
|
||||
</data>
|
||||
<data name="AppSetting_MensaSetting_AtomMensaSelection" xml:space="preserve">
|
||||
<value>AtomMensaSelection</value>
|
||||
</data>
|
||||
<data name="FunctionSetting_Mensa" xml:space="preserve">
|
||||
<value>Mensafunction</value>
|
||||
</data>
|
||||
<data name="FunctionSetting_Tag" xml:space="preserve">
|
||||
<value>Tagfunction</value>
|
||||
</data>
|
||||
<data name="FunctionSetting_TimeTable" xml:space="preserve">
|
||||
<value>TimeTablefunction</value>
|
||||
</data>
|
||||
<data name="IsolatedStorage_FunctionSettingPageIndex" xml:space="preserve">
|
||||
<value>FunctionSettingPageIndex</value>
|
||||
</data>
|
||||
<data name="IsolatedStorage_GeneralSettingPageIndex" xml:space="preserve">
|
||||
<value>GeneralSettingPageIndex</value>
|
||||
</data>
|
||||
<data name="Param_FunctionSetting_Index" xml:space="preserve">
|
||||
<value>FunctionSettingIndex</value>
|
||||
</data>
|
||||
<data name="PathSetting_Function" xml:space="preserve">
|
||||
<value>/Pages/Setting/FunctionSettingPage.xaml</value>
|
||||
</data>
|
||||
<data name="Settingt_UserSetting_Enum" xml:space="preserve">
|
||||
<value>UserSetting</value>
|
||||
</data>
|
||||
<data name="Setting_AppSetting_Enum" xml:space="preserve">
|
||||
<value>AppSetting</value>
|
||||
</data>
|
||||
<data name="Setting_AppSetting_LocatingSetting_Enum" xml:space="preserve">
|
||||
<value>Appsetting_Locatingsetting</value>
|
||||
</data>
|
||||
<data name="Setting_AppSetting_NetworkSetting_Enum" xml:space="preserve">
|
||||
<value>Appsetting_Networksetting</value>
|
||||
</data>
|
||||
<data name="Setting_AppSetting_FunctionSetting_Enum" xml:space="preserve">
|
||||
<value>Appsetting_Functionsetting</value>
|
||||
</data>
|
||||
<data name="Setting_AppSetting_FunctionSetting_MensaSetting_Enum" xml:space="preserve">
|
||||
<value>Appsetting_Functionsetting_Mensasetting</value>
|
||||
</data>
|
||||
<data name="Setting_AppSetting_FunctionSetting_TagSetting_Enum" xml:space="preserve">
|
||||
<value>Appsetting_Functionsetting_Tagsetting</value>
|
||||
</data>
|
||||
<data name="Setting_AppSetting_FunctionSetting_TimeTableSetting_Enum" xml:space="preserve">
|
||||
<value>Appsetting_Functionsetting_TimeTablesetting</value>
|
||||
</data>
|
||||
<data name="Setting_Enum" xml:space="preserve">
|
||||
<value>Setting</value>
|
||||
</data>
|
||||
<data name="Setting_Mensa_DefaultCampus" xml:space="preserve">
|
||||
<value>MensaDefaultCampus</value>
|
||||
</data>
|
||||
<data name="ParamDay" xml:space="preserve">
|
||||
<value>paramday</value>
|
||||
</data>
|
||||
<data name="Setting_AppAccentColor" xml:space="preserve">
|
||||
<value>AppAccentColor</value>
|
||||
</data>
|
||||
<data name="Setting_PhoneAccentColor" xml:space="preserve">
|
||||
<value>PhoneAccentColor</value>
|
||||
</data>
|
||||
<data name="Brush_Faculty1" xml:space="preserve">
|
||||
<value>FacultyBrush1</value>
|
||||
</data>
|
||||
<data name="Brush_Faculty2" xml:space="preserve">
|
||||
<value>FacultyBrush2</value>
|
||||
</data>
|
||||
<data name="Brush_Faculty3" xml:space="preserve">
|
||||
<value>FacultyBrush3</value>
|
||||
</data>
|
||||
<data name="Brush_Faculty4" xml:space="preserve">
|
||||
<value>FacultyBrush4</value>
|
||||
</data>
|
||||
<data name="Brush_Faculty5" xml:space="preserve">
|
||||
<value>FacultyBrush5</value>
|
||||
</data>
|
||||
<data name="Brush_PhoneAccent" xml:space="preserve">
|
||||
<value>PhoneAccentBrush</value>
|
||||
</data>
|
||||
<data name="Color_Faculty1" xml:space="preserve">
|
||||
<value>FacultyColor1</value>
|
||||
</data>
|
||||
<data name="Color_Faculty2" xml:space="preserve">
|
||||
<value>FacultyColor2</value>
|
||||
</data>
|
||||
<data name="Color_Faculty3" xml:space="preserve">
|
||||
<value>FacultyColor3</value>
|
||||
</data>
|
||||
<data name="Color_Faculty4" xml:space="preserve">
|
||||
<value>FacultyColor4</value>
|
||||
</data>
|
||||
<data name="Color_Faculty5" xml:space="preserve">
|
||||
<value>FacultyColor5</value>
|
||||
</data>
|
||||
<data name="Color_PhoneAccent" xml:space="preserve">
|
||||
<value>PhoneAccentColor</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -150,6 +150,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die AtomMensaSelection ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_MensaSetting_AtomMensaSelection {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_MensaSetting_AtomMensaSelection", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die OnlyWifi ähnelt.
|
||||
/// </summary>
|
||||
@@ -195,6 +204,60 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyBrush1 ähnelt.
|
||||
/// </summary>
|
||||
public static string Brush_Faculty1 {
|
||||
get {
|
||||
return ResourceManager.GetString("Brush_Faculty1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyBrush2 ähnelt.
|
||||
/// </summary>
|
||||
public static string Brush_Faculty2 {
|
||||
get {
|
||||
return ResourceManager.GetString("Brush_Faculty2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyBrush3 ähnelt.
|
||||
/// </summary>
|
||||
public static string Brush_Faculty3 {
|
||||
get {
|
||||
return ResourceManager.GetString("Brush_Faculty3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyBrush4 ähnelt.
|
||||
/// </summary>
|
||||
public static string Brush_Faculty4 {
|
||||
get {
|
||||
return ResourceManager.GetString("Brush_Faculty4", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyBrush5 ähnelt.
|
||||
/// </summary>
|
||||
public static string Brush_Faculty5 {
|
||||
get {
|
||||
return ResourceManager.GetString("Brush_Faculty5", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die PhoneAccentBrush ähnelt.
|
||||
/// </summary>
|
||||
public static string Brush_PhoneAccent {
|
||||
get {
|
||||
return ResourceManager.GetString("Brush_PhoneAccent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die BTU-CampusApp ähnelt.
|
||||
/// </summary>
|
||||
@@ -213,6 +276,60 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyColor1 ähnelt.
|
||||
/// </summary>
|
||||
public static string Color_Faculty1 {
|
||||
get {
|
||||
return ResourceManager.GetString("Color_Faculty1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyColor2 ähnelt.
|
||||
/// </summary>
|
||||
public static string Color_Faculty2 {
|
||||
get {
|
||||
return ResourceManager.GetString("Color_Faculty2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyColor3 ähnelt.
|
||||
/// </summary>
|
||||
public static string Color_Faculty3 {
|
||||
get {
|
||||
return ResourceManager.GetString("Color_Faculty3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyColor4 ähnelt.
|
||||
/// </summary>
|
||||
public static string Color_Faculty4 {
|
||||
get {
|
||||
return ResourceManager.GetString("Color_Faculty4", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FacultyColor5 ähnelt.
|
||||
/// </summary>
|
||||
public static string Color_Faculty5 {
|
||||
get {
|
||||
return ResourceManager.GetString("Color_Faculty5", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die PhoneAccentColor ähnelt.
|
||||
/// </summary>
|
||||
public static string Color_PhoneAccent {
|
||||
get {
|
||||
return ResourceManager.GetString("Color_PhoneAccent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 8 ähnelt.
|
||||
/// </summary>
|
||||
@@ -438,6 +555,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Mensafunction ähnelt.
|
||||
/// </summary>
|
||||
public static string FunctionSetting_Mensa {
|
||||
get {
|
||||
return ResourceManager.GetString("FunctionSetting_Mensa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Tagfunction ähnelt.
|
||||
/// </summary>
|
||||
public static string FunctionSetting_Tag {
|
||||
get {
|
||||
return ResourceManager.GetString("FunctionSetting_Tag", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die TimeTablefunction ähnelt.
|
||||
/// </summary>
|
||||
public static string FunctionSetting_TimeTable {
|
||||
get {
|
||||
return ResourceManager.GetString("FunctionSetting_TimeTable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die CurrentPositionPoint ähnelt.
|
||||
/// </summary>
|
||||
@@ -492,6 +636,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FunctionSettingPageIndex ähnelt.
|
||||
/// </summary>
|
||||
public static string IsolatedStorage_FunctionSettingPageIndex {
|
||||
get {
|
||||
return ResourceManager.GetString("IsolatedStorage_FunctionSettingPageIndex", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die GeneralSettingPageIndex ähnelt.
|
||||
/// </summary>
|
||||
public static string IsolatedStorage_GeneralSettingPageIndex {
|
||||
get {
|
||||
return ResourceManager.GetString("IsolatedStorage_GeneralSettingPageIndex", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die LectureAppointment ähnelt.
|
||||
/// </summary>
|
||||
@@ -645,6 +807,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die FunctionSettingIndex ähnelt.
|
||||
/// </summary>
|
||||
public static string Param_FunctionSetting_Index {
|
||||
get {
|
||||
return ResourceManager.GetString("Param_FunctionSetting_Index", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die BuildingId ähnelt.
|
||||
/// </summary>
|
||||
@@ -654,6 +825,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die paramday ähnelt.
|
||||
/// </summary>
|
||||
public static string ParamDay {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamDay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
|
||||
/// </summary>
|
||||
@@ -1050,6 +1230,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Setting/FunctionSettingPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
public static string PathSetting_Function {
|
||||
get {
|
||||
return ResourceManager.GetString("PathSetting_Function", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Setting/Impressum.xaml ähnelt.
|
||||
/// </summary>
|
||||
@@ -1275,6 +1464,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Zugangsbereich ähnelt.
|
||||
/// </summary>
|
||||
public static string PisInformationValue_Entrance {
|
||||
get {
|
||||
return ResourceManager.GetString("PisInformationValue_Entrance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die pid ähnelt.
|
||||
/// </summary>
|
||||
@@ -1302,6 +1500,78 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die AppAccentColor ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppAccentColor {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppAccentColor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die AppSetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Appsetting_Functionsetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppSetting_FunctionSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppSetting_FunctionSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Appsetting_Functionsetting_Mensasetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppSetting_FunctionSetting_MensaSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppSetting_FunctionSetting_MensaSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Appsetting_Functionsetting_Tagsetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppSetting_FunctionSetting_TagSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppSetting_FunctionSetting_TagSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Appsetting_Functionsetting_TimeTablesetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppSetting_FunctionSetting_TimeTableSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppSetting_FunctionSetting_TimeTableSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Appsetting_Locatingsetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppSetting_LocatingSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppSetting_LocatingSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Appsetting_Networksetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppSetting_NetworkSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppSetting_NetworkSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 767 ähnelt.
|
||||
/// </summary>
|
||||
@@ -1312,7 +1582,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 20131 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 20132 ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_DefaultSemester {
|
||||
get {
|
||||
@@ -1320,6 +1590,42 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Setting ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die MensaDefaultCampus ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_Mensa_DefaultCampus {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_Mensa_DefaultCampus", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die PhoneAccentColor ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_PhoneAccentColor {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_PhoneAccentColor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die UserSetting ähnelt.
|
||||
/// </summary>
|
||||
public static string Settingt_UserSetting_Enum {
|
||||
get {
|
||||
return ResourceManager.GetString("Settingt_UserSetting_Enum", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 1 ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -66,6 +66,17 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Cancel icon.
|
||||
/// </summary>
|
||||
public static string Cancel
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("cancel_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Cow icon.
|
||||
/// </summary>
|
||||
@@ -121,6 +132,17 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Edit icon.
|
||||
/// </summary>
|
||||
public static string Edit
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("edit_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Events icon.
|
||||
/// </summary>
|
||||
@@ -407,6 +429,17 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Reset icon.
|
||||
/// </summary>
|
||||
public static string Reset
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("reset_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Schedule icon.
|
||||
/// </summary>
|
||||
@@ -451,6 +484,39 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Setting icon.
|
||||
/// </summary>
|
||||
public static string Setting
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("prefs2_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the ShowDay icon.
|
||||
/// </summary>
|
||||
public static string ShowDay
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("showDay_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the ShowWeek icon.
|
||||
/// </summary>
|
||||
public static string ShowWeek
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("showWeek_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the StudentCouncil icon.
|
||||
/// </summary>
|
||||
@@ -517,6 +583,28 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the ZoomIn icon.
|
||||
/// </summary>
|
||||
public static string ZoomIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("zoomin_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the ZoomOut icon.
|
||||
/// </summary>
|
||||
public static string ZoomOut
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("zoomout_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the theme depending string of a icon.
|
||||
/// </summary>
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
<data name="Campus" xml:space="preserve">
|
||||
<value>campus_159.png</value>
|
||||
</data>
|
||||
<data name="Cancel" xml:space="preserve">
|
||||
<value>cancel_159.png</value>
|
||||
</data>
|
||||
<data name="Cow" xml:space="preserve">
|
||||
<value>steak_159.png</value>
|
||||
</data>
|
||||
@@ -144,6 +147,9 @@
|
||||
<data name="Departments" xml:space="preserve">
|
||||
<value>lehrstuehle_159.png</value>
|
||||
</data>
|
||||
<data name="Edit" xml:space="preserve">
|
||||
<value>edit_159.png</value>
|
||||
</data>
|
||||
<data name="Events" xml:space="preserve">
|
||||
<value>events_159.png</value>
|
||||
</data>
|
||||
@@ -222,6 +228,9 @@
|
||||
<data name="Practise" xml:space="preserve">
|
||||
<value>practise_159.png</value>
|
||||
</data>
|
||||
<data name="Reset" xml:space="preserve">
|
||||
<value>reset_159.png</value>
|
||||
</data>
|
||||
<data name="Schedule" xml:space="preserve">
|
||||
<value>schedule_159.png</value>
|
||||
</data>
|
||||
@@ -234,6 +243,15 @@
|
||||
<data name="Seminar" xml:space="preserve">
|
||||
<value>seminar_159.png</value>
|
||||
</data>
|
||||
<data name="Setting" xml:space="preserve">
|
||||
<value>prefs2_159.png</value>
|
||||
</data>
|
||||
<data name="ShowDay" xml:space="preserve">
|
||||
<value>showDay_159.png</value>
|
||||
</data>
|
||||
<data name="ShowWeek" xml:space="preserve">
|
||||
<value>showWeek_159.png</value>
|
||||
</data>
|
||||
<data name="StudentCouncil" xml:space="preserve">
|
||||
<value>student_council_159.png</value>
|
||||
</data>
|
||||
@@ -252,4 +270,10 @@
|
||||
<data name="Wild" xml:space="preserve">
|
||||
<value>wild dish_159.png</value>
|
||||
</data>
|
||||
<data name="ZoomIn" xml:space="preserve">
|
||||
<value>zoomin_159.png</value>
|
||||
</data>
|
||||
<data name="ZoomOut" xml:space="preserve">
|
||||
<value>zoomout_159.png</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,39 +1,36 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="Settings.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>23.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements the settings class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8
|
||||
{
|
||||
using System;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Class handle all setting (files)
|
||||
/// </summary>
|
||||
/// <summary> Class handle all setting (files) </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
||||
public static class Settings
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// reference of the user-profile-file
|
||||
/// </summary>
|
||||
/// <summary> reference of the user-profile-file. </summary>
|
||||
private static UserProfilModel userProfil = new UserProfilModel();
|
||||
|
||||
/// <summary>
|
||||
/// reference of the appSettings
|
||||
/// </summary>
|
||||
/// <summary> reference of the appSettings. </summary>
|
||||
private static AppSettings appSetting = new AppSettings();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user-profile-file
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the user-profile-file. </summary>
|
||||
/// <value> The user profile. </value>
|
||||
public static UserProfilModel UserProfil
|
||||
{
|
||||
get
|
||||
@@ -50,9 +47,8 @@ namespace CampusAppWP8
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the AppSetting
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the AppSetting. </summary>
|
||||
/// <value> The application setting. </value>
|
||||
public static AppSettings AppSetting
|
||||
{
|
||||
get
|
||||
@@ -70,5 +66,65 @@ namespace CampusAppWP8
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public static void SetSettingToDefault()
|
||||
{
|
||||
Settings.AppSetting.SetSettingToDefault();
|
||||
Settings.UserProfil.SetSettingToDefault();
|
||||
}
|
||||
|
||||
/// <summary> Sets setting to default. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <param name="settingKey"> The setting key. </param>
|
||||
public static void SetSettingToDefault(string settingKey)
|
||||
{
|
||||
SettingType type = (SettingType)Enum.Parse(typeof(SettingType), settingKey);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case SettingType.Appsetting:
|
||||
AppSetting.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.UserSetting:
|
||||
UserProfil.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.Appsetting_Functionsetting:
|
||||
AppSetting.FunctionSettings.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.Appsetting_Locatingsetting:
|
||||
|
||||
// spezial case
|
||||
AppSetting.LocatingSetting.SetSettingToDefault();
|
||||
AppSetting.NetworkSetting.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.Appsetting_Networksetting:
|
||||
|
||||
// spezial case
|
||||
AppSetting.LocatingSetting.SetSettingToDefault();
|
||||
AppSetting.NetworkSetting.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.Appsetting_Functionsetting_Mensasetting:
|
||||
AppSetting.FunctionSettings.MensaSetting.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.Appsetting_Functionsetting_Tagsetting:
|
||||
AppSetting.FunctionSettings.TagSetting.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.Appsetting_Functionsetting_TimeTablesetting:
|
||||
AppSetting.FunctionSettings.TimeTableSetting.SetSettingToDefault();
|
||||
break;
|
||||
case SettingType.Setting:
|
||||
Settings.SetSettingToDefault();
|
||||
break;
|
||||
default:
|
||||
Settings.SetSettingToDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
13
CampusAppWP8/CampusAppWP8/Styles/Labels.xaml
Normal file
@@ -0,0 +1,13 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
mc:Ignorable="d">
|
||||
<Style x:Key="SettingLabel" TargetType="TextBlock">
|
||||
<Setter Property="FontWeight" Value="Light"/>
|
||||
<Setter Property="FontSize" Value="32"/>
|
||||
<Setter Property="Margin" Value="12,0,0,0"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -22,8 +22,8 @@
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="Width" Value="200"/>
|
||||
<Setter Property="Height" Value="200"/>
|
||||
<Setter Property="Width" Value="193"/>
|
||||
<Setter Property="Height" Value="193"/>
|
||||
<Setter Property="toolkit:TiltEffect.IsTiltEnabled" Value="True"/>
|
||||
</Style>
|
||||
<Style x:Key="StartPageButtonLong" TargetType="Button">
|
||||
|
||||
16
CampusAppWP8/CampusAppWP8/Styles/UniColors.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:System="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<Color x:Key="FacultyColor1">#d20078</Color>
|
||||
<Color x:Key="FacultyColor2">#0050a0</Color>
|
||||
<Color x:Key="FacultyColor3">#009bd2</Color>
|
||||
<Color x:Key="FacultyColor4">#a5c300</Color>
|
||||
<Color x:Key="FacultyColor5">#ff9900</Color>
|
||||
<SolidColorBrush x:Key="FacultyBrush1">#d20078</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="FacultyBrush2">#0050a0</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="FacultyBrush3">#009bd2</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="FacultyBrush4">#a5c300</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="FacultyBrush5">#ff9900</SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements to visibility converter class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
namespace CampusAppWP8.Utility.Converter
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
@@ -0,0 +1,41 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DoubleNaNConverter.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Fiedler</author>
|
||||
// <date>22.11.2013</date>
|
||||
// <summary>Implements the double na n converter class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Converter
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
/// <summary> A double na n converter. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="T:System.Windows.Data.IValueConverter"/>
|
||||
public sealed class DoubleNaNConverter : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Ändert die Quelldaten vor der Übergabe an das Ziel zur Anzeige in der Benutzeroberfläche.
|
||||
/// </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Data.IValueConverter.Convert(object,Type,object,System.Globalization.CultureInfo)"/>
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return (value is double && value.Equals(double.NaN) == false) ? value : 0.0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ändert die Zieldaten vor der Übergabe an das Quellobjekt. Diese Methode wird nur in
|
||||
/// <see cref="F:System.Windows.Data.BindingMode.TwoWay" />-Bindungen aufgerufen.
|
||||
/// </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Data.IValueConverter.ConvertBack(object,Type,object,System.Globalization.CultureInfo)"/>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return (value is double && value.Equals(double.NaN) == false) ? value : 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
namespace CampusAppWP8.Utility.Converter
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
public sealed class FrameworkElementToRectConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
Rect retValue = new Rect();
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
retValue.Height = (value as FrameworkElement).ActualHeight;
|
||||
retValue.Width = (value as FrameworkElement).ActualWidth;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>13.11.2013</date>
|
||||
// <summary>Implements the identifier to place converter class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
namespace CampusAppWP8.Utility.Converter
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>14.11.2013</date>
|
||||
// <summary>Implements the meal identifier to price converter class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
namespace CampusAppWP8.Utility.Converter
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
@@ -0,0 +1,67 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RoomToStringConverter.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Fiedler</author>
|
||||
// <date>22.11.2013</date>
|
||||
// <summary>Implements the room to string converter class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Converter
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Data;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.GeoDb;
|
||||
|
||||
/// <summary> A room to string converter. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="T:System.Windows.Data.IValueConverter"/>
|
||||
public sealed class RoomToStringConverter : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Ändert die Quelldaten vor der Übergabe an das Ziel zur Anzeige in der Benutzeroberfläche.
|
||||
/// </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Data.IValueConverter.Convert(object,Type,object,System.Globalization.CultureInfo)"/>
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
if (value.GetType().Equals(typeof(List<object>)))
|
||||
{
|
||||
List<object> list = value as List<object>;
|
||||
|
||||
if (list[0] != null && list[0].GetType().Equals(typeof(PlaceModel)) == true)
|
||||
{
|
||||
PlaceModel room = list[0] as PlaceModel;
|
||||
|
||||
string nameStr = room.GetInformationsValue(Constants.PisInformationName_Name);
|
||||
string roomStr = room.GetInformationsValue(Constants.PisInformationName_Room);
|
||||
|
||||
if (nameStr.Equals(roomStr))
|
||||
{
|
||||
retValue = roomStr;
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = roomStr + ", " + nameStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ändert die Zieldaten vor der Übergabe an das Quellobjekt. Diese Methode wird nur in
|
||||
/// <see cref="F:System.Windows.Data.BindingMode.TwoWay" />-Bindungen aufgerufen.
|
||||
/// </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Data.IValueConverter.ConvertBack(object,Type,object,System.Globalization.CultureInfo)"/>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
|
||||
public sealed class DoubleNaNConverter : IValueConverter
|
||||
{
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return (value is double && value.Equals(double.NaN) == false) ? value : 0.0;
|
||||
}
|
||||
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return (value is double && value.Equals(double.NaN) == false) ? value : 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,22 @@ namespace CampusAppWP8.Utility.Lui.Button
|
||||
/// <seealso cref="M:System.Windows.Controls.Button.OnClick()"/>
|
||||
protected override void OnClick()
|
||||
{
|
||||
string urlString = this.Url as string;
|
||||
base.OnClick();
|
||||
|
||||
string urlString = string.Empty;
|
||||
|
||||
if (this.Url is string)
|
||||
{
|
||||
urlString = this.Url as string;
|
||||
}
|
||||
else if (this.Url is Uri)
|
||||
{
|
||||
urlString = ((Uri)this.Url).OriginalString;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotSupportedException("Url has a unsupported type");
|
||||
}
|
||||
|
||||
if (this.QuerryStringName != null && this.QuerryStringValue != null)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="UpdateButtonAppBar.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 update button application bar class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui.Button
|
||||
{
|
||||
using System;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
/// <summary> This class create an Button which start the Email-Client. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Shell.ApplicationBarIconButton"/>
|
||||
public class ResetSettingButtonAppBar : ApplicationBarIconButton
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary> IconUri of the Button. </summary>
|
||||
private static Uri iconUri = new Uri(Icons.Reset, UriKind.Relative);
|
||||
|
||||
/// <summary> Text of the Button. </summary>
|
||||
private static string text = AppResources.ResetBtn;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="UpdateButtonAppBar" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ResetSettingButtonAppBar()
|
||||
: base()
|
||||
{
|
||||
this.IconUri = ResetSettingButtonAppBar.iconUri;
|
||||
this.Text = ResetSettingButtonAppBar.text;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ToDefaultButton.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>25.11.2013</date>
|
||||
// <summary>Implements to default button class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui.Button
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
using CampusAppWP8.Pages.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
|
||||
/// <summary> Add person button. </summary>
|
||||
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
||||
/// <seealso cref="T:System.Windows.Controls.Button"/>
|
||||
public class ToDefaultButton : System.Windows.Controls.Button
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary> The person identifier property. </summary>
|
||||
public static readonly DependencyProperty SettingTypeProperty = DependencyProperty.Register("SettingType", typeof(object), typeof(ToDefaultButton), new PropertyMetadata(false));
|
||||
|
||||
/// <summary> The icon. </summary>
|
||||
private static BitmapImage icon = new BitmapImage(new Uri(Icons.Reset, UriKind.Relative));
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the ToDefaultButton class. </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
public ToDefaultButton()
|
||||
: base()
|
||||
{
|
||||
this.Content = new Image
|
||||
{
|
||||
Source = icon
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets the type of the setting. </summary>
|
||||
/// <value> The type of the setting. </value>
|
||||
public object SettingType
|
||||
{
|
||||
get { return (object)this.GetValue(SettingTypeProperty); }
|
||||
set { this.SetValue(SettingTypeProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Löst das <see cref="E:System.Windows.Controls.Primitives.ButtonBase.Click" />-Ereignis
|
||||
/// aus.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Button.OnClick()"/>
|
||||
protected override void OnClick()
|
||||
{
|
||||
if (this.SettingType != null)
|
||||
{
|
||||
Settings.SetSettingToDefault(this.SettingType.ToString());
|
||||
Page page = App.RootFrame.Content as Page;
|
||||
if (typeof(IRefreshingPage).IsInstanceOfType(page))
|
||||
{
|
||||
((IRefreshingPage)page).RefreshPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,8 @@
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
x:Name="root"
|
||||
>
|
||||
|
||||
<!--
|
||||
<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}">
|
||||
|
||||
</Grid>
|
||||
-->
|
||||
<TextBlock x:Name="TheText"/>
|
||||
<TextBlock x:Name="TheText" Style="{Binding TextStyle, ElementName=root, Mode=OneWay}"/>
|
||||
</UserControl>
|
||||
@@ -8,6 +8,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
@@ -17,19 +18,63 @@ namespace CampusAppWP8.Utility.Lui
|
||||
/// <seealso cref="T:System.Windows.Controls.UserControl"/>
|
||||
public partial class MultiValueTextBlock : UserControl
|
||||
{
|
||||
#region DependencyProperties
|
||||
|
||||
/// <summary> The value 1 property. </summary>
|
||||
public static readonly DependencyProperty Value_1_Property = DependencyProperty.Register("Value1", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null, MultiValueTextBlock.OnLoaded));
|
||||
public static readonly DependencyProperty Value_1_Property = DependencyProperty.Register("Value1", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
/// <summary> The value 2 property. </summary>
|
||||
public static readonly DependencyProperty Value_2_Property = DependencyProperty.Register("Value2", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null, MultiValueTextBlock.OnLoaded));
|
||||
public static readonly DependencyProperty Value_2_Property = DependencyProperty.Register("Value2", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
/// <summary> The value 3 property. </summary>
|
||||
public static readonly DependencyProperty Value_3_Property = DependencyProperty.Register("Value3", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
/// <summary> The value 4 property. </summary>
|
||||
public static readonly DependencyProperty Value_4_Property = DependencyProperty.Register("Value4", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
/// <summary> The value 5 property. </summary>
|
||||
public static readonly DependencyProperty Value_5_Property = DependencyProperty.Register("Value5", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
/// <summary> The value 6 property. </summary>
|
||||
public static readonly DependencyProperty Value_6_Property = DependencyProperty.Register("Value6", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
/// <summary> The value 7 property. </summary>
|
||||
public static readonly DependencyProperty Value_7_Property = DependencyProperty.Register("Value7", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
/// <summary> The value 8 property. </summary>
|
||||
public static readonly DependencyProperty Value_8_Property = DependencyProperty.Register("Value8", typeof(object), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
|
||||
/// <summary> The value list property. </summary>
|
||||
public static readonly DependencyProperty Value_List_Property = DependencyProperty.Register("ValueList", typeof(List<object>), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
|
||||
/// <summary> The converter property. </summary>
|
||||
public static readonly DependencyProperty ConverterProperty = DependencyProperty.Register("Converter", typeof(IValueConverter), typeof(MultiValueTextBlock), new PropertyMetadata(null, MultiValueTextBlock.OnLoaded));
|
||||
public static readonly DependencyProperty ConverterProperty = DependencyProperty.Register("Converter", typeof(IValueConverter), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
|
||||
/// <summary> The text style property. </summary>
|
||||
public static readonly DependencyProperty TextStyleProperty = DependencyProperty.Register("TextStyle", typeof(Style), typeof(MultiValueTextBlock), new PropertyMetadata(null));
|
||||
|
||||
#endregion // DependencyProperties
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the MultiValueTextBlock class. </summary>
|
||||
/// <remarks> Fiedler, 14.11.2013. </remarks>
|
||||
public MultiValueTextBlock() : base()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.Loaded += this.OnLoaded;
|
||||
}
|
||||
|
||||
#endregion // Constructor
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary> Gets or sets the text style. </summary>
|
||||
/// <value> The text style. </value>
|
||||
public Style TextStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Style)this.GetValue(TextStyleProperty);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(TextStyleProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the converter. </summary>
|
||||
@@ -77,18 +122,145 @@ namespace CampusAppWP8.Utility.Lui
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Raises the dependency property changed event. </summary>
|
||||
/// <remarks> Fiedler, 14.11.2013. </remarks>
|
||||
/// <param name="d"> The DependencyObject to process. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private static void OnLoaded(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
/// <summary> Gets or sets the value 3. </summary>
|
||||
/// <value> The value 3. </value>
|
||||
public object Value3
|
||||
{
|
||||
MultiValueTextBlock obj = d as MultiValueTextBlock;
|
||||
|
||||
if ((obj.Value1 != null) && (obj.Value2 != null) && (obj.Converter != null))
|
||||
get
|
||||
{
|
||||
obj.TheText.Text = (string)obj.Converter.Convert(obj.Value1, typeof(string), obj.Value2, System.Globalization.CultureInfo.CurrentCulture);
|
||||
return this.GetValue(Value_3_Property);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(Value_3_Property, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the value 4. </summary>
|
||||
/// <value> The value 4. </value>
|
||||
public object Value4
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetValue(Value_4_Property);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(Value_4_Property, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the value 5. </summary>
|
||||
/// <value> The value 5. </value>
|
||||
public object Value5
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetValue(Value_5_Property);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(Value_5_Property, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the value 6. </summary>
|
||||
/// <value> The value 6. </value>
|
||||
public object Value6
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetValue(Value_6_Property);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(Value_6_Property, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the value 7. </summary>
|
||||
/// <value> The value 7. </value>
|
||||
public object Value7
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetValue(Value_7_Property);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(Value_7_Property, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the value 8. </summary>
|
||||
/// <value> The value 8. </value>
|
||||
public object Value8
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetValue(Value_8_Property);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(Value_8_Property, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a list of values. </summary>
|
||||
/// <value> A List of values. </value>
|
||||
public object ValueList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetValue(Value_List_Property);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(Value_List_Property, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary> Raises the routed event. </summary>
|
||||
/// <remarks> Fiedler, 22.11.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.Converter != null)
|
||||
{
|
||||
if (this.ValueList != null)
|
||||
{
|
||||
this.TheText.Text = (string)this.Converter.Convert(this.ValueList, typeof(string), null, System.Globalization.CultureInfo.CurrentCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<object> valList = new List<object>();
|
||||
|
||||
valList.Add(this.Value1);
|
||||
valList.Add(this.Value2);
|
||||
valList.Add(this.Value3);
|
||||
valList.Add(this.Value4);
|
||||
valList.Add(this.Value5);
|
||||
valList.Add(this.Value6);
|
||||
valList.Add(this.Value7);
|
||||
valList.Add(this.Value8);
|
||||
|
||||
this.TheText.Text = (string)this.Converter.Convert(valList, typeof(string), null, System.Globalization.CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:weekView="clr-namespace:CampusAppWP8.Utility.Lui.Templates"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui"
|
||||
xmlns:conv="clr-namespace:CampusAppWP8.Utility"
|
||||
xmlns:conv="clr-namespace:CampusAppWP8.Utility.Converter"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
x:Name="root">
|
||||
x:Name="root"
|
||||
>
|
||||
|
||||
<UserControl.Resources>
|
||||
<conv:BoolToVisibilityConverter x:Key="VisConverter"/>
|
||||
@@ -178,31 +179,31 @@
|
||||
</Border>
|
||||
<!--monday-->
|
||||
<Border x:Name="MonBorder" Grid.Row="0" Grid.Column="1" Visibility="{Binding Day_1_Visibility, ElementName=root, Converter={StaticResource VisConverter}}">
|
||||
<weekView:WeekViewDay x:Name="MonList" BgListElements="24" BgListElementHeight="40"/>
|
||||
<weekView:WeekViewDay x:Name="MonList" BgListElements="24" BgListElementHeight="40" SelectedDate="{Binding SelectedDay, ElementName=root, Mode=TwoWay}"/>
|
||||
</Border>
|
||||
<!--tuesday-->
|
||||
<Border x:Name="TueBorder" Grid.Row="0" Grid.Column="2" Visibility="{Binding Day_2_Visibility, ElementName=root, Converter={StaticResource VisConverter}}">
|
||||
<weekView:WeekViewDay x:Name="TueList" BgListElements="24" BgListElementHeight="40" />
|
||||
<weekView:WeekViewDay x:Name="TueList" BgListElements="24" BgListElementHeight="40" SelectedDate="{Binding SelectedDay, ElementName=root, Mode=TwoWay}"/>
|
||||
</Border>
|
||||
<!--wednesday-->
|
||||
<Border x:Name="WedBorder" Grid.Row="0" Grid.Column="3" Visibility="{Binding Day_3_Visibility, ElementName=root, Converter={StaticResource VisConverter}}">
|
||||
<weekView:WeekViewDay x:Name="WedList" BgListElements="24" BgListElementHeight="40" />
|
||||
<weekView:WeekViewDay x:Name="WedList" BgListElements="24" BgListElementHeight="40" SelectedDate="{Binding SelectedDay, ElementName=root, Mode=TwoWay}"/>
|
||||
</Border>
|
||||
<!--thursday-->
|
||||
<Border x:Name="ThuBorder" Grid.Row="0" Grid.Column="4" Visibility="{Binding Day_4_Visibility, ElementName=root, Converter={StaticResource VisConverter}}">
|
||||
<weekView:WeekViewDay x:Name="ThuList" BgListElements="24" BgListElementHeight="40" />
|
||||
<weekView:WeekViewDay x:Name="ThuList" BgListElements="24" BgListElementHeight="40" SelectedDate="{Binding SelectedDay, ElementName=root, Mode=TwoWay}"/>
|
||||
</Border>
|
||||
<!--friday-->
|
||||
<Border x:Name="FriBorder" Grid.Row="0" Grid.Column="5" Visibility="{Binding Day_5_Visibility, ElementName=root, Converter={StaticResource VisConverter}}">
|
||||
<weekView:WeekViewDay x:Name="FriList" BgListElements="24" BgListElementHeight="40" />
|
||||
<weekView:WeekViewDay x:Name="FriList" BgListElements="24" BgListElementHeight="40" SelectedDate="{Binding SelectedDay, ElementName=root, Mode=TwoWay}"/>
|
||||
</Border>
|
||||
<!--saturday-->
|
||||
<Border x:Name="SatBorder" Grid.Row="0" Grid.Column="6" Visibility="{Binding Day_6_Visibility, ElementName=root, Converter={StaticResource VisConverter}}">
|
||||
<weekView:WeekViewDay x:Name="SatList" BgListElements="24" BgListElementHeight="40"/>
|
||||
<weekView:WeekViewDay x:Name="SatList" BgListElements="24" BgListElementHeight="40" SelectedDate="{Binding SelectedDay, ElementName=root, Mode=TwoWay}"/>
|
||||
</Border>
|
||||
<!--sunday-->
|
||||
<Border x:Name="SunBorder" Grid.Row="0" Grid.Column="7" Visibility="{Binding Day_7_Visibility, ElementName=root, Converter={StaticResource VisConverter}}">
|
||||
<weekView:WeekViewDay x:Name="SunList" BgListElements="24" BgListElementHeight="40"/>
|
||||
<weekView:WeekViewDay x:Name="SunList" BgListElements="24" BgListElementHeight="40" SelectedDate="{Binding SelectedDay, ElementName=root, Mode=TwoWay}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<!-- </Canvas> -->
|
||||
|
||||
@@ -37,10 +37,15 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
/// <summary> The week number property. </summary>
|
||||
public static readonly DependencyProperty WeekNumberProperty = DependencyProperty.Register("WeekNumber", typeof(int), typeof(WeekView), new PropertyMetadata(-1));
|
||||
|
||||
/// <summary> The head visible property. </summary>
|
||||
public static readonly DependencyProperty HeadVisibleProperty = DependencyProperty.Register("HeadVisible", typeof(bool), typeof(WeekView), new PropertyMetadata(true));
|
||||
|
||||
/// <summary> to day coloring property. </summary>
|
||||
public static readonly DependencyProperty ToDayColoringProperty = DependencyProperty.Register("ToDayColoring", typeof(bool), typeof(WeekView), new PropertyMetadata(false));
|
||||
|
||||
|
||||
/// <summary> The selected day property. </summary>
|
||||
public static readonly DependencyProperty SelectedDayProperty = DependencyProperty.Register("SelectedDay", typeof(DateTime), typeof(WeekView), new PropertyMetadata(null));
|
||||
|
||||
/// <summary> List of borders. </summary>
|
||||
private List<Border> borderList = new List<Border>();
|
||||
/// <summary> List of days. </summary>
|
||||
@@ -390,6 +395,19 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime SelectedDay
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DateTime)this.GetValue(SelectedDayProperty);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(SelectedDayProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Sets column background. </summary>
|
||||
/// <remarks> Fiedler, 06.11.2013. </remarks>
|
||||
/// <param name="column"> The column. </param>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:utility="clr-namespace:CampusAppWP8.Utility"
|
||||
xmlns:conv="clr-namespace:CampusAppWP8.Utility.Converter"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -12,7 +12,7 @@
|
||||
>
|
||||
|
||||
<UserControl.Resources>
|
||||
<utility:DoubleNaNConverter x:Key="NaNConverter"/>
|
||||
<conv:DoubleNaNConverter x:Key="NaNConverter"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid x:Name="TheGrid" Width="{Binding Path=Width, ElementName=root, Mode=OneWay}">
|
||||
@@ -33,7 +33,8 @@
|
||||
Canvas.ZIndex="1"
|
||||
Height="{Binding Path=ActualHeight, ElementName=MainCanvas, Mode=OneWay}"
|
||||
Width="{Binding Path=Width, ElementName=MainCanvas, Mode=OneWay, Converter={StaticResource NaNConverter}}"
|
||||
/>
|
||||
Tap="BGCanvas_Tap"
|
||||
Background="Transparent"/>
|
||||
<Canvas
|
||||
x:Name="UserCanvas"
|
||||
Canvas.ZIndex="2"
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
using System.Windows.Data;
|
||||
using CampusAppWP8.Model.TimeTable;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Converter;
|
||||
|
||||
/// <summary> A week view day. </summary>
|
||||
/// <remarks> Fiedler, 06.11.2013. </remarks>
|
||||
@@ -42,6 +43,12 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
/// <summary> The appointments property. </summary>
|
||||
public static readonly DependencyProperty AppointmentsProperty = DependencyProperty.Register("Appointments", typeof(ObservableCollection<AppointmentModel>), typeof(WeekViewDay), new PropertyMetadata(null, OnAppointmentsChanged));
|
||||
|
||||
/// <summary> The selected date property. </summary>
|
||||
public static readonly DependencyProperty SelectedDateProperty = DependencyProperty.Register("SelectedDate", typeof(DateTime), typeof(WeekViewDay), new PropertyMetadata(DateTime.MinValue, OnSelectedDateChanged));
|
||||
|
||||
/// <summary> The selected property. </summary>
|
||||
public static readonly DependencyProperty SelectedProperty = DependencyProperty.Register("Selected", typeof(bool), typeof(WeekViewDay), new PropertyMetadata(false));
|
||||
|
||||
/// <summary> The stacks. </summary>
|
||||
private List<List<AppointmentModel>> stacks = new List<List<AppointmentModel>>();
|
||||
|
||||
@@ -78,6 +85,43 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Raises the dependency property changed event. </summary>
|
||||
/// <remarks> Fiedler, 26.11.2013. </remarks>
|
||||
/// <param name="o"> The DependencyObject to process. </param>
|
||||
/// <param name="e"> Event information to send to registered event handlers. </param>
|
||||
private static void OnSelectedDateChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.NewValue != null && e.OldValue != null)
|
||||
{
|
||||
if (((DateTime)e.NewValue).Date.Equals((o as WeekViewDay).Date.Date)
|
||||
&& ((DateTime)e.OldValue).Date.Equals((o as WeekViewDay).Date.Date))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (e.NewValue != null)
|
||||
{
|
||||
if (((DateTime)e.NewValue).Date.Equals((o as WeekViewDay).Date.Date))
|
||||
{
|
||||
SolidColorBrush newBG = new SolidColorBrush(Colors.LightGray);
|
||||
newBG.Opacity = 0.5;
|
||||
|
||||
(o as WeekViewDay).BGCanvas.Background = newBG;
|
||||
}
|
||||
}
|
||||
|
||||
if (e.OldValue != null)
|
||||
{
|
||||
if (((DateTime)e.OldValue).Date.Equals((o as WeekViewDay).Date.Date))
|
||||
{
|
||||
SolidColorBrush newBG = new SolidColorBrush(Colors.Transparent);
|
||||
|
||||
(o as WeekViewDay).BGCanvas.Background = newBG;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Raises the notify collection changed event. </summary>
|
||||
/// <remarks> Fiedler, 06.11.2013. </remarks>
|
||||
/// <param name="s"> The object to process. </param>
|
||||
@@ -177,6 +221,43 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the selected date. </summary>
|
||||
/// <value> The selected date. </value>
|
||||
public DateTime SelectedDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DateTime)this.GetValue(SelectedDateProperty);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(SelectedDateProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the selected. </summary>
|
||||
/// <value> true if selected, false if not. </value>
|
||||
public bool Selected
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.Date.Date.Equals(this.SelectedDate.Date));
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value == true)
|
||||
{
|
||||
this.SelectedDate = this.Date;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SelectedDate = DateTime.MinValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Check stack add. </summary>
|
||||
/// <remarks> Fiedler, 06.11.2013. </remarks>
|
||||
/// <param name="model"> The model. </param>
|
||||
@@ -421,13 +502,6 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
protected override void OnDoubleTap(System.Windows.Input.GestureEventArgs e)
|
||||
{
|
||||
base.OnDoubleTap(e);
|
||||
}
|
||||
*/
|
||||
|
||||
/// <summary> Draw lines. </summary>
|
||||
/// <remarks> Fiedler, 22.10.2013. </remarks>
|
||||
private void DrawLines()
|
||||
@@ -464,5 +538,10 @@ namespace CampusAppWP8.Utility.Lui.Templates
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BGCanvas_Tap(object sender, System.Windows.Input.GestureEventArgs e)
|
||||
{
|
||||
this.Selected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace CampusAppWP8.Utility.Lui.Tiles
|
||||
{
|
||||
string path;
|
||||
string name = "NFC -> ";
|
||||
switch (Settings.AppSetting.TagDefaultHandler)
|
||||
switch (Settings.AppSetting.FunctionSettings.TagSetting.TagDefaultHandler)
|
||||
{
|
||||
case BTUTagDefaultHandler.CampusMap:
|
||||
path = Constants.PathCampusmap_Campusmap;
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace CampusAppWP8.Utility
|
||||
/// <returns> the position of the phone. </returns>
|
||||
public static GeoPosition<GeoCoordinate> DetermineCurrentPosition(GeoPositionAccuracy accuracy = GeoPositionAccuracy.High)
|
||||
{
|
||||
if (!Settings.AppSetting.GeoWatchEnable)
|
||||
if (!Settings.AppSetting.LocatingSetting.GeoWatchEnable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ namespace CampusAppWP8.Utility
|
||||
/// <returns> The load modus< t> </returns>
|
||||
public static ForceType GetLoadModus<T>()
|
||||
{
|
||||
if (Settings.AppSetting.OnlyWifi && !Settings.AppSetting.WifiEnable)
|
||||
if (Settings.AppSetting.NetworkSetting.OnlyWifi && !Settings.AppSetting.NetworkSetting.WifiEnable)
|
||||
{
|
||||
return ForceType.FORCE_FILE;
|
||||
}
|
||||
@@ -381,8 +381,6 @@ namespace CampusAppWP8.Utility
|
||||
public static Campus DetermineCampus(GeoPositionAccuracy accuracy = GeoPositionAccuracy.Default)
|
||||
{
|
||||
Campus result = Campus.UserSettingCampus;
|
||||
|
||||
|
||||
Utilities.DetermineAndStoreCurrentPosition(accuracy);
|
||||
|
||||
MapPoint currentPoint = App.LoadFromAppState<GeoMapPoint>("CurrentGeoPoint");
|
||||
@@ -390,7 +388,6 @@ namespace CampusAppWP8.Utility
|
||||
{
|
||||
if (accuracy.Equals(GeoPositionAccuracy.High))
|
||||
{
|
||||
|
||||
return result;
|
||||
}
|
||||
else
|
||||
@@ -449,6 +446,30 @@ namespace CampusAppWP8.Utility
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Switch color. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <param name="ressourceKey"> The ressource key. </param>
|
||||
/// <param name="newColor"> The new color. </param>
|
||||
public static void SwitchColor(string ressourceKey, Color newColor)
|
||||
{
|
||||
SolidColorBrush oldColor = App.Current.Resources[ressourceKey] as SolidColorBrush;
|
||||
|
||||
if (oldColor == null || oldColor.Color.Equals(newColor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
App.Current.Resources.Remove(ressourceKey);
|
||||
App.Current.Resources.Add(ressourceKey, newColor);
|
||||
}
|
||||
|
||||
/// <summary> Switch accent color. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <param name="newColor"> The new color. </param>
|
||||
public static void SwitchAccentColor(Color newColor)
|
||||
{
|
||||
Utilities.SwitchColor(Constants.Color_PhoneAccent, newColor);
|
||||
((SolidColorBrush)App.Current.Resources[Constants.Brush_PhoneAccent]).Color = newColor;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,9 @@
|
||||
<Compile Include="Model\Utility\DegreeListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\GeoMapPoint.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemListTemplateModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemTemplateModel.cs" />
|
||||
<Compile Include="Model\Utility\MapPoint.cs" />
|
||||
<Compile Include="Model\Utility\RoleListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\SemesterListPickerItemListModel.cs">
|
||||
|
||||
@@ -220,10 +220,11 @@ namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
infoVal = infoVal.ToLower();
|
||||
}
|
||||
|
||||
if (infoVal.Contains(queryString))
|
||||
if (infoVal.Equals(queryString) || (infoVal.Replace(" ",string.Empty).Equals(queryString)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,10 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
/// <returns> The canteen. </returns>
|
||||
public PriceCanteenModel GetCanteen(Campus campus)
|
||||
{
|
||||
if (campus == Campus.CB_NORTH)
|
||||
{
|
||||
return this.GetCanteen((int)Campus.CB_MAIN - 1);
|
||||
}
|
||||
return this.GetCanteen((int)campus - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,11 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
/// Initializes a new instance of the <see cref="CampusListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public CampusListPickerItemListModel()
|
||||
/// <param name="userSettings"> (Optional) the user settings. </param>
|
||||
public CampusListPickerItemListModel(bool userSettings = false)
|
||||
: base()
|
||||
{
|
||||
this.LoadList();
|
||||
this.LoadList(userSettings);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -33,9 +34,15 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
/// <summary> Overrides the LoadList-Method <see cref="ListPickerItemListModel"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="userSettings"> (Optional) the user settings. </param>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel.LoadList()"/>
|
||||
protected override void LoadList()
|
||||
protected void LoadList(bool userSettings = false)
|
||||
{
|
||||
if (userSettings)
|
||||
{
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.Campus.UserSettingCampus).ToString(), AppResources.Campus_UserSetting));
|
||||
}
|
||||
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.Campus.CB_MAIN).ToString(), AppResources.Campus_CBMain));
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.Campus.CB_NORTH).ToString(), AppResources.Campus_CBNorth));
|
||||
this.AddItem(new ListPickerItemModel(((int)CampusAppWPortalLib8.Model.Settings.Campus.CB_SOUTH).ToString(), AppResources.Campus_CBSouth));
|
||||
|
||||
@@ -12,15 +12,8 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
|
||||
/// <summary> Class for a List of ListPickerItems. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class ListPickerItemListModel
|
||||
public class ListPickerItemListModel : ListPickerItemListTemplateModel<string>
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary> reference of the itemList. </summary>
|
||||
private List<ListPickerItemModel> list;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
@@ -28,109 +21,10 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ListPickerItemListModel()
|
||||
: base()
|
||||
{
|
||||
this.list = new List<ListPickerItemModel>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets the ItemList. </summary>
|
||||
/// <value> The list. </value>
|
||||
public List<ListPickerItemModel> List
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.list)
|
||||
{
|
||||
this.list = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region public
|
||||
|
||||
/// <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;
|
||||
int i = 0;
|
||||
foreach (ListPickerItemModel item in this.list)
|
||||
{
|
||||
if (item.Value.Equals(value))
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary> Method load an default list. </summary>
|
||||
/// <remarks> load an empty list. </remarks>
|
||||
protected virtual void LoadList()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListPickerItemListTemplateModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>26.11.2013</date>
|
||||
// <summary>Implements the list picker item list template model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary> A data Model for the list picker item list template. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <typeparam name="T"> Generic type parameter. </typeparam>
|
||||
public class ListPickerItemListTemplateModel<T>
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary> reference of the itemList. </summary>
|
||||
private List<ListPickerItemTemplateModel<T>> list;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the ListPickerItemListTemplateModel class. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
public ListPickerItemListTemplateModel()
|
||||
{
|
||||
this.list = new List<ListPickerItemTemplateModel<T>>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets the ItemList. </summary>
|
||||
/// <value> The list. </value>
|
||||
public List<ListPickerItemTemplateModel<T>> List
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.list)
|
||||
{
|
||||
this.list = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region public
|
||||
|
||||
/// <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(T value)
|
||||
{
|
||||
int index = 0;
|
||||
int i = 0;
|
||||
foreach (ListPickerItemTemplateModel<T> item in this.list)
|
||||
{
|
||||
if (item.Value.Equals(value))
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
/// <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(T value, string text)
|
||||
{
|
||||
this.AddItem(new ListPickerItemTemplateModel<T>(value, text));
|
||||
}
|
||||
|
||||
/// <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(ListPickerItemTemplateModel<T> item)
|
||||
{
|
||||
this.list.Add(item);
|
||||
}
|
||||
|
||||
/// <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(T value, string text)
|
||||
{
|
||||
return this.RemoveItem(new ListPickerItemTemplateModel<T>(value, text));
|
||||
}
|
||||
|
||||
/// <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(ListPickerItemTemplateModel<T> item)
|
||||
{
|
||||
return this.list.Remove(item);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary> Method load an default list. </summary>
|
||||
/// <remarks> load an empty list. </remarks>
|
||||
protected virtual void LoadList()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
/// <summary> Model for the ListPickerItems. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class ListPickerItemModel
|
||||
public class ListPickerItemModel : ListPickerItemTemplateModel<string>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ListPickerItemModel()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,23 +30,10 @@ namespace CampusAppWPortalLib8.Model.Utility
|
||||
/// <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)
|
||||
: base(value, text)
|
||||
{
|
||||
this.Value = value;
|
||||
this.Text = text;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <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>
|
||||
/// <value> The text. </value>
|
||||
public string Text { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListPickerItemTemplateModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>26.11.2013</date>
|
||||
// <summary>Implements the list picker item template model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
/// <summary> A data Model for the list picker item template. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <typeparam name="V"> Generic type parameter. </typeparam>
|
||||
public class ListPickerItemTemplateModel<V>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the ListPickerItemTemplateModel class. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
public ListPickerItemTemplateModel()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary> Initializes a new instance of the ListPickerItemTemplateModel class. </summary>
|
||||
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
||||
/// <param name="value"> The value. </param>
|
||||
/// <param name="text"> The text. </param>
|
||||
public ListPickerItemTemplateModel(V value, string text)
|
||||
{
|
||||
this.Value = value;
|
||||
this.Text = text;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets the Value of an Item. </summary>
|
||||
/// <value> The value. </value>
|
||||
public V Value { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the Text (caption) of an Item. </summary>
|
||||
/// <value> The text. </value>
|
||||
public string Text { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -97,6 +97,15 @@ namespace CampusAppWPortalLib8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die wie in Profileinstellungen ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus_UserSetting {
|
||||
get {
|
||||
return ResourceManager.GetString("Campus_UserSetting", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Bachelor ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
<data name="Campus_SFBMain" xml:space="preserve">
|
||||
<value>Senftenberg</value>
|
||||
</data>
|
||||
<data name="Campus_UserSetting" xml:space="preserve">
|
||||
<value>wie in Profileinstellungen</value>
|
||||
</data>
|
||||
<data name="Degree_Bachelor" xml:space="preserve">
|
||||
<value>Bachelor</value>
|
||||
</data>
|
||||
|
||||
|
After Width: | Height: | Size: 913 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.6 KiB |