From 0c4c38420bf5096a13445438b0c884b7c5143691 Mon Sep 17 00:00:00 2001 From: ycastonguay Date: Wed, 18 Sep 2013 01:49:33 -0400 Subject: [PATCH] WindowsPhone: List view prototyping. Related to issue #424. --- MPfm/MPfm.WindowsPhone/App.xaml | 29 +++++ MPfm/MPfm.WindowsPhone/App.xaml.cs | 2 +- .../Classes/Controls/ListArtistControl.xaml | 28 +++++ .../Controls/ListArtistControl.xaml.cs | 29 +++++ .../Classes/Controls/ListSimpleControl.xaml | 29 +++++ .../Controls/ListSimpleControl.xaml.cs | 29 +++++ .../{ => Classes/Pages}/MainPage.xaml | 44 ++++++-- .../Classes/Pages/PlayerPage.xaml | 32 ++++++ .../Classes/Pages/PlayerPage.xaml.cs | 20 ++++ .../MPfm.WindowsPhone.csproj | 26 ++++- MPfm/MPfm.WindowsPhone/MainPage.xaml.cs | 102 ------------------ 11 files changed, 258 insertions(+), 112 deletions(-) create mode 100644 MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml create mode 100644 MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml.cs create mode 100644 MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml create mode 100644 MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml.cs rename MPfm/MPfm.WindowsPhone/{ => Classes/Pages}/MainPage.xaml (52%) create mode 100644 MPfm/MPfm.WindowsPhone/Classes/Pages/PlayerPage.xaml create mode 100644 MPfm/MPfm.WindowsPhone/Classes/Pages/PlayerPage.xaml.cs delete mode 100644 MPfm/MPfm.WindowsPhone/MainPage.xaml.cs diff --git a/MPfm/MPfm.WindowsPhone/App.xaml b/MPfm/MPfm.WindowsPhone/App.xaml index 9da36dda..9b5ccf1a 100644 --- a/MPfm/MPfm.WindowsPhone/App.xaml +++ b/MPfm/MPfm.WindowsPhone/App.xaml @@ -8,6 +8,35 @@ + diff --git a/MPfm/MPfm.WindowsPhone/App.xaml.cs b/MPfm/MPfm.WindowsPhone/App.xaml.cs index 9d664808..f59fe1d1 100644 --- a/MPfm/MPfm.WindowsPhone/App.xaml.cs +++ b/MPfm/MPfm.WindowsPhone/App.xaml.cs @@ -85,7 +85,7 @@ private void Application_Launching(object sender, LaunchingEventArgs e) BootstrapApp(); // Instead of using WMAppManifest to automatically launch a page, do it in code. - RootFrame.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); + RootFrame.Navigate(new Uri("/Classes/Pages/MainPage.xaml", UriKind.Relative)); } // Code to execute when the application is activated (brought to foreground) diff --git a/MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml new file mode 100644 index 00000000..eeb79ed2 --- /dev/null +++ b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml.cs b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml.cs new file mode 100644 index 00000000..d3b68d7a --- /dev/null +++ b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListArtistControl.xaml.cs @@ -0,0 +1,29 @@ +// Copyright © 2011-2013 Yanick Castonguay +// +// This file is part of MPfm. +// +// MPfm is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// MPfm is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MPfm. If not, see . + +using System.Windows.Controls; + +namespace MPfm.WindowsPhone.Classes.Controls +{ + public partial class ListArtistControl : UserControl + { + public ListArtistControl() + { + InitializeComponent(); + } + } +} diff --git a/MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml new file mode 100644 index 00000000..e89fa5b8 --- /dev/null +++ b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml.cs b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml.cs new file mode 100644 index 00000000..4aeb0059 --- /dev/null +++ b/MPfm/MPfm.WindowsPhone/Classes/Controls/ListSimpleControl.xaml.cs @@ -0,0 +1,29 @@ +// Copyright © 2011-2013 Yanick Castonguay +// +// This file is part of MPfm. +// +// MPfm is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// MPfm is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MPfm. If not, see . + +using System.Windows.Controls; + +namespace MPfm.WindowsPhone.Classes.Controls +{ + public partial class ListSimpleControl : UserControl + { + public ListSimpleControl() + { + InitializeComponent(); + } + } +} diff --git a/MPfm/MPfm.WindowsPhone/MainPage.xaml b/MPfm/MPfm.WindowsPhone/Classes/Pages/MainPage.xaml similarity index 52% rename from MPfm/MPfm.WindowsPhone/MainPage.xaml rename to MPfm/MPfm.WindowsPhone/Classes/Pages/MainPage.xaml index 7ac150c6..ce266303 100644 --- a/MPfm/MPfm.WindowsPhone/MainPage.xaml +++ b/MPfm/MPfm.WindowsPhone/Classes/Pages/MainPage.xaml @@ -6,6 +6,7 @@ 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:controls="clr-namespace:MPfm.WindowsPhone.Classes.Controls" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" @@ -41,16 +42,45 @@ - - + + + + + + + + + + + + + + + + + + + +