finish #201
This commit is contained in:
@@ -149,6 +149,11 @@
|
||||
<Compile Include="Pages\PlaceNews\ShowPad.xaml.cs">
|
||||
<DependentUpon>ShowPad.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Constants1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Constants.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\BackgroundTasks.cs" />
|
||||
<Compile Include="Utility\Lui\Button\AddPersonButton.cs" />
|
||||
<Compile Include="Utility\Lui\Tiles\TileCreator.cs" />
|
||||
@@ -268,11 +273,6 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Constants.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Constants.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ThemelizedIcons.cs" />
|
||||
<Compile Include="Utility\File.cs" />
|
||||
<Compile Include="Utility\HttpRequest.cs" />
|
||||
@@ -529,8 +529,8 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Constants.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
<LastGenOutput>Constants1.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Resources\Icons.resx">
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -439,24 +439,54 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
msgText += AppResources.PlaceLabel_Name + ": ";
|
||||
msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
|
||||
msgText = Wp8StringManager.AddNewLine(msgText);
|
||||
msgText += AppResources.PlaceLabel_ShortDesc + ": ";
|
||||
msgText += place.GetInformationsValue(Constants.PisInformationName_ShortDesc);
|
||||
msgText = Wp8StringManager.AddNewLine(msgText);
|
||||
|
||||
if (place.ParentId.Equals(this.campusMap.CampusId))
|
||||
string shortDesc = place.GetInformationsValue(Constants.PisInformationName_ShortDesc);
|
||||
if (shortDesc == null)
|
||||
{
|
||||
CampusBuildingModel biulding = new CampusBuildingModel(place.PlaceId, this.campusMap.Spatial.Places.ToList());
|
||||
shortDesc = place.GetInformationsValue(Constants.PisInformationName_Typ);
|
||||
}
|
||||
|
||||
if (shortDesc != null)
|
||||
{
|
||||
msgText += AppResources.PlaceLabel_ShortDesc + ": ";
|
||||
msgText += shortDesc;
|
||||
msgText = Wp8StringManager.AddNewLine(msgText);
|
||||
}
|
||||
}
|
||||
|
||||
MessageBoxes.ShowMainModelInfoMessageBox(msgText);
|
||||
|
||||
foreach (PlaceModel place in places)
|
||||
{
|
||||
|
||||
if (place.ParentId.Equals(this.campusMap.CampusId) && this.HasRooms(place.PlaceId))
|
||||
{
|
||||
MessageBoxResult msgResult = MessageBoxes.ShowPlaceInfoOkCancelMessageBox("Für " + place.GetInformationsValue((Constants.PisInformationName_Name)) + " gibt es eine Raumübersicht. Soll diese angezeigt werden");
|
||||
if (msgResult.Equals(MessageBoxResult.OK))
|
||||
{
|
||||
string urlString = Constants.PathCampusmap_RoomListPage;
|
||||
urlString += "?" + Constants.ParamBuildingId+ "=" + place.PlaceId;
|
||||
Uri url = new Uri(urlString as string, UriKind.Relative);
|
||||
this.NavigationService.Navigate(url);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if a certain place has some rooms
|
||||
/// </summary>
|
||||
/// <param name="placeId">the place id</param>
|
||||
/// <returns>true, if the place has got rooms, otherwise false</returns>
|
||||
private bool HasRooms(string placeId)
|
||||
{
|
||||
foreach (PlaceModel place in this.campusMap.Spatial.Places)
|
||||
{
|
||||
|
||||
if (place.ParentId.Equals(placeId))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
|
||||
/// <summary>
|
||||
/// Class of the RoomListPage
|
||||
@@ -56,6 +57,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.placeFile == null)
|
||||
{
|
||||
this.placeFile = new PlacesFile();
|
||||
@@ -73,7 +75,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// </summary>
|
||||
private void PlacesFileIsFail()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -92,13 +94,25 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// </summary>
|
||||
private void SetupPivot()
|
||||
{
|
||||
this.building = new CampusBuildingModel("122", this.placeFile.Model.Places.ToList());
|
||||
|
||||
if (this.building != null && this.building.Layers != null && this.building.Layers.Count > 0)
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamBuildingId))
|
||||
{
|
||||
this.SetCaptionsToRooms();
|
||||
this.RoomPivot.ItemsSource = this.GetSortedLayers(this.building);
|
||||
this.building = new CampusBuildingModel(NavigationContext.QueryString[Constants.ParamBuildingId], this.placeFile.Model.Places.ToList());
|
||||
|
||||
if (this.building != null && this.building.Layers != null && this.building.Layers.Count > 0)
|
||||
{
|
||||
this.SetCaptionsToRooms();
|
||||
this.RoomPivot.ItemsSource = this.GetSortedLayers(this.building);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -525,6 +525,12 @@
|
||||
<data name="NCFMessageType_NDEF" xml:space="preserve">
|
||||
<value>NDEF</value>
|
||||
</data>
|
||||
<data name="ParamBuildingId" xml:space="preserve">
|
||||
<value>BuildingId</value>
|
||||
</data>
|
||||
<data name="PathCampusmap_RoomListPage" xml:space="preserve">
|
||||
<value>/Pages/Campusmap/RoomListPage.xaml</value>
|
||||
</data>
|
||||
<data name="PisInformationName_Layer" xml:space="preserve">
|
||||
<value>Ebene</value>
|
||||
</data>
|
||||
|
||||
@@ -573,6 +573,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die BuildingId ähnelt.
|
||||
/// </summary>
|
||||
public static string ParamBuildingId {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamBuildingId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
|
||||
/// </summary>
|
||||
@@ -699,6 +708,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Campusmap/RoomListPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
public static string PathCampusmap_RoomListPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathCampusmap_RoomListPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Departments/DepartmentFavoritePage.xaml ähnelt.
|
||||
/// </summary>
|
||||
@@ -54,6 +54,15 @@ namespace CampusAppWP8.Utility.Lui.MessageBoxes
|
||||
return MessageBox.Show(text, AppResources.MsgBox_PlaceInfoHeader, MessageBoxButton.OK);
|
||||
}
|
||||
|
||||
/// <summary>Shows the place information message box (OKCancel-Box).</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <param name="text">custom text for the box.</param>
|
||||
/// <returns>result of the UserInteraction</returns>
|
||||
public static MessageBoxResult ShowPlaceInfoOkCancelMessageBox(string text)
|
||||
{
|
||||
return MessageBox.Show(text, AppResources.MsgBox_PlaceInfoHeader, MessageBoxButton.OKCancel);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user