nearly done #270
This commit is contained in:
@@ -16,6 +16,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Model.TimeTable;
|
||||
using CampusAppWP8.Utility;
|
||||
@@ -24,7 +25,7 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
|
||||
public partial class AppointmentEdit : PortraitLandscapePage
|
||||
{
|
||||
//private Place
|
||||
private PlacesFile placeFile = null;
|
||||
|
||||
private readonly string[] DurationListText = new string[] { "15 Minuten", "30 Minuten", "1 Stunde", "90 Minuten", "2 Stunden", "Ganztägig", "Benutzerdefiniert" };
|
||||
private readonly string[] RepeatListText = new string[] { "Einmal", "Täglich", "Jeden Mo-Fr", "Wöchentlich", "Monatlich", "Jährlich" };
|
||||
@@ -44,6 +45,11 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
this.InCategories.ItemsSource = CategoriesListText;
|
||||
this.InPriority.ItemsSource = PriorityListText;
|
||||
|
||||
this.placeFile = new PlacesFile();
|
||||
this.placeFile.OnLoaded += this.PlaceFileIsReady;
|
||||
this.placeFile.OnFailedLoad += this.PlaceFileIsFailed;
|
||||
this.placeFile.LoadData();
|
||||
|
||||
ApplicationBarIconButton saveBtn = new ApplicationBarIconButton();
|
||||
saveBtn.IconUri = new Uri(Icons.Link, UriKind.Relative);
|
||||
saveBtn.Text = AppResources.Save;
|
||||
@@ -96,7 +102,33 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
else if(NavigationContext.QueryString.TryGetValue(Constants.ParamPID, out pid))
|
||||
{
|
||||
this.HeadLine.Text = AppResources.Creating;
|
||||
this.InLocation.Text = pid;
|
||||
CampusAppWPortalLib8.Model.GeoDb.PlaceModel m = this.placeFile.Model.GetPlaceById(pid);
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
CampusAppWPortalLib8.Model.GeoDb.PlaceModel mParent = this.placeFile.Model.GetPlaceById(m.ParentId);
|
||||
|
||||
string roomStr = m.GetInformationsValue(Constants.PisInformationName_Room);
|
||||
|
||||
if (mParent != null)
|
||||
{
|
||||
string buildingStr = mParent.GetInformationsValue(Constants.PisInformationName_ShortName);
|
||||
|
||||
if (roomStr != null)
|
||||
{
|
||||
if (buildingStr != null)
|
||||
{
|
||||
roomStr = roomStr.Replace(buildingStr, string.Empty);
|
||||
|
||||
this.InLocation.Text = buildingStr + ", " + roomStr;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.InLocation.Text = roomStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -104,6 +136,14 @@ namespace CampusAppWP8.Pages.TimeTable
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaceFileIsReady()
|
||||
{
|
||||
}
|
||||
|
||||
private void PlaceFileIsFailed()
|
||||
{
|
||||
}
|
||||
|
||||
private void OnClickSaveBtn(object sender, EventArgs e)
|
||||
{
|
||||
AppointmentModel newItem = new AppointmentModel();
|
||||
|
||||
@@ -600,4 +600,7 @@
|
||||
<data name="ParamPID" xml:space="preserve">
|
||||
<value>pid</value>
|
||||
</data>
|
||||
<data name="PisInformationName_Room" xml:space="preserve">
|
||||
<value>Raumnummer</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1194,6 +1194,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Raumnummer ähnelt.
|
||||
/// </summary>
|
||||
public static string PisInformationName_Room {
|
||||
get {
|
||||
return ResourceManager.GetString("PisInformationName_Room", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Kurzbeschreibung ähnelt.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user