From 4264e1fcd3657022dd8a718d93d47484c877650f Mon Sep 17 00:00:00 2001 From: Christian Fiedler Date: Mon, 7 Oct 2013 19:00:41 +0200 Subject: [PATCH 01/23] nearly done --- .../Pages/Events/EventIndexPage.xaml | 14 ++++++++++++- .../Pages/Events/EventIndexPage.xaml.cs | 20 +++++++++++++++++++ .../CampusAppWP8/Pages/Events/EventPage.xaml | 6 +++--- .../Pages/Events/EventPage.xaml.cs | 2 +- .../Pages/News/NewsIndexPage.xaml | 10 +++++++++- .../Pages/News/NewsIndexPage.xaml.cs | 20 +++++++++++++++++++ .../CampusAppWP8/Pages/News/NewsPage.xaml | 6 +++--- .../CampusAppWP8/Pages/News/NewsPage.xaml.cs | 18 +++++++++++++++++ 8 files changed, 87 insertions(+), 9 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml index 0aac8c25..059d98f6 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml @@ -7,6 +7,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button" + xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" @@ -23,10 +24,13 @@ + + @@ -39,7 +43,15 @@ - + + + + + + + + + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs index 73f8b349..b9ec7697 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs @@ -125,6 +125,26 @@ namespace CampusAppWP8.Pages.Events base.OnNavigatedFrom(e); } + /// + /// Methods overrides the OnOrientationChanged-Method. + /// + /// orientation changed event args. + protected override void OnOrientationChanged(OrientationChangedEventArgs e) + { + if (e.Orientation == PageOrientation.Landscape + || e.Orientation == PageOrientation.LandscapeLeft + || e.Orientation == PageOrientation.LandscapeRight) + { + ApplicationBar.Mode = ApplicationBarMode.Default; + } + else + { + ApplicationBar.Mode = ApplicationBarMode.Minimized; + } + + base.OnOrientationChanged(e); + } + #endregion #region private diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml index fbc0b384..b8d10f80 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml @@ -34,13 +34,13 @@ - + - + - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs index c2b20c99..e13fbe5c 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs @@ -21,7 +21,7 @@ namespace CampusAppWP8.Pages.Events using CampusAppWPortalLib8.Model.RSS; /// - /// EventPage, where every event fees has his own PivotItem. + /// EventPage, where every event feed has his own PivotItem. /// public partial class EventPage : PhoneApplicationPage { diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml index c2efe61e..dad5a881 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml @@ -43,7 +43,15 @@ - + + + + + + + + + diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs index 69814293..06b0ca9a 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs @@ -125,6 +125,26 @@ namespace CampusAppWP8.Pages.News #region private + /// + /// Methods overrides the OnOrientationChanged-Method. + /// + /// orientation changed event args. + protected override void OnOrientationChanged(OrientationChangedEventArgs e) + { + if (e.Orientation == PageOrientation.LandscapeRight + || e.Orientation == PageOrientation.LandscapeLeft + || e.Orientation == PageOrientation.Landscape) + { + ApplicationBar.Mode = ApplicationBarMode.Default; + } + else + { + ApplicationBar.Mode = ApplicationBarMode.Minimized; + } + + base.OnOrientationChanged(e); + } + /// /// Is called after the RSS feeds are loaded into the newsFeed model. /// If there was no feed information set to the UI, the feed list diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml index 85e6faf4..281eaf5d 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml @@ -33,13 +33,13 @@ - + - + - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs index 1c5556d2..b0242c94 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs @@ -150,6 +150,24 @@ namespace CampusAppWP8.Pages.News } } + /* + protected override void OnOrientationChanged(OrientationChangedEventArgs e) + { + if (e.Orientation == PageOrientation.Landscape + || e.Orientation == PageOrientation.LandscapeLeft + || e.Orientation == PageOrientation.LandscapeRight) + { + ApplicationBar.Mode = ApplicationBarMode.Default; + } + else + { + ApplicationBar.Mode = ApplicationBarMode.Minimized; + } + + base.OnOrientationChanged(e); + } + */ + /// /// Called when the index of the selected PivotItem is changed. /// Set the text Grid to visible and the WebBrowser to collapsed. From 577b2fd061af59ae6a3f43d8a134e6a1397a6f69 Mon Sep 17 00:00:00 2001 From: Christian Fiedler Date: Mon, 7 Oct 2013 19:01:31 +0200 Subject: [PATCH 02/23] nearly done --- .../CampusAppWPortalLib8/Model/RSS/RSSModel.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs index 22f79ca1..32b6afb7 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSModel.cs @@ -135,6 +135,18 @@ namespace CampusAppWPortalLib8.Model.RSS } } + /// + /// Gets the date of the timestamp as string. + /// example: 25.06. + /// + public string ShortDate + { + get + { + return string.Format("{0:dd.MM.}", this.timestamp); + } + } + /// /// Gets the time of the timestamp as string. /// example: 12:56. From cefe681199e3804fd12a9ff053dbf558da8d0422 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 8 Oct 2013 10:24:36 +0200 Subject: [PATCH 03/23] new roomlist --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 1 + .../Model/Campusmap/CBMainMapModel.cs | 14 ++++ .../Model/Campusmap/CBMainMapRoomModel.cs | 40 ++++++++++ .../Model/Campusmap/CampusMapModel.cs | 4 + .../Pages/Campusmap/CampusMapPage.xaml.cs | 5 ++ .../Pages/Campusmap/RoomListPage.xaml | 36 +++------ .../Pages/Campusmap/RoomListPage.xaml.cs | 76 ++++++++++++++++++- 7 files changed, 148 insertions(+), 28 deletions(-) create mode 100644 CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 79c3aa26..075d64a7 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -119,6 +119,7 @@ + diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs index 9f3c79b5..9d95e476 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs @@ -44,6 +44,20 @@ namespace CampusAppWP8.Model.Campusmap this.GeoOffsetY = 51.766548; } + public CBMainMapModel() + { + this.ImageSource = Constants.FileMap_CBMainMap; + this.ImageWidth = 2000; + this.ImageHeight = 1425; + this.MapImageOffsetX = -228; + this.MapImageOffsetY = -300; + this.RefPoint = new Point(1365, 800); + this.ScaleX = 129483.4123222749; + this.ScaleY = 197648.8919266073; + this.GeoOffsetX = 14.327159; + this.GeoOffsetY = 51.766548; + } + #endregion #region Method diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs new file mode 100644 index 00000000..523eb7fa --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapRoomModel.cs @@ -0,0 +1,40 @@ +//----------------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 13.08.2013 +//----------------------------------------------------------------------------- +namespace CampusAppWP8.Model.Campusmap +{ + using System.Windows; + using CampusAppWP8.File.Places; + using CampusAppWP8.Model.GeoDb; + using CampusAppWP8.Resources; + using System.Collections.Generic; + + /// + /// Class for the MapModel of the mainCampus of cottbus + /// + public class CBMainMapRoomModel : CBMainMapModel + { + #region Constructor + public CBMainMapRoomModel() + { + this.ImageSource = Constants.FileMap_CBMainMap; + this.ImageWidth = 4000; + this.ImageHeight = 2850; + this.MapImageOffsetX = 48; + this.MapImageOffsetY = 0; + this.RefPoint = new Point(2430, 1600); + this.ScaleX = 258966.8246445498; + this.ScaleY = 395297.7838532146; + this.GeoOffsetX = 14.327159; + this.GeoOffsetY = 51.766548; + } + + #endregion + + + } +} diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs index 7b9bfb8f..579a80f3 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CampusMapModel.cs @@ -30,6 +30,10 @@ namespace CampusAppWP8.Model.Campusmap this.IsReady = true; } + public CampusMapModel() + { + } + #endregion #region property diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs index 39877a04..8a9496e0 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs @@ -692,6 +692,11 @@ namespace CampusAppWP8.Pages.Campusmap /// List of places private void ShowMapInfo(List places) { + if (places == null) + { + return; + } + string msgText = string.Empty; foreach (PlaceModel place in places) { diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml index be326965..4abd06c1 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml @@ -16,33 +16,17 @@ + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs index dc0cac40..c8cd391a 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs @@ -17,6 +17,10 @@ namespace CampusAppWP8.Pages.Campusmap using CampusAppWP8.Resources; using Microsoft.Phone.Controls; using CampusAppWP8.Utility.Lui.MessageBoxes; + using CampusAppWP8.Model.Campusmap; + using System.Windows; + using System.Windows.Controls; + using CampusAppWP8.Utility; /// /// Class of the RoomListPage @@ -34,6 +38,9 @@ namespace CampusAppWP8.Pages.Campusmap /// private CampusBuildingModel building; + /// Variable for the map model. + private CampusMapModel campusMap; + #endregion #region Constructor @@ -43,6 +50,8 @@ namespace CampusAppWP8.Pages.Campusmap public RoomListPage() { this.InitializeComponent(); + this.campusMap = new CBMainMapRoomModel(); + this.campusMap.ShowMapInfos += new CBMainMapModel.MapInfos(this.ShowMapInfo); } #endregion @@ -100,8 +109,30 @@ namespace CampusAppWP8.Pages.Campusmap if (this.building != null && this.building.Layers != null && this.building.Layers.Count > 0) { - this.SetCaptionsToRooms(); - this.RoomPivot.ItemsSource = this.GetSortedLayers(this.building); + Dictionary layers = this.GetSortedLayers(this.building); + double y = this.building.Building.GeoRefPoint.Latitude; + double x = this.building.Building.GeoRefPoint.Longitude; + Point mappoint = this.campusMap.GetScrollPoint(this.campusMap.ConverToPixelPoint(this.campusMap.ConverToMapPoint(x, y))); + + this.MapCanvas.DataContext = campusMap; + + Canvas.SetLeft(this.imgMap, -1 * mappoint.X); + Canvas.SetTop(this.imgMap, -1 * mappoint.Y); + Canvas.SetZIndex(this.imgMap, 0); + + Point offsetPoint = new Point(240, 0); + MapCanvas.Children.Add(this.campusMap.AddPin(offsetPoint, MapPinModel.PinType.SearchPlace)); + CampusBuildingLayerModel layer = layers.Values.ToList()[0]; + foreach (PlaceModel room in layer.Rooms.Places) + { + x = room.GeoRefPoint.Longitude; + y = room.GeoRefPoint.Latitude; + Point roompoint = this.campusMap.GetScrollPoint(this.campusMap.ConverToPixelPoint(this.campusMap.ConverToMapPoint(x, y))); + Point viewPoint = new Point(roompoint.X - mappoint.X + offsetPoint.X, roompoint.Y - mappoint.Y + offsetPoint.Y); + MapCanvas.Children.Add(this.campusMap.AddPin(viewPoint, MapPinModel.PinType.InfoPlace, new List{room})); + } + this.LayoutRoot.UpdateLayout(); + } else { @@ -115,6 +146,47 @@ namespace CampusAppWP8.Pages.Campusmap } + private void ShowMapInfo(List places) + { + string msgText = string.Empty; + if (places == null) + { + return; + } + foreach (PlaceModel place in places) + { + msgText += AppResources.PlaceLabel_Name + ": "; + msgText += place.GetInformationsValue(Constants.PisInformationName_Name); + msgText = Wp8StringManager.AddNewLine(msgText); + + string type = place.GetInformationsValue(Constants.PisInformationName_Typ); + if (type != null) + { + msgText += AppResources.PlaceLabel_Type + ": "; + msgText += type; + msgText = Wp8StringManager.AddNewLine(msgText); + } + + string shortDesc = place.GetInformationsValue(Constants.PisInformationName_ShortDesc); + if (shortDesc != null) + { + msgText += AppResources.PlaceLabel_ShortDesc + ": "; + msgText += shortDesc; + msgText = Wp8StringManager.AddNewLine(msgText); + } + + string access = place.GetInformationsValue(Constants.PisInformationName_Accesbility); + if (access != null) + { + msgText += AppResources.PlaceLabel_Accessbility + ": "; + msgText += access; + msgText = Wp8StringManager.AddNewLine(msgText); + } + } + + MessageBoxes.ShowMainModelInfoMessageBox(msgText); + } + /// /// Method sorts the Layers /// From 92097cf881a591e6d4e208a3cc793768e6dfee45 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 8 Oct 2013 11:17:06 +0200 Subject: [PATCH 04/23] add header to userprofil --- .../CampusAppWP8/Pages/Setting/UserProfil.xaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml index 421e235e..69874c2e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Setting/UserProfil.xaml @@ -7,6 +7,7 @@ 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" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" @@ -22,12 +23,11 @@ - - - - - + + + + From 0f3bbc3cf6cbc8f9de074a27af3db9feb8975d77 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 8 Oct 2013 12:09:25 +0200 Subject: [PATCH 05/23] fix personpage --- .../Model/Person/PersonListWp8Model.cs | 21 +++++++++++++++ .../CampusAppWP8/Pages/Person/PersonPage.xaml | 19 +++++++------- .../Pages/Person/PersonPage.xaml.cs | 16 +++++++++++- .../Model/Person/PersonListModel.cs | 26 +++---------------- 4 files changed, 48 insertions(+), 34 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs index 474f3fea..4a95dcb9 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs @@ -10,6 +10,7 @@ namespace CampusAppWP8.Model.Person { using System.Xml.Serialization; using CampusAppWPortalLib8.Model.Person; + using System.Collections.Generic; /// Person list model. /// Stubbfel, 05.09.2013. @@ -25,5 +26,25 @@ namespace CampusAppWP8.Model.Person IPersonModel tmpPerson = base.GetPerson(id); return tmpPerson as PersonWp8Model; } + + + /// Removes the non function person. + /// Stubbfel, 05.09.2013. + public override void RemoveNonFunctionPerson() + { + List removeList = new List(); + foreach (PersonWp8Model tmpPerson in this.Persons) + { + if (tmpPerson.Functions.Count < 1) + { + removeList.Add(tmpPerson); + } + } + + foreach (PersonWp8Model removePerson in removeList) + { + this.Persons.Remove(removePerson); + } + } } } diff --git a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml index bfc4d4ca..7564bfa0 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml @@ -7,6 +7,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button" + xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" @@ -21,12 +22,10 @@ - - - - - + + + @@ -46,7 +45,7 @@ - + @@ -105,10 +104,10 @@ - - - - + + + + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs index ac47c1e4..6681f537 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs @@ -8,8 +8,8 @@ namespace CampusAppWP8.Pages.Person { - using System.Collections.Generic; using System.Windows; + using System.Windows.Input; using CampusAppWP8.Api.Person; using CampusAppWP8.Model.Person; using CampusAppWP8.Resources; @@ -18,6 +18,7 @@ namespace CampusAppWP8.Pages.Person using CampusAppWPortalLib8.Model.Utility; using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; + using System.Collections.Generic; /// Person page. /// Stubbfel, 09.09.2013. @@ -97,6 +98,10 @@ namespace CampusAppWP8.Pages.Person { this.api.Model.RemoveNonFunctionAndSetIdsPerson(); this.ResultBox.ItemsSource = this.api.Model.Persons; + if (this.api.Model == null || this.api.Model.Persons == null || this.api.Model.Persons.Count < 1) + { + MessageBoxes.ShowMainModelInfoMessageBox(AppResources.MsgBox_NoResult); + } } /// Event handler. Called by Button for click events. @@ -138,6 +143,15 @@ namespace CampusAppWP8.Pages.Person saveContactTask.Show(); } + private void SearchName_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) + { + if (e.Key == Key.Enter) + { + this.SendRequest(sender,e); + } + } + #endregion + } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs index d79729a8..ade93416 100644 --- a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs +++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs @@ -16,7 +16,7 @@ namespace CampusAppWPortalLib8.Model.Person /// Stubbfel, 05.09.2013. /// personModel template [XmlRoot("Uebersicht")] - public class PersonListModel + public abstract class PersonListModel { #region Property @@ -76,28 +76,8 @@ namespace CampusAppWPortalLib8.Model.Person /// Removes the non function person. /// Stubbfel, 05.09.2013. - public void RemoveNonFunctionPerson() - { - List removeList = new List(); - foreach (T item in this.Persons) - { - IPersonModel tmpPerson = item as IPersonModel; - if (tmpPerson == null) - { - continue; - } - - if (tmpPerson.Functions.Count < 1) - { - removeList.Add(item); - } - } - - foreach (T removePerson in removeList) - { - this.Persons.Remove(removePerson); - } - } + public abstract void RemoveNonFunctionPerson(); + #endregion } From f9c2f95ea5838dca28e93e5f7a54a4765f608538 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 8 Oct 2013 12:50:04 +0200 Subject: [PATCH 06/23] finish 230 --- .../CampusAppWP8/Pages/Exams/Exams.xaml | 31 ++++++++++++++----- .../CampusAppWP8/Pages/Exams/Exams.xaml.cs | 3 ++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml index b46de0a3..66530d29 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml @@ -7,6 +7,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button" + xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" @@ -16,9 +17,23 @@ - - - + + + + + + + + + + + + + + + + + - diff --git a/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs index e4e34bbb..b3189a4e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs @@ -66,7 +66,7 @@ namespace CampusAppWP8.Pages.Departments protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); - this.progressBar.Visibility = Visibility.Visible; + this.DefHeader.ProgressVisibility = Visibility.Visible; if (this.isNewInstance) { @@ -113,7 +113,7 @@ namespace CampusAppWP8.Pages.Departments } } - this.progressBar.Visibility = Visibility.Collapsed; + this.DefHeader.ProgressVisibility = Visibility.Collapsed; } /// diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml index 059d98f6..f680cfc0 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml @@ -22,9 +22,8 @@ - - - + + - +