From 7cfccde9e89f8dd1b29ac1a3d7535bd6d3ab732a Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 16:04:47 +0200 Subject: Login Page update --- ApartmentAdmin | 1 + ApartmentManager/ApartmentManager/App.xaml | 2 +- .../ApartmentManager/View/LoginPage.xaml | 10 +++++++--- HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes 4 files changed, 9 insertions(+), 4 deletions(-) create mode 160000 ApartmentAdmin diff --git a/ApartmentAdmin b/ApartmentAdmin new file mode 160000 index 0000000..497088a --- /dev/null +++ b/ApartmentAdmin @@ -0,0 +1 @@ +Subproject commit 497088ae2a506cba1071be62346fd81b2df2f59b diff --git a/ApartmentManager/ApartmentManager/App.xaml b/ApartmentManager/ApartmentManager/App.xaml index e4c9342..dc08cec 100644 --- a/ApartmentManager/ApartmentManager/App.xaml +++ b/ApartmentManager/ApartmentManager/App.xaml @@ -3,6 +3,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:ApartmentManager" - RequestedTheme="Light"> + RequestedTheme="Dark"> diff --git a/ApartmentManager/ApartmentManager/View/LoginPage.xaml b/ApartmentManager/ApartmentManager/View/LoginPage.xaml index a3b3111..bca57b4 100644 --- a/ApartmentManager/ApartmentManager/View/LoginPage.xaml +++ b/ApartmentManager/ApartmentManager/View/LoginPage.xaml @@ -8,8 +8,12 @@ mc:Ignorable="d"> - - - + + + + + + + diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 84735f9..66c539d 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ -- cgit v1.2.3 From 4e8f8c10446b7be5dc5cb5db92bcdb27f9886bcb Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 16:07:54 +0200 Subject: asd --- ApartmentAdmin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApartmentAdmin b/ApartmentAdmin index 497088a..9345c7a 160000 --- a/ApartmentAdmin +++ b/ApartmentAdmin @@ -1 +1 @@ -Subproject commit 497088ae2a506cba1071be62346fd81b2df2f59b +Subproject commit 9345c7a897c4f0f195c80f117850b8fec1f91afc -- cgit v1.2.3 From 90ca2120bf8978fec73a6b2fa1db28e576a69fe8 Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 16:11:43 +0200 Subject: asdasd --- HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 3a1f536..17d07d1 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index 991099d..d8ee802 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From f9ed27716800d09a26be35b014080efb8ffe8111 Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 16:26:21 +0200 Subject: aaa --- ApartmentAdmin | 2 +- ApartmentManager/ApartmentManager/App.xaml | 2 +- HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ApartmentAdmin b/ApartmentAdmin index 9345c7a..6f77826 160000 --- a/ApartmentAdmin +++ b/ApartmentAdmin @@ -1 +1 @@ -Subproject commit 9345c7a897c4f0f195c80f117850b8fec1f91afc +Subproject commit 6f7782691aa31bf3b45e87a5a9e0160274a1015d diff --git a/ApartmentManager/ApartmentManager/App.xaml b/ApartmentManager/ApartmentManager/App.xaml index dc08cec..e4c9342 100644 --- a/ApartmentManager/ApartmentManager/App.xaml +++ b/ApartmentManager/ApartmentManager/App.xaml @@ -3,6 +3,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:ApartmentManager" - RequestedTheme="Dark"> + RequestedTheme="Light"> diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 17d07d1..5130103 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index d8ee802..7b24ca2 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 262c9785230e2d3ff7775cc95db70a346a7ff14a Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 16:53:16 +0200 Subject: Appartment page --- .../ApartmentManager/ApartmentManager.csproj | 7 +++++ .../ApartmentManager/View/ApartmentPage.xaml | 29 ++++++++++++++++++++ .../ApartmentManager/View/ApartmentPage.xaml.cs | 30 +++++++++++++++++++++ .../ApartmentManager/View/LoginPage.xaml | 2 +- .../ApartmentManager/View/LoginPage.xaml.cs | 5 ++++ HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 7 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 ApartmentManager/ApartmentManager/View/ApartmentPage.xaml create mode 100644 ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index b08d130..a010a50 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -99,6 +99,9 @@ + + ApartmentPage.xaml + LoginPage.xaml @@ -124,6 +127,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml new file mode 100644 index 0000000..8773f0f --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs new file mode 100644 index 0000000..8c9d26c --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace ApartmentManager.View +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class ApartmentPage : Page + { + public ApartmentPage() + { + this.InitializeComponent(); + } + } +} diff --git a/ApartmentManager/ApartmentManager/View/LoginPage.xaml b/ApartmentManager/ApartmentManager/View/LoginPage.xaml index bca57b4..80071d1 100644 --- a/ApartmentManager/ApartmentManager/View/LoginPage.xaml +++ b/ApartmentManager/ApartmentManager/View/LoginPage.xaml @@ -13,7 +13,7 @@ - + diff --git a/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs b/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs index 246ec8e..dcc17ee 100644 --- a/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs +++ b/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs @@ -26,5 +26,10 @@ namespace ApartmentManager.View { this.InitializeComponent(); } + + private void click(object sender, RoutedEventArgs e) + { + Frame.Navigate(typeof(ApartmentPage)); + } } } diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 5130103..16ec302 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index 7b24ca2..191f6dd 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 1dd0fde8ead60a95119eb266d79231235ca7951b Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 17:07:12 +0200 Subject: Plan page --- .../ApartmentManager/ApartmentManager.csproj | 7 +++++ .../ApartmentManager/View/ApartmentPage.xaml | 2 +- .../ApartmentManager/View/ApartmentPage.xaml.cs | 5 ++++ .../ApartmentManager/View/ApartmentPlanPage.xaml | 22 +++++++++++++++ .../View/ApartmentPlanPage.xaml.cs | 30 +++++++++++++++++++++ HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 7 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml create mode 100644 ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index a010a50..a117703 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -102,6 +102,9 @@ ApartmentPage.xaml + + ApartmentPlanPage.xaml + LoginPage.xaml @@ -131,6 +134,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml index 8773f0f..da8d7dd 100644 --- a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml +++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml @@ -18,7 +18,7 @@ - diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs index 8c9d26c..32f0079 100644 --- a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs +++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs @@ -26,5 +26,10 @@ namespace ApartmentManager.View { this.InitializeComponent(); } + + private void click(object sender, RoutedEventArgs e) + { + Frame.Navigate(typeof(ApartmentPlanPage)); + } } } diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml new file mode 100644 index 0000000..4f8b466 --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs new file mode 100644 index 0000000..45feb63 --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace ApartmentManager.View +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class ApartmentPlanPage : Page + { + public ApartmentPlanPage() + { + this.InitializeComponent(); + } + } +} diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 16ec302..6dee888 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index 191f6dd..76e5c09 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 6b46f1db25cb231d51a3e77f0146b2af7e464464 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Fri, 28 Apr 2017 17:12:37 +0200 Subject: Added hamburger menu. --- ApartmentAdmin | 1 - .../ApartmentManager/ApartmentManager.csproj | 9 ++ ApartmentManager/ApartmentManager/App.xaml | 2 +- ApartmentManager/ApartmentManager/AppShell.xaml | 137 ++++++++++++++++++ ApartmentManager/ApartmentManager/AppShell.xaml.cs | 159 +++++++++++++++++++++ .../ApartmentManager/Controls/NavMenuListView.cs | 120 ++++++++++++++++ .../ApartmentManager/Model/NavMenuItem.cs | 60 ++++++++ HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 9 files changed, 486 insertions(+), 2 deletions(-) delete mode 160000 ApartmentAdmin create mode 100644 ApartmentManager/ApartmentManager/AppShell.xaml create mode 100644 ApartmentManager/ApartmentManager/AppShell.xaml.cs create mode 100644 ApartmentManager/ApartmentManager/Controls/NavMenuListView.cs create mode 100644 ApartmentManager/ApartmentManager/Model/NavMenuItem.cs diff --git a/ApartmentAdmin b/ApartmentAdmin deleted file mode 160000 index 9345c7a..0000000 --- a/ApartmentAdmin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9345c7a897c4f0f195c80f117850b8fec1f91afc diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index b08d130..b8fd095 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -95,8 +95,13 @@ App.xaml + + AppShell.xaml + + + @@ -124,6 +129,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/ApartmentManager/ApartmentManager/App.xaml b/ApartmentManager/ApartmentManager/App.xaml index dc08cec..e4c9342 100644 --- a/ApartmentManager/ApartmentManager/App.xaml +++ b/ApartmentManager/ApartmentManager/App.xaml @@ -3,6 +3,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:ApartmentManager" - RequestedTheme="Dark"> + RequestedTheme="Light"> diff --git a/ApartmentManager/ApartmentManager/AppShell.xaml b/ApartmentManager/ApartmentManager/AppShell.xaml new file mode 100644 index 0000000..28d40e3 --- /dev/null +++ b/ApartmentManager/ApartmentManager/AppShell.xaml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/AppShell.xaml.cs b/ApartmentManager/ApartmentManager/AppShell.xaml.cs new file mode 100644 index 0000000..ed86a46 --- /dev/null +++ b/ApartmentManager/ApartmentManager/AppShell.xaml.cs @@ -0,0 +1,159 @@ +using ApartmentManager.Controls; +using ApartmentManager.Model; +using ApartmentManager.View; +using System.Collections.Generic; +using System.Linq; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Navigation; + +namespace ApartmentManager +{ + /// + /// The "chrome" layer of the app that provides top-level navigation with + /// proper keyboarding navigation. + /// + public sealed partial class AppShell : Page + { + // Declare the top level nav items + private List navMenuItems = new List( + new[] + { + new NavMenuItem() + { + Symbol = Symbol.Home, + Label = "Home", + DestPage = typeof(LoginPage), + IsSelected = true + } + }); + + public static AppShell Current = null; + + /// + /// Initializes a new instance of the AppShell, sets the static 'Current' reference, + /// adds callbacks for Back requests and changes in the SplitView's DisplayMode, and + /// provide the nav menu list with the data to display. + /// + public AppShell() + { + InitializeComponent(); + + List topNavMenuItems = navMenuItems.GetRange(0, 3); + List bottomNavMenuItems = navMenuItems.GetRange(3, 2); + + NavMenuList.ItemsSource = topNavMenuItems; + NavMenuList2.ItemsSource = bottomNavMenuItems; + } + + public Frame AppFrame { get { return Frame; } } + + #region Navigation + + /// + /// Navigate to the Page for the selected . + /// + /// + /// + private void NavMenuList_ItemInvoked(object sender, ListViewItem listViewItem) + { + foreach (var i in navMenuItems) + { + i.IsSelected = false; + } + + var item = (NavMenuItem)((NavMenuListView)sender).ItemFromContainer(listViewItem); + + if (item != null) + { + item.IsSelected = true; + if (item.DestPage != null && + item.DestPage != AppFrame.CurrentSourcePageType) + { + AppFrame.Navigate(item.DestPage, item.Arguments); + } + } + } + + /// + /// Ensures the nav menu reflects reality when navigation is triggered outside of + /// the nav menu buttons. + /// + /// + /// + private void OnNavigatingToPage(object sender, NavigatingCancelEventArgs e) + { + if (e.NavigationMode == NavigationMode.Back) + { + var item = (from p in navMenuItems where p.DestPage == e.SourcePageType select p).SingleOrDefault(); + if (item == null && AppFrame.BackStackDepth > 0) + { + // In cases where a page drills into sub-pages then we'll highlight the most recent + // navigation menu item that appears in the BackStack + foreach (var entry in this.AppFrame.BackStack.Reverse()) + { + item = (from p in navMenuItems where p.DestPage == entry.SourcePageType select p).SingleOrDefault(); + if (item != null) + break; + } + } + + foreach (var i in navMenuItems) + { + i.IsSelected = false; + } + if (item != null) + { + item.IsSelected = true; + } + + var container = (ListViewItem)NavMenuList.ContainerFromItem(item); + + // While updating the selection state of the item prevent it from taking keyboard focus. If a + // user is invoking the back button via the keyboard causing the selected nav menu item to change + // then focus will remain on the back button. + if (container != null) container.IsTabStop = false; + NavMenuList.SetSelectedItem(container); + if (container != null) container.IsTabStop = true; + } + } + + #endregion Navigation + + /// + /// Public method to allow pages to open SplitView's pane. + /// Used for custom app shortcuts like navigating left from page's left-most item + /// + public void OpenNavePane() + { + TogglePaneButton.IsChecked = true; + } + + public void MakeStackPanel1Visible() + { + StackPanel1.Visibility = Visibility.Visible; + StackPanel2.Visibility = Visibility.Collapsed; + } + + public void MakeStackPanel2Visible() + { + StackPanel1.Visibility = Visibility.Collapsed; + StackPanel2.Visibility = Visibility.Visible; + } + + private void GoToLoginView(object sender, RoutedEventArgs e) + { + Frame.Navigate(typeof(LoginView)); + } + + private void GoToCreateUserView(object sender, RoutedEventArgs e) + { + Frame.Navigate(typeof(CreateUserView)); + } + + private void GoToUserView(object sender, RoutedEventArgs e) + { + Frame.Navigate(typeof(UserView)); + } + } +} \ No newline at end of file diff --git a/ApartmentManager/ApartmentManager/Controls/NavMenuListView.cs b/ApartmentManager/ApartmentManager/Controls/NavMenuListView.cs new file mode 100644 index 0000000..9591ad1 --- /dev/null +++ b/ApartmentManager/ApartmentManager/Controls/NavMenuListView.cs @@ -0,0 +1,120 @@ +using System; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Media.Animation; + +namespace ApartmentManager.Controls +{ + /// + /// A specialized ListView to represent the items in the navigation menu. + /// + /// + /// This class handles the following: + /// 1. Sizes the panel that hosts the items so they fit in the hosting pane. Otherwise, the keyboard + /// may appear cut off on one side b/c the Pane clips instead of affecting layout. + /// 2. Provides a single selection experience where keyboard focus can move without changing selection. + /// Both the 'Space' and 'Enter' keys will trigger selection. The up/down arrow keys can move + /// keyboard focus without triggering selection. This is different than the default behavior when + /// SelectionMode == Single. The default behavior for a ListView in single selection requires using + /// the Ctrl + arrow key to move keyboard focus without triggering selection. Users won't expect + /// this type of keyboarding model on the nav menu. + /// + public class NavMenuListView : ListView + { + private SplitView _splitViewHost; + + public NavMenuListView() + { + SelectionMode = ListViewSelectionMode.Single; + IsItemClickEnabled = true; + ItemClick += ItemClickedHandler; + + // Locate the hosting SplitView control + Loaded += (s, a) => + { + var parent = VisualTreeHelper.GetParent(this); + while (parent != null && !(parent is SplitView)) + { + parent = VisualTreeHelper.GetParent(parent); + } + + if (parent != null) + { + _splitViewHost = parent as SplitView; + } + }; + } + + protected override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + // Remove the entrance animation on the item containers. + for (int i = 0; i < ItemContainerTransitions.Count; i++) + { + if (ItemContainerTransitions[i] is EntranceThemeTransition) + { + ItemContainerTransitions.RemoveAt(i); + } + } + } + + /// + /// Mark the as selected and ensures everything else is not. + /// If the is null then everything is unselected. + /// + /// + public void SetSelectedItem(ListViewItem item) + { + int index = -1; + if (item != null) + { + index = IndexFromContainer(item); + } + + for (int i = 0; i < Items.Count; i++) + { + var lvi = (ListViewItem)ContainerFromIndex(i); + if (i != index) + { + lvi.IsSelected = false; + } + else if (i == index) + { + lvi.IsSelected = true; + } + } + } + + /// + /// Occurs when an item has been selected + /// + public event EventHandler ItemInvoked; + + private void ItemClickedHandler(object sender, ItemClickEventArgs e) + { + // Triggered when the item is selected using something other than a keyboard + var item = ContainerFromItem(e.ClickedItem); + InvokeItem(item); + } + + private void InvokeItem(object focusedItem) + { + SetSelectedItem(focusedItem as ListViewItem); + ItemInvoked?.Invoke(this, focusedItem as ListViewItem); + + if (_splitViewHost.IsPaneOpen && ( + _splitViewHost.DisplayMode == SplitViewDisplayMode.CompactOverlay || + _splitViewHost.DisplayMode == SplitViewDisplayMode.Overlay)) + { + _splitViewHost.IsPaneOpen = false; + } + + if (focusedItem is ListViewItem) + { + ((ListViewItem)focusedItem).Focus(FocusState.Programmatic); + } + } + } +} \ No newline at end of file diff --git a/ApartmentManager/ApartmentManager/Model/NavMenuItem.cs b/ApartmentManager/ApartmentManager/Model/NavMenuItem.cs new file mode 100644 index 0000000..d71d198 --- /dev/null +++ b/ApartmentManager/ApartmentManager/Model/NavMenuItem.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; + +namespace ApartmentManager.Model +{ + /// + /// Data to represent an item in the nav menu. + /// + public class NavMenuItem : INotifyPropertyChanged + { + public string Label { get; set; } + public Symbol Symbol { get; set; } + + public char SymbolAsChar + { + get + { + return (char)this.Symbol; + } + } + + private bool _isSelected; + + public bool IsSelected + { + get { return _isSelected; } + set + { + _isSelected = value; + SelectedVis = value ? Visibility.Visible : Visibility.Collapsed; + this.OnPropertyChanged("IsSelected"); + } + } + + private Visibility _selectedVis = Visibility.Collapsed; + + public Visibility SelectedVis + { + get { return _selectedVis; } + set + { + _selectedVis = value; + this.OnPropertyChanged("SelectedVis"); + } + } + + public Type DestPage { get; set; } + public object Arguments { get; set; } + + public event PropertyChangedEventHandler PropertyChanged = delegate { }; + + public void OnPropertyChanged(string propertyName) + { + // Raise the PropertyChanged event, passing the name of the property whose value has changed. + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } +} \ No newline at end of file diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 17d07d1..d488ec6 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index d8ee802..cd5d6e1 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 84eb1544496cc48d6ac2b94ff3e01c59029e67b0 Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 17:15:40 +0200 Subject: personal info page --- ApartmentAdmin | 2 +- .../ApartmentManager/ApartmentManager.csproj | 7 +++++ .../View/PersonalInfoPagexaml.xaml | 26 ++++++++++++++++++ .../View/PersonalInfoPagexaml.xaml.cs | 30 +++++++++++++++++++++ HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 6 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml create mode 100644 ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs diff --git a/ApartmentAdmin b/ApartmentAdmin index 6f77826..f4d7fc3 160000 --- a/ApartmentAdmin +++ b/ApartmentAdmin @@ -1 +1 @@ -Subproject commit 6f7782691aa31bf3b45e87a5a9e0160274a1015d +Subproject commit f4d7fc3fa885184fb073fbae2aea28a476a85b80 diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index a117703..2fec108 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -108,6 +108,9 @@ LoginPage.xaml + + PersonalInfoPagexaml.xaml + @@ -142,6 +145,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml new file mode 100644 index 0000000..de41310 --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs new file mode 100644 index 0000000..692570e --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace ApartmentManager.View +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class PersonalInfoPagexaml : Page + { + public PersonalInfoPagexaml() + { + this.InitializeComponent(); + } + } +} diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 6dee888..fdfb54c 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index 76e5c09..210fa00 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 3f87bea2bcfe6e833d8da6ea9ca11d1b7ca3d407 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Fri, 28 Apr 2017 17:20:46 +0200 Subject: sdfsdfs --- HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index d488ec6..b3bf24d 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index cd5d6e1..b42eadd 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 6e782dbf4efc80c91e3faa51bfa95e7b08f581e3 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Fri, 28 Apr 2017 17:23:03 +0200 Subject: asasasa --- HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index b3bf24d..f653838 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index b42eadd..14ef64e 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 2f67f8c6afb97c7abe432cf0a051b7505a7d5273 Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 17:41:49 +0200 Subject: bbd --- ApartmentAdmin | 1 + .../ApartmentManager/ApartmentManager.csproj | 7 ++--- .../View/ApartmentPlanPage.xaml.cs | 30 --------------------- .../View/PersonalInfoPagexaml.xaml | 15 ++++++----- HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 6 files changed, 13 insertions(+), 40 deletions(-) create mode 160000 ApartmentAdmin delete mode 100644 ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs diff --git a/ApartmentAdmin b/ApartmentAdmin new file mode 160000 index 0000000..f4d7fc3 --- /dev/null +++ b/ApartmentAdmin @@ -0,0 +1 @@ +Subproject commit f4d7fc3fa885184fb073fbae2aea28a476a85b80 diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index 3768365..d053bdb 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -107,9 +107,6 @@ ApartmentPage.xaml - - ApartmentPlanPage.xaml - LoginPage.xaml @@ -138,6 +135,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs deleted file mode 100644 index 45feb63..0000000 --- a/ApartmentManager/ApartmentManager/View/ApartmentPlanPage.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 - -namespace ApartmentManager.View -{ - /// - /// An empty page that can be used on its own or navigated to within a Frame. - /// - public sealed partial class ApartmentPlanPage : Page - { - public ApartmentPlanPage() - { - this.InitializeComponent(); - } - } -} diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml index de41310..ca652b3 100644 --- a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml +++ b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml @@ -10,17 +10,18 @@ - + - + - + + + + + + - - - - diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index f653838..573b50d 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index 14ef64e..f56a5ec 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 27898323659892ab34e12830def3aae9c3f83fb2 Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 17:46:38 +0200 Subject: personal info page --- .../ApartmentManager/ApartmentManager.csproj | 6 ++--- .../ApartmentManager/View/ApartmentPage.xaml | 2 +- .../ApartmentManager/View/ApartmentPage.xaml.cs | 7 ++++- .../ApartmentManager/View/PersonalInfoPage.xaml | 27 +++++++++++++++++++ .../ApartmentManager/View/PersonalInfoPage.xaml.cs | 30 ++++++++++++++++++++++ .../View/PersonalInfoPagexaml.xaml | 27 ------------------- .../View/PersonalInfoPagexaml.xaml.cs | 30 ---------------------- 7 files changed, 67 insertions(+), 62 deletions(-) create mode 100644 ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml create mode 100644 ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml.cs delete mode 100644 ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml delete mode 100644 ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index d053bdb..240b879 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -110,8 +110,8 @@ LoginPage.xaml - - PersonalInfoPagexaml.xaml + + PersonalInfoPage.xaml @@ -143,7 +143,7 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml index da8d7dd..c2a3594 100644 --- a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml +++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml @@ -19,7 +19,7 @@ + diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs index 32f0079..f977517 100644 --- a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs +++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs @@ -29,7 +29,12 @@ namespace ApartmentManager.View private void click(object sender, RoutedEventArgs e) { - Frame.Navigate(typeof(ApartmentPlanPage)); + + } + + private void GotoPernalInfoPage(object sender, RoutedEventArgs e) + { + Frame.Navigate(typeof(PersonalInfoPage)); } } } diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml new file mode 100644 index 0000000..5e84fcf --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml.cs b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml.cs new file mode 100644 index 0000000..984e8af --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace ApartmentManager.View +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class PersonalInfoPage : Page + { + public PersonalInfoPage() + { + this.InitializeComponent(); + } + } +} diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml deleted file mode 100644 index ca652b3..0000000 --- a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs b/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs deleted file mode 100644 index 692570e..0000000 --- a/ApartmentManager/ApartmentManager/View/PersonalInfoPagexaml.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 - -namespace ApartmentManager.View -{ - /// - /// An empty page that can be used on its own or navigated to within a Frame. - /// - public sealed partial class PersonalInfoPagexaml : Page - { - public PersonalInfoPagexaml() - { - this.InitializeComponent(); - } - } -} -- cgit v1.2.3 From 9039ee0999a8a54843cd37373dfc07d751860103 Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Fri, 28 Apr 2017 17:55:36 +0200 Subject: User Model --- .../ApartmentManager/ApartmentManager.csproj | 2 +- ApartmentManager/ApartmentManager/Model/Class1.cs | 12 ------- ApartmentManager/ApartmentManager/Model/User.cs | 37 +++++++++++++++++++++ HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 5 files changed, 38 insertions(+), 13 deletions(-) delete mode 100644 ApartmentManager/ApartmentManager/Model/Class1.cs create mode 100644 ApartmentManager/ApartmentManager/Model/User.cs diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index 240b879..23935b1 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -100,8 +100,8 @@ - + diff --git a/ApartmentManager/ApartmentManager/Model/Class1.cs b/ApartmentManager/ApartmentManager/Model/Class1.cs deleted file mode 100644 index 08e3d73..0000000 --- a/ApartmentManager/ApartmentManager/Model/Class1.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ApartmentManager.Model -{ - class Class1 - { - } -} diff --git a/ApartmentManager/ApartmentManager/Model/User.cs b/ApartmentManager/ApartmentManager/Model/User.cs new file mode 100644 index 0000000..280d959 --- /dev/null +++ b/ApartmentManager/ApartmentManager/Model/User.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ApartmentManager.Model +{ + public class User + { + public string Name { get; set; } + public string LastName { get; set; } + public int Phone { get; set; } + public DateTime BirthDate { get; set; } + public string Email { get; set; } + public int ApartmentNr { get; set; } + + public User() { } + + public User(string Name, string LastName, int Phone, DateTime BirthDate, string Email, int ApartmentNr) + { + this.Name = Name; + this.LastName = LastName; + this.Phone = Phone; + this.BirthDate = BirthDate; + this.Email = Email; + this.ApartmentNr = ApartmentNr; + + } + + //public override string ToString() + //{ + // return string.Format("Hotelno {0} Name {1} Address {2}", Hotel_No, Name, Address); + //} + + } +} diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf index 573b50d..12dcf09 100644 Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf index f56a5ec..25f4551 100644 Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ -- cgit v1.2.3 From 77651496e175e97ab92224c0d69b30d270dd6c88 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Fri, 28 Apr 2017 17:57:00 +0200 Subject: Fixed AppShell. --- .../ApartmentManager/ApartmentManager.csproj | 16 + ApartmentManager/ApartmentManager/App.xaml | 9 + ApartmentManager/ApartmentManager/AppShell.xaml | 11 +- ApartmentManager/ApartmentManager/AppShell.xaml.cs | 23 +- .../ApartmentManager/Styles/Styles.xaml | 557 +++++++++++++++++++++ .../ApartmentManager/View/LoginPage.xaml.cs | 27 +- 6 files changed, 616 insertions(+), 27 deletions(-) create mode 100644 ApartmentManager/ApartmentManager/Styles/Styles.xaml diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index 3768365..1f2eda3 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -138,6 +138,22 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/ApartmentManager/ApartmentManager/App.xaml b/ApartmentManager/ApartmentManager/App.xaml index e4c9342..37c4add 100644 --- a/ApartmentManager/ApartmentManager/App.xaml +++ b/ApartmentManager/ApartmentManager/App.xaml @@ -5,4 +5,13 @@ xmlns:local="using:ApartmentManager" RequestedTheme="Light"> + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/AppShell.xaml b/ApartmentManager/ApartmentManager/AppShell.xaml index 28d40e3..e775b93 100644 --- a/ApartmentManager/ApartmentManager/AppShell.xaml +++ b/ApartmentManager/ApartmentManager/AppShell.xaml @@ -19,7 +19,7 @@ --> - + @@ -73,14 +73,11 @@ - - + + - - - - + diff --git a/ApartmentManager/ApartmentManager/AppShell.xaml.cs b/ApartmentManager/ApartmentManager/AppShell.xaml.cs index ed86a46..0bd4f7f 100644 --- a/ApartmentManager/ApartmentManager/AppShell.xaml.cs +++ b/ApartmentManager/ApartmentManager/AppShell.xaml.cs @@ -23,7 +23,7 @@ namespace ApartmentManager { Symbol = Symbol.Home, Label = "Home", - DestPage = typeof(LoginPage), + DestPage = typeof(ApartmentPage), IsSelected = true } }); @@ -39,11 +39,11 @@ namespace ApartmentManager { InitializeComponent(); - List topNavMenuItems = navMenuItems.GetRange(0, 3); - List bottomNavMenuItems = navMenuItems.GetRange(3, 2); + List topNavMenuItems = navMenuItems.GetRange(0, 1); + // List bottomNavMenuItems = navMenuItems.GetRange(3, 2); NavMenuList.ItemsSource = topNavMenuItems; - NavMenuList2.ItemsSource = bottomNavMenuItems; + // NavMenuList2.ItemsSource = bottomNavMenuItems; } public Frame AppFrame { get { return Frame; } } @@ -140,20 +140,5 @@ namespace ApartmentManager StackPanel1.Visibility = Visibility.Collapsed; StackPanel2.Visibility = Visibility.Visible; } - - private void GoToLoginView(object sender, RoutedEventArgs e) - { - Frame.Navigate(typeof(LoginView)); - } - - private void GoToCreateUserView(object sender, RoutedEventArgs e) - { - Frame.Navigate(typeof(CreateUserView)); - } - - private void GoToUserView(object sender, RoutedEventArgs e) - { - Frame.Navigate(typeof(UserView)); - } } } \ No newline at end of file diff --git a/ApartmentManager/ApartmentManager/Styles/Styles.xaml b/ApartmentManager/ApartmentManager/Styles/Styles.xaml new file mode 100644 index 0000000..0b53355 --- /dev/null +++ b/ApartmentManager/ApartmentManager/Styles/Styles.xaml @@ -0,0 +1,557 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs b/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs index dcc17ee..6f3a86b 100644 --- a/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs +++ b/ApartmentManager/ApartmentManager/View/LoginPage.xaml.cs @@ -29,7 +29,32 @@ namespace ApartmentManager.View private void click(object sender, RoutedEventArgs e) { - Frame.Navigate(typeof(ApartmentPage)); + AppShell appShell = Window.Current.Content as AppShell; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (appShell == null) + { + // Create a AppShell to act as the navigation context and navigate to the first page + appShell = new AppShell(); + + // Set the default language + appShell.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; + + } + + // Place our app shell in the current Window + Window.Current.Content = appShell; + + if (appShell.AppFrame.Content == null) + { + // When the navigation stack isn't restored, navigate to the first page + // suppressing the initial entrance animation. + appShell.AppFrame.Navigate(typeof(ApartmentPage)); + } + + // Ensure the current window is active + Window.Current.Activate(); } } } -- cgit v1.2.3 From cfe01fa9547f38a7d8fef22da4e3874bb046f9b6 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Fri, 28 Apr 2017 18:16:32 +0200 Subject: Fixed styles. --- .../ApartmentManager/ApartmentManager.csproj | 9 +- ApartmentManager/ApartmentManager/App.xaml | 2 +- .../ApartmentManager/Style/Styles.xaml | 557 +++++++++++++++++++++ .../ApartmentManager/Styles/Styles.xaml | 557 --------------------- 4 files changed, 566 insertions(+), 559 deletions(-) create mode 100644 ApartmentManager/ApartmentManager/Style/Styles.xaml delete mode 100644 ApartmentManager/ApartmentManager/Styles/Styles.xaml diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index 23935b1..f5ef9d3 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -118,7 +118,6 @@ Designer - @@ -135,6 +134,14 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/ApartmentManager/ApartmentManager/App.xaml b/ApartmentManager/ApartmentManager/App.xaml index 37c4add..fc70d21 100644 --- a/ApartmentManager/ApartmentManager/App.xaml +++ b/ApartmentManager/ApartmentManager/App.xaml @@ -9,7 +9,7 @@ - + diff --git a/ApartmentManager/ApartmentManager/Style/Styles.xaml b/ApartmentManager/ApartmentManager/Style/Styles.xaml new file mode 100644 index 0000000..0b53355 --- /dev/null +++ b/ApartmentManager/ApartmentManager/Style/Styles.xaml @@ -0,0 +1,557 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ApartmentManager/ApartmentManager/Styles/Styles.xaml b/ApartmentManager/ApartmentManager/Styles/Styles.xaml deleted file mode 100644 index 0b53355..0000000 --- a/ApartmentManager/ApartmentManager/Styles/Styles.xaml +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3