file360

Log | Files | Refs

commit aba2572477e650e73d22db8f92a4aa4ab508cec2
parent f49d45332936bb09dd75a9a16bf1a8d7fc6160fb
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date:   Thu,  3 Apr 2025 01:06:17 +0530

Pre Aram Source Commit

Diffstat:
MFile360.sln | 40++++++++++++++++++++--------------------
AFile360/AboutPage.xaml | 40++++++++++++++++++++++++++++++++++++++++
AFile360/AboutPage.xaml.cs | 41+++++++++++++++++++++++++++++++++++++++++
MFile360/App.xaml | 10+++-------
MFile360/App.xaml.cs | 4++--
AFile360/AppBarIcons/add.png | 0
AFile360/AppBarIcons/sort27.png | 0
DFile360/Assets/ApplicationIcon.png | 0
MFile360/File360.csproj | 52++++++++--------------------------------------------
AFile360/LinqToVisualTree.cs | 388+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MFile360/LocalizedStrings.cs | 7+++----
MFile360/MainPage.xaml | 778+++++++++++++++++++------------------------------------------------------------
MFile360/MainPage.xaml.cs | 896+++++++++++++++++++++++++++++++++++++------------------------------------------
AFile360/MetroInMotion.cs | 524+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AFile360/Package.appxmanifest | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AFile360/PersonalizationPage.xaml | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
AFile360/PersonalizationPage.xaml.cs | 40++++++++++++++++++++++++++++++++++++++++
MFile360/Properties/AppManifest.xml | 7++++---
MFile360/Properties/AssemblyInfo.cs | 3++-
MFile360/Properties/WMAppManifest.xml | 52++++++++++++++++++++++++++++++++++++++--------------
MFile360/Resources/AppResources.Designer.cs | 9---------
MFile360/Resources/AppResources.resx | 3---
AFile360/Resources/Assets/Images/Hamburger_alpha.png | 0
AFile360/Resources/Assets/Images/add.png | 0
AFile360/Resources/Assets/Images/audio.png | 0
MFile360/Resources/Assets/Images/back.png | 0
AFile360/Resources/Assets/Images/cover_art.jpg | 0
AFile360/Resources/Assets/Images/cover_art.png | 0
AFile360/Resources/Assets/Images/documents.png | 0
MFile360/Resources/Assets/Images/download.png | 0
AFile360/Resources/Assets/Images/flatIcon.PNG | 0
AFile360/Resources/Assets/Images/greySearch.png | 0
MFile360/Resources/Assets/Images/hamburger.png | 0
MFile360/Resources/Assets/Images/list.png | 0
MFile360/Resources/Assets/Images/mute.png | 0
MFile360/Resources/Assets/Images/onedrive.png | 0
AFile360/Resources/Assets/Images/pause.png | 0
MFile360/Resources/Assets/Images/phone.png | 0
AFile360/Resources/Assets/Images/play.png | 0
MFile360/Resources/Assets/Images/sdcard.png | 0
AFile360/Resources/Assets/Images/settings.png | 0
AFile360/Resources/Assets/Images/settings_dark.png | 0
MFile360/Resources/Assets/Images/share.png | 0
AFile360/Resources/Assets/Images/slider_alpha.png | 0
MFile360/Resources/Assets/Images/transport.ff.png | 0
MFile360/Resources/Assets/Images/transport.pause.png | 0
MFile360/Resources/Assets/Images/transport.play.png | 0
MFile360/Resources/Assets/Images/transport.rew.png | 0
AFile360/Resources/Assets/Images/video.png | 0
AFile360/Resources/Assets/Images/whiteSearch.png | 0
MFile360/Resources/Assets/Settings/ftp.png | 0
MFile360/SecurityPage.xaml | 5+++--
MFile360/SecurityPage.xaml.cs | 25+++++++++++++++++++++++--
AFile360/SettingsPage.xaml | 45+++++++++++++++++++++++++++++++++++++++++++++
AFile360/SettingsPage.xaml.cs | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AFile360/SkydrivePage.xaml | 17+++++++++++++++++
AFile360/SkydrivePage.xaml.cs | 21+++++++++++++++++++++
AFile360/URISchemeExtensionsLandingPage.xaml | 36++++++++++++++++++++++++++++++++++++
AFile360/URISchemeExtensionsLandingPage.xaml.cs | 21+++++++++++++++++++++
AFile360/UriMapper.cs | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AFile360/VaultPage.xaml | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AFile360/VaultPage.xaml.cs | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MFile360/VideoPlayer.xaml | 107++++++++++++++-----------------------------------------------------------------
MFile360/VideoPlayer.xaml.cs | 54++++++++++++++++++++++++++++++++++--------------------
AFile360/greyhome.png | 0
AFile360/musiclist.cs | 25+++++++++++++++++++++++++
AFile360/vaultlist.cs | 20++++++++++++++++++++
AFile360/whitehome.png | 0
68 files changed, 2433 insertions(+), 1293 deletions(-)

diff --git a/File360.sln b/File360.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "File360", "File360\File360.csproj", "{12DBCDD7-C235-40E7-B8FD-71E8074350BD}" +# Visual Studio Express 2012 for Windows Phone +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "File360", "File360\File360.csproj", "{6DB737B7-6D8E-4901-86A4-3110A717C72F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,24 +13,24 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|Any CPU.ActiveCfg = Release|Any CPU - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|Any CPU.Build.0 = Release|Any CPU - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|Any CPU.Deploy.0 = Release|Any CPU - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|ARM.ActiveCfg = Debug|ARM - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|ARM.Build.0 = Debug|ARM - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|ARM.Deploy.0 = Debug|ARM - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|x86.ActiveCfg = Debug|x86 - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|x86.Build.0 = Debug|x86 - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Debug|x86.Deploy.0 = Debug|x86 - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|Any CPU.Build.0 = Release|Any CPU - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|Any CPU.Deploy.0 = Release|Any CPU - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|ARM.ActiveCfg = Release|ARM - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|ARM.Build.0 = Release|ARM - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|ARM.Deploy.0 = Release|ARM - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|x86.ActiveCfg = Release|x86 - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|x86.Build.0 = Release|x86 - {12DBCDD7-C235-40E7-B8FD-71E8074350BD}.Release|x86.Deploy.0 = Release|x86 + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|ARM.ActiveCfg = Debug|ARM + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|ARM.Build.0 = Debug|ARM + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|ARM.Deploy.0 = Debug|ARM + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|x86.ActiveCfg = Debug|x86 + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|x86.Build.0 = Debug|x86 + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Debug|x86.Deploy.0 = Debug|x86 + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|Any CPU.Build.0 = Release|Any CPU + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|Any CPU.Deploy.0 = Release|Any CPU + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|ARM.ActiveCfg = Release|ARM + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|ARM.Build.0 = Release|ARM + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|ARM.Deploy.0 = Release|ARM + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|x86.ActiveCfg = Release|x86 + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|x86.Build.0 = Release|x86 + {6DB737B7-6D8E-4901-86A4-3110A717C72F}.Release|x86.Deploy.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/File360/AboutPage.xaml b/File360/AboutPage.xaml @@ -0,0 +1,39 @@ +<phone:PhoneApplicationPage + x:Class="File360.AboutPage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" + 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" + FontFamily="{StaticResource PhoneFontFamilyNormal}" + FontSize="{StaticResource PhoneFontSizeNormal}" + Foreground="{StaticResource PhoneForegroundBrush}" + SupportedOrientations="Portrait" Orientation="Portrait" + mc:Ignorable="d" + shell:SystemTray.IsVisible="True"> + + <Grid x:Name="LayoutRoot"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> + </Grid.RowDefinitions> + <phone:Pivot HorizontalAlignment="Left" Height="768" Title="FILE360°" VerticalAlignment="Top" Width="480" Grid.RowSpan="2"> + <phone:PivotItem CacheMode="{x:Null}" Header="about"/> + </phone:Pivot> + <Rectangle x:Name="bgChanger"/> + <Image HorizontalAlignment="Left" Height="91" Margin="105,197,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Source="/AMI.png" Width="256"/> + <HyperlinkButton Content="am Industries inc." HorizontalAlignment="Left" Margin="136,306,0,0" Grid.Row="1" VerticalAlignment="Top"/> + <TextBlock HorizontalAlignment="Left" Margin="28,144,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Height="30" Text="developed &amp; produced by"/> + <TextBlock Text="contact developer:" HorizontalAlignment="Left" Margin="28,381,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Height="38"/> + <HyperlinkButton HorizontalAlignment="Left" Margin="197,374,0,0" Grid.Row="1" VerticalAlignment="Top" Width="246" Height="38" Content="bharatvaj@yahoo.com"/> + <ListBox Grid.RowSpan="2" Margin="10,437,10,12" Background="{x:Null}"> + <TextBlock Text="special thanks to:" Height="40" Width="174" TextAlignment="Center"/> + <Image Source="/Assets/Images/flatIcon.PNG" Height="72" Width="111" /> + </ListBox> + <Rectangle x:Name="blue" Tap="blue_Tap" HorizontalAlignment="Left" Height="100" Margin="286,188,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Width="75"/> + <Rectangle x:Name="red" Tap="red_Tap" HorizontalAlignment="Left" Height="100" Margin="105,188,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Width="75"/> + <Rectangle x:Name="green" Tap="green_Tap" HorizontalAlignment="Left" Height="100" Margin="197,188,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Width="75"/> + </Grid> + +</phone:PhoneApplicationPage> +\ No newline at end of file diff --git a/File360/AboutPage.xaml.cs b/File360/AboutPage.xaml.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Navigation; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; +using System.Windows.Media; + +namespace File360 +{ + public partial class AboutPage : PhoneApplicationPage + { + public AboutPage() + { + InitializeComponent(); + SolidColorBrush red = new SolidColorBrush(); + SolidColorBrush green = new SolidColorBrush(); + } + + private void blue_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + SolidColorBrush bluec = new SolidColorBrush(); + bluec.Color = Colors.Blue; + bgChanger.Fill = bluec; + } + + private void red_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + + } + + private void green_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + + } + } +} +\ No newline at end of file diff --git a/File360/App.xaml b/File360/App.xaml @@ -2,12 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" - 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:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" - xmlns:es="clr-namespace:Microsoft.Expression.Shapes;assembly=Microsoft.Expression.Drawing" - mc:Ignorable="d" + 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:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" xmlns:es="clr-namespace:Microsoft.Expression.Shapes;assembly=Microsoft.Expression.Drawing" mc:Ignorable="d" x:Class="File360.App" > @@ -695,4 +690,4 @@ Activated="Application_Activated" Deactivated="Application_Deactivated"/> </Application.ApplicationLifetimeObjects> -</Application> +</Application> +\ No newline at end of file diff --git a/File360/App.xaml.cs b/File360/App.xaml.cs @@ -68,7 +68,7 @@ namespace File360 private void Application_Activated(object sender, ActivatedEventArgs e) { // Ensure that application state is restored appropriately - + } // Code to execute when the application is deactivated (sent to background) @@ -94,7 +94,7 @@ namespace File360 // A navigation has failed; break into the debugger Debugger.Break(); } - + } // Code to execute on Unhandled Exceptions diff --git a/File360/AppBarIcons/add.png b/File360/AppBarIcons/add.png Binary files differ. diff --git a/File360/AppBarIcons/sort27.png b/File360/AppBarIcons/sort27.png Binary files differ. diff --git a/File360/Assets/ApplicationIcon.png b/File360/Assets/ApplicationIcon.png Binary files differ. diff --git a/File360/File360.csproj b/File360/File360.csproj @@ -5,7 +5,7 @@ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>10.0.20506</ProductVersion> <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{12DBCDD7-C235-40E7-B8FD-71E8074350BD}</ProjectGuid> + <ProjectGuid>{6DB737B7-6D8E-4901-86A4-3110A717C72F}</ProjectGuid> <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> @@ -13,10 +13,10 @@ <AssemblyName>File360</AssemblyName> <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier> <TargetFrameworkVersion>v8.0</TargetFrameworkVersion> - <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> + <SilverlightVersion> + </SilverlightVersion> <SilverlightApplication>true</SilverlightApplication> - <SupportedCultures> - </SupportedCultures> + <SupportedCultures>ta</SupportedCultures> <XapOutputs>true</XapOutputs> <GenerateSilverlightManifest>true</GenerateSilverlightManifest> <XapFilename>File360_$(Configuration)_$(Platform).xap</XapFilename> @@ -104,8 +104,6 @@ <Compile Include="App.xaml.cs"> <DependentUpon>App.xaml</DependentUpon> </Compile> - <Compile Include="AppSettings.cs" /> - <Compile Include="BoolToColorConverter.cs" /> <Compile Include="musiclist.cs" /> <Compile Include="PersonalizationPage.xaml.cs"> <DependentUpon>PersonalizationPage.xaml</DependentUpon> @@ -117,15 +115,11 @@ <Compile Include="EBookReader.xaml.cs"> <DependentUpon>EBookReader.xaml</DependentUpon> </Compile> - <Compile Include="FTPServerPage.xaml.cs"> - <DependentUpon>FTPServerPage.xaml</DependentUpon> - </Compile> <Compile Include="LinqToVisualTree.cs" /> <Compile Include="LocalizedStrings.cs" /> <Compile Include="MainPage.xaml.cs"> <DependentUpon>MainPage.xaml</DependentUpon> </Compile> - <Compile Include="picturelist.cs" /> <Compile Include="MetroInMotion.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Resources\AppResources.Designer.cs"> @@ -153,25 +147,6 @@ <Compile Include="VideoPlayer.xaml.cs"> <DependentUpon>VideoPlayer.xaml</DependentUpon> </Compile> - <Compile Include="WinPhoneFtp.FtpService\DataReceivedEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\ErrorOccuredEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpClient.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpCommand.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpDirectoryChangedEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpDirectoryListedEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpDisconnectedEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpDisconnectReason.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpFileOperationInfo.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpFileTransferEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpFileTransferFailedEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpFileTransferFailureReason.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpFileTransferProgressedEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpPassiveOperation.cs" /> - <Compile Include="WinPhoneFtp.FtpService\FtpPresentWorkingDirectoryEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\Logger.cs" /> - <Compile Include="WinPhoneFtp.FtpService\SocketClosedEventArgs.cs" /> - <Compile Include="WinPhoneFtp.FtpService\SocketCloseReason.cs" /> - <Compile Include="WinPhoneFtp.FtpService\TcpClientSocket.cs" /> </ItemGroup> <ItemGroup> <ApplicationDefinition Include="App.xaml"> @@ -230,9 +205,7 @@ </None> </ItemGroup> <ItemGroup> - <Content Include="123.wmv"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </Content> + <Content Include="123.wmv" /> <Content Include="AMI.png" /> <Content Include="Assets\BadgeLogo.png" /> <Content Include="Assets\Logo.png" /> @@ -339,21 +312,12 @@ <ItemGroup> <Reference Include="Microsoft.Expression.Drawing" /> <Reference Include="Microsoft.Expression.Interactions" /> - <Reference Include="Microsoft.Phone.Controls.Maps, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" /> - <Reference Include="Microsoft.Phone.Controls.Toolkit, Version=8.0.1.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604, processorArchitecture=MSIL"> + <Reference Include="Microsoft.Phone.Controls.Toolkit"> <HintPath>..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath> - <Private>True</Private> </Reference> <Reference Include="System.Windows.Interactivity" /> </ItemGroup> <ItemGroup> - <Resource Include="Resources\Assets\Images\favs.png" /> - <Resource Include="Resources\Assets\Images\mute.png" /> - <Resource Include="Resources\Assets\Images\repeat.png" /> - <Resource Include="Resources\Assets\Images\volume_high.png" /> - <Resource Include="Resources\Assets\Images\volume_low.png" /> - <Resource Include="share.png" /> - <Resource Include="slider_alpha.png" /> <Folder Include="FileTypeAssociation\" /> <Folder Include="GaussianBlur\" /> </ItemGroup> @@ -367,5 +331,4 @@ </Target> --> <ProjectExtensions /> - <Import Project="$(MSBuildExtensionsPath)\Microsoft\Expression\Blend\WindowsPhone\v8.0\Microsoft.Expression.Blend.WindowsPhone.targets" /> -</Project> +</Project> +\ No newline at end of file diff --git a/File360/LinqToVisualTree.cs b/File360/LinqToVisualTree.cs @@ -0,0 +1,387 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Media; + +namespace LinqToVisualTree +{ + /// <summary> + /// Adapts a DependencyObject to provide methods required for generate + /// a Linq To Tree API + /// </summary> + public class VisualTreeAdapter : ILinqTree<DependencyObject> + { + private DependencyObject _item; + + public VisualTreeAdapter(DependencyObject item) + { + _item = item; + } + + public IEnumerable<DependencyObject> Children() + { + int childrenCount = VisualTreeHelper.GetChildrenCount(_item); + for (int i = 0; i < childrenCount; i++) + { + yield return VisualTreeHelper.GetChild(_item, i); + } + } + + public DependencyObject Parent + { + get + { + return VisualTreeHelper.GetParent(_item); + } + } + } +} + +namespace LinqToVisualTree +{ + /// <summary> + /// Defines an interface that must be implemented to generate the LinqToTree methods + /// </summary> + /// <typeparam name="T"></typeparam> + public interface ILinqTree<T> + { + IEnumerable<T> Children(); + + T Parent { get; } + } + + public static class TreeExtensions + { + /// <summary> + /// Returns a collection of descendant elements. + /// </summary> + public static IEnumerable<DependencyObject> Descendants(this DependencyObject item) + { + ILinqTree<DependencyObject> adapter = new VisualTreeAdapter(item); + foreach (var child in adapter.Children()) + { + yield return child; + + foreach (var grandChild in child.Descendants()) + { + yield return grandChild; + } + } + } + + /// <summary> + /// Returns a collection containing this element and all descendant elements. + /// </summary> + public static IEnumerable<DependencyObject> DescendantsAndSelf(this DependencyObject item) + { + yield return item; + + foreach (var child in item.Descendants()) + { + yield return child; + } + } + + /// <summary> + /// Returns a collection of ancestor elements. + /// </summary> + public static IEnumerable<DependencyObject> Ancestors(this DependencyObject item) + { + ILinqTree<DependencyObject> adapter = new VisualTreeAdapter(item); + + var parent = adapter.Parent; + while (parent != null) + { + yield return parent; + adapter = new VisualTreeAdapter(parent); + parent = adapter.Parent; + } + } + + /// <summary> + /// Returns a collection containing this element and all ancestor elements. + /// </summary> + public static IEnumerable<DependencyObject> AncestorsAndSelf(this DependencyObject item) + { + yield return item; + + foreach (var ancestor in item.Ancestors()) + { + yield return ancestor; + } + } + + /// <summary> + /// Returns a collection of child elements. + /// </summary> + public static IEnumerable<DependencyObject> Elements(this DependencyObject item) + { + ILinqTree<DependencyObject> adapter = new VisualTreeAdapter(item); + foreach (var child in adapter.Children()) + { + yield return child; + } + } + + /// <summary> + /// Returns a collection of the sibling elements before this node, in document order. + /// </summary> + public static IEnumerable<DependencyObject> ElementsBeforeSelf(this DependencyObject item) + { + if (item.Ancestors().FirstOrDefault() == null) + yield break; + foreach (var child in item.Ancestors().First().Elements()) + { + if (child.Equals(item)) + break; + yield return child; + } + } + + /// <summary> + /// Returns a collection of the after elements after this node, in document order. + /// </summary> + public static IEnumerable<DependencyObject> ElementsAfterSelf(this DependencyObject item) + { + if (item.Ancestors().FirstOrDefault() == null) + yield break; + bool afterSelf = false; + foreach (var child in item.Ancestors().First().Elements()) + { + if (afterSelf) + yield return child; + + if (child.Equals(item)) + afterSelf = true; + } + } + + /// <summary> + /// Returns a collection containing this element and all child elements. + /// </summary> + public static IEnumerable<DependencyObject> ElementsAndSelf(this DependencyObject item) + { + yield return item; + + foreach (var child in item.Elements()) + { + yield return child; + } + } + + /// <summary> + /// Returns a collection of descendant elements which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> Descendants<T>(this DependencyObject item) + { + return item.Descendants().Where(i => i is T).Cast<DependencyObject>(); + } + + /// <summary> + /// Returns a collection of the sibling elements before this node, in document order + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> ElementsBeforeSelf<T>(this DependencyObject item) + { + return item.ElementsBeforeSelf().Where(i => i is T).Cast<DependencyObject>(); + } + + /// <summary> + /// Returns a collection of the after elements after this node, in document order + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> ElementsAfterSelf<T>(this DependencyObject item) + { + return item.ElementsAfterSelf().Where(i => i is T).Cast<DependencyObject>(); + } + + /// <summary> + /// Returns a collection containing this element and all descendant elements + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> DescendantsAndSelf<T>(this DependencyObject item) + { + return item.DescendantsAndSelf().Where(i => i is T).Cast<DependencyObject>(); + } + + /// <summary> + /// Returns a collection of ancestor elements which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> Ancestors<T>(this DependencyObject item) + { + return item.Ancestors().Where(i => i is T).Cast<DependencyObject>(); + } + + /// <summary> + /// Returns a collection containing this element and all ancestor elements + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> AncestorsAndSelf<T>(this DependencyObject item) + { + return item.AncestorsAndSelf().Where(i => i is T).Cast<DependencyObject>(); + } + + /// <summary> + /// Returns a collection of child elements which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> Elements<T>(this DependencyObject item) + { + return item.Elements().Where(i => i is T).Cast<DependencyObject>(); + } + + /// <summary> + /// Returns a collection containing this element and all child elements. + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> ElementsAndSelf<T>(this DependencyObject item) + { + return item.ElementsAndSelf().Where(i => i is T).Cast<DependencyObject>(); + } + + } + + public static class EnumerableTreeExtensions + { + /// <summary> + /// Applies the given function to each of the items in the supplied + /// IEnumerable. + /// </summary> + private static IEnumerable<DependencyObject> DrillDown(this IEnumerable<DependencyObject> items, + Func<DependencyObject, IEnumerable<DependencyObject>> function) + { + foreach (var item in items) + { + foreach (var itemChild in function(item)) + { + yield return itemChild; + } + } + } + + /// <summary> + /// Applies the given function to each of the items in the supplied + /// IEnumerable, which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> DrillDown<T>(this IEnumerable<DependencyObject> items, + Func<DependencyObject, IEnumerable<DependencyObject>> function) + where T : DependencyObject + { + foreach (var item in items) + { + foreach (var itemChild in function(item)) + { + if (itemChild is T) + { + yield return (T)itemChild; + } + } + } + } + + /// <summary> + /// Returns a collection of descendant elements. + /// </summary> + public static IEnumerable<DependencyObject> Descendants(this IEnumerable<DependencyObject> items) + { + return items.DrillDown(i => i.Descendants()); + } + + /// <summary> + /// Returns a collection containing this element and all descendant elements. + /// </summary> + public static IEnumerable<DependencyObject> DescendantsAndSelf(this IEnumerable<DependencyObject> items) + { + return items.DrillDown(i => i.DescendantsAndSelf()); + } + + /// <summary> + /// Returns a collection of ancestor elements. + /// </summary> + public static IEnumerable<DependencyObject> Ancestors(this IEnumerable<DependencyObject> items) + { + return items.DrillDown(i => i.Ancestors()); + } + + /// <summary> + /// Returns a collection containing this element and all ancestor elements. + /// </summary> + public static IEnumerable<DependencyObject> AncestorsAndSelf(this IEnumerable<DependencyObject> items) + { + return items.DrillDown(i => i.AncestorsAndSelf()); + } + + /// <summary> + /// Returns a collection of child elements. + /// </summary> + public static IEnumerable<DependencyObject> Elements(this IEnumerable<DependencyObject> items) + { + return items.DrillDown(i => i.Elements()); + } + + /// <summary> + /// Returns a collection containing this element and all child elements. + /// </summary> + public static IEnumerable<DependencyObject> ElementsAndSelf(this IEnumerable<DependencyObject> items) + { + return items.DrillDown(i => i.ElementsAndSelf()); + } + + /// <summary> + /// Returns a collection of descendant elements which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> Descendants<T>(this IEnumerable<DependencyObject> items) + where T : DependencyObject + { + return items.DrillDown<T>(i => i.Descendants()); + } + + /// <summary> + /// Returns a collection containing this element and all descendant elements. + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> DescendantsAndSelf<T>(this IEnumerable<DependencyObject> items) + where T : DependencyObject + { + return items.DrillDown<T>(i => i.DescendantsAndSelf()); + } + + /// <summary> + /// Returns a collection of ancestor elements which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> Ancestors<T>(this IEnumerable<DependencyObject> items) + where T : DependencyObject + { + return items.DrillDown<T>(i => i.Ancestors()); + } + + /// <summary> + /// Returns a collection containing this element and all ancestor elements. + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> AncestorsAndSelf<T>(this IEnumerable<DependencyObject> items) + where T : DependencyObject + { + return items.DrillDown<T>(i => i.AncestorsAndSelf()); + } + + /// <summary> + /// Returns a collection of child elements which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> Elements<T>(this IEnumerable<DependencyObject> items) + where T : DependencyObject + { + return items.DrillDown<T>(i => i.Elements()); + } + + /// <summary> + /// Returns a collection containing this element and all child elements. + /// which match the given type. + /// </summary> + public static IEnumerable<DependencyObject> ElementsAndSelf<T>(this IEnumerable<DependencyObject> items) + where T : DependencyObject + { + return items.DrillDown<T>(i => i.ElementsAndSelf()); + } + } +} +\ No newline at end of file diff --git a/File360/LocalizedStrings.cs b/File360/LocalizedStrings.cs @@ -2,13 +2,12 @@ namespace File360 { - /// <summary> - /// Provides access to string resources. - /// </summary> + /// <summary> + /// Provides access to string resources. + /// </summary> public class LocalizedStrings { private static AppResources _localizedResources = new AppResources(); - public AppResources LocalizedResources { get { return _localizedResources; } } } } \ No newline at end of file diff --git a/File360/MainPage.xaml b/File360/MainPage.xaml @@ -1,633 +1,223 @@ <phone:PhoneApplicationPage + xmlns:local="clr-namespace:File360" + xmlns:fx="clr-namespace:MetroInMotionUtils" + xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" + xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" - xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps" xmlns:es="clr-namespace:Microsoft.Expression.Shapes;assembly=Microsoft.Expression.Drawing" x:Name="Menu" x:Class="File360.MainPage" - xmlns:local="clr-namespace:File360" - Orientation="Portrait" + local:TiltEffect.IsTiltEnabled="True" mc:Ignorable="d" + Orientation="Portrait" shell:SystemTray.IsVisible="True"> <phone:PhoneApplicationPage.Resources> - <local:AppSettings x:Key="appSettings"> - </local:AppSettings> - <DataTemplate x:Name="File360FileTemplate"> - <Grid Tap="folderTap_Click" Height="130" Width="110" VerticalAlignment="Bottom" HorizontalAlignment="Right" Background="{x:Null}"> - <Rectangle Width="85" Height="65" Margin="0,0,0,22"> - <Rectangle.Fill> - <ImageBrush Stretch="Uniform" ImageSource="{Binding Name2}"/> - </Rectangle.Fill> - </Rectangle> - <TextBlock x:Name="folderTap" TextWrapping="NoWrap" TextTrimming="WordEllipsis" Text="{Binding Name}" Foreground="{StaticResource PhoneForegroundBrush}" Margin="0,92,0,0" TextAlignment="Center" FontFamily="Segoe UI Light" FontSize="16"/> - </Grid> + + <DataTemplate x:Key="File360ItemTemplate"> + <StackPanel Tap="folderTap_Click" > + <toolkit:ContextMenuService.ContextMenu> + + <toolkit:ContextMenu IsZoomEnabled="True" x:Name="ContextMenu"> + + <toolkit:MenuItem x:Name="Copy" Header="copy" Click="Copy_Click"/> + + <toolkit:MenuItem x:Name="Cut" Header="cut" Click="Cut_Click"/> + + <toolkit:MenuItem x:Name="Delete" Header="delete" Click="Delete_Click"/> + + <toolkit:MenuItem x:Name="Hide" Header="hide" Click="Hide_Click"/> + + </toolkit:ContextMenu> + + </toolkit:ContextMenuService.ContextMenu> + <Image Source="{Binding Name2}" Width="60" Height="55" VerticalAlignment="Center" HorizontalAlignment="Center" /> + <TextBlock x:Name="folderTap" Text="{Binding Name}" TextWrapping="NoWrap" VerticalAlignment="Bottom" TextAlignment="Center" FontSize="16" /> + </StackPanel> </DataTemplate> - <DataTemplate x:Name="SettingsItemTemplate"> - <Grid Tap="SettingTap_Tap" x:Name="SettingTap" Height="120"> - <TextBlock x:Name="txtB" Margin="116,10,10,48" Foreground="{StaticResource PhoneForegroundBrush}" Text="{Binding SettingName}" FontSize="36"/> - <TextBlock Margin="111,65,17,20" Foreground="{StaticResource PhoneSubtleBrush}" Text="{Binding SettingDescription}" FontFamily="Segoe UI Light"/> - <Rectangle HorizontalAlignment="Left" Height="75" Margin="6,24,0,0" Stroke="{x:Null}" VerticalAlignment="Top" Width="75" Fill="{StaticResource PhoneForegroundBrush}"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="{Binding SettingPicture}"/> - </Rectangle.OpacityMask> - </Rectangle> - </Grid> + + <DataTemplate x:Name="File360MusicTemplate"> + <StackPanel> + <TextBlock x:Name="{Binding MusicIndex}" Text="{Binding SongName}" FontFamily="Default" Tap="txtB_Tap" FontWeight="Normal" FontSize="30" Height="43"/> + <TextBlock x:Name="txtB2" Text="{Binding ArtistName}" TextWrapping="Wrap" Style="{StaticResource PhoneTextSubtleStyle}" Height="50"/> + </StackPanel> </DataTemplate> - <Style x:Key="BackButtonEllipse" TargetType="Button"> - <Setter Property="Background" Value="Transparent"/> - <Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/> - <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/> - <Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/> - <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/> - <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/> - <Setter Property="Padding" Value="10,5,10,6"/> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="Button"> - <Grid Background="Transparent" Margin="0,0,0,2"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal"/> - <VisualState x:Name="MouseOver"/> - <VisualState x:Name="Pressed"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="ButtonBackground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Disabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Margin="0,0,0,1" Background="{StaticResource PhoneForegroundBrush}"> - <Border.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/back.png"/> - </Border.OpacityMask> - <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> - </Border> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - <Style x:Key="HamburgerButton" TargetType="Button"> - <Setter Property="Background" Value="Transparent"/> - <Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/> - <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/> - <Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/> - <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/> - <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/> - <Setter Property="Padding" Value="10,5,10,6"/> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="Button"> - <Grid Background="Transparent"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal"/> - <VisualState x:Name="MouseOver"/> - <VisualState x:Name="Pressed"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneForegroundBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Disabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="{StaticResource PhoneTouchTargetOverhang}"> - <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> - </Border> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - <Style x:Key="SliderStyle" TargetType="Slider"> - <Setter Property="BorderThickness" Value="0"/> - <Setter Property="BorderBrush" Value="Transparent"/> - <Setter Property="Maximum" Value="10"/> - <Setter Property="Minimum" Value="0"/> - <Setter Property="Value" Value="0"/> - <Setter Property="Background" Value="{StaticResource PhoneChromeBrush}"/> - <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="Slider"> - <Grid Margin="0,0,0,1" Background="{StaticResource PhoneChromeBrush}"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal"/> - <VisualState x:Name="MouseOver"/> - <VisualState x:Name="Disabled"> - <Storyboard> - <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HorizontalTrack"/> - <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VerticalTrack"/> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="VerticalFill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <Grid x:Name="HorizontalTemplate" Margin="10,0,10,10"> - <Rectangle x:Name="HorizontalTrack" IsHitTestVisible="False" Margin="0,15,0,16" Fill="{StaticResource PhoneBorderBrush}" RadiusY="3.5" RadiusX="3.5"/> - <Rectangle x:Name="HorizontalFill" IsHitTestVisible="False" Margin="0,15,0,16" RadiusX="3.5" RadiusY="3.5" StrokeThickness="2"> - <Rectangle.Fill> - <SolidColorBrush Color="White"/> - </Rectangle.Fill> - <Rectangle.Clip> - <RectangleGeometry Rect="0, 0, 6, 12"/> - </Rectangle.Clip> - </Rectangle> - <Rectangle x:Name="HorizontalCenterElement" HorizontalAlignment="Left" Margin="0,8" Width="22" Stroke="{StaticResource PhoneForegroundBrush}" Fill="{StaticResource PhoneChromeBrush}" RadiusY="9" RadiusX="9" StrokeThickness="4.5"> - <Rectangle.RenderTransform> - <TranslateTransform/> - </Rectangle.RenderTransform> - </Rectangle> - </Grid> - <Grid x:Name="VerticalTemplate" Margin="{StaticResource PhoneVerticalMargin}"> - <Rectangle x:Name="VerticalTrack" Fill="{TemplateBinding Background}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12"/> - <Rectangle x:Name="VerticalFill" Fill="{TemplateBinding Foreground}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12"> - <Rectangle.Clip> - <RectangleGeometry Rect="0, 0, 12, 6"/> - </Rectangle.Clip> - </Rectangle> - <Rectangle x:Name="VerticalCenterElement" Fill="{StaticResource PhoneForegroundBrush}" Height="12" Margin="12,0,12,0" VerticalAlignment="Top" Width="24"> - <Rectangle.RenderTransform> - <TranslateTransform/> - </Rectangle.RenderTransform> - </Rectangle> - </Grid> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - <Style x:Key="PhoneCurvedTextBoxStyle" TargetType="toolkit:PhoneTextBox"> - <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/> - <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/> - <Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/> - <Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/> - <Setter Property="BorderBrush" Value="{StaticResource PhoneTextBoxBrush}"/> - <Setter Property="SelectionBackground" Value="{StaticResource PhoneAccentBrush}"/> - <Setter Property="SelectionForeground" Value="{StaticResource PhoneTextBoxSelectionForegroundBrush}"/> - <Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/> - <Setter Property="Padding" Value="{StaticResource PhoneBorderThickness}"/> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="toolkit:PhoneTextBox"> - <Grid x:Name="RootGrid" Background="Transparent"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal"/> - <VisualState x:Name="Disabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HintBorder"> - <DiscreteObjectKeyFrame KeyTime="0"> - <DiscreteObjectKeyFrame.Value> - <Visibility>Collapsed</Visibility> - </DiscreteObjectKeyFrame.Value> - </DiscreteObjectKeyFrame> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TextBorder"> - <DiscreteObjectKeyFrame KeyTime="0"> - <DiscreteObjectKeyFrame.Value> - <Visibility>Visible</Visibility> - </DiscreteObjectKeyFrame.Value> - </DiscreteObjectKeyFrame> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="TextBorder"> - <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="TextBorder"> - <DiscreteObjectKeyFrame KeyTime="0" Value="0"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="HorizontalAlignment" Storyboard.TargetName="Text"> - <DiscreteObjectKeyFrame KeyTime="0"> - <DiscreteObjectKeyFrame.Value> - <HorizontalAlignment>Stretch</HorizontalAlignment> - </DiscreteObjectKeyFrame.Value> - </DiscreteObjectKeyFrame> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - <VisualStateGroup x:Name="FocusStates"> - <VisualState x:Name="Focused"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="HintBorder"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxEditBackgroundBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="HintBorder"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxEditBorderBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Unfocused"/> - </VisualStateGroup> - <VisualStateGroup x:Name="LengthIndicatorStates"> - <VisualState x:Name="LengthIndicatorVisible"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LengthIndicator"> - <DiscreteObjectKeyFrame KeyTime="0:0:0"> - <DiscreteObjectKeyFrame.Value> - <Visibility>Visible</Visibility> - </DiscreteObjectKeyFrame.Value> - </DiscreteObjectKeyFrame> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="RootGrid"> - <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="0, 0, 0, 27"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LengthIndicator"> - <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="0.6"/> - </ObjectAnimationUsingKeyFrames> - <DoubleAnimation Duration="0:0:0.350" To="32" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LengthIndicator"> - <DoubleAnimation.EasingFunction> - <ExponentialEase Exponent="6"/> - </DoubleAnimation.EasingFunction> - </DoubleAnimation> - </Storyboard> - </VisualState> - <VisualState x:Name="LengthIndicatorHidden"> - <Storyboard> - <DoubleAnimation Duration="0:0:0.350" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LengthIndicator"> - <DoubleAnimation.EasingFunction> - <ExponentialEase Exponent="6"/> - </DoubleAnimation.EasingFunction> - </DoubleAnimation> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="RootGrid"> - <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="0, 0, 0, 0"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LengthIndicator"> - <DiscreteObjectKeyFrame KeyTime="0:0:0.350" Value="0"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LengthIndicator"> - <DiscreteObjectKeyFrame KeyTime="0:0:0.350"> - <DiscreteObjectKeyFrame.Value> - <Visibility>Collapsed</Visibility> - </DiscreteObjectKeyFrame.Value> - </DiscreteObjectKeyFrame> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <Border x:Name="LengthIndicatorBorder"> - <TextBlock x:Name="LengthIndicator" Foreground="{StaticResource PhoneContrastBackgroundBrush}" FontSize="{StaticResource PhoneFontSizeNormal}" HorizontalAlignment="Right" Margin="{StaticResource PhoneMargin}" Opacity="0" TextAlignment="Right" VerticalAlignment="Bottom"> - <TextBlock.RenderTransform> - <TranslateTransform/> - </TextBlock.RenderTransform> - </TextBlock> - </Border> - <Border x:Name="HintBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="{StaticResource PhoneTouchTargetOverhang}"> - <Grid> - <ContentControl x:Name="HintContent" Background="Transparent" Content="{TemplateBinding Hint}" HorizontalAlignment="Left" Margin="3,0,3,0" Style="{TemplateBinding HintStyle}" Visibility="{TemplateBinding ActualHintVisibility}" VerticalAlignment="Center"/> - <ContentControl x:Name="ContentElement" BorderThickness="0" HorizontalContentAlignment="Stretch" Margin="{StaticResource PhoneTextBoxInnerMargin}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="Stretch"/> - <Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="59" Margin="-3,-1,0,0" Stroke="Black" VerticalAlignment="Top" Width="373"/> - </Grid> - </Border> - <Border x:Name="TextBorder" BorderBrush="{StaticResource PhoneInverseBackgroundBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" Margin="{StaticResource PhoneTouchTargetOverhang}" Visibility="Collapsed"> - <TextBox x:Name="Text" Foreground="{StaticResource PhoneDisabledBrush}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalAlignment="Left" SelectionForeground="{TemplateBinding SelectionForeground}" SelectionBackground="{TemplateBinding SelectionBackground}" TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}" Text="{TemplateBinding Text}" BorderBrush="{StaticResource PhoneChromeBrush}"/> - </Border> - <Border x:Name="ActionIconBorder" Background="Transparent" HorizontalAlignment="Right" Height="72" VerticalAlignment="Bottom" Width="84"> - <Image x:Name="ActionIcon" Height="26" Source="{TemplateBinding ActionIcon}" Width="26"/> - </Border> - <TextBlock x:Name="MeasurementTextBlock" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" IsHitTestVisible="False" Margin="8" Opacity="0" TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}" Text="{TemplateBinding Text}"/> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - <Style x:Key="ListPickerItemStyle" TargetType="toolkit:ListPickerItem"> - <Setter Property="Background" Value="Transparent"/> - <Setter Property="HorizontalContentAlignment" Value="Stretch"/> - <Setter Property="Padding" Value="8 10"/> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="toolkit:ListPickerItem"> - <Grid Background="{TemplateBinding Background}"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="SelectionStates"> - <VisualState x:Name="Unselected"/> - <VisualState x:Name="Selected"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> + </phone:PhoneApplicationPage.Resources> <phone:PhoneApplicationPage.ApplicationBar> - <shell:ApplicationBar x:Name="appBar" IsVisible="True" IsMenuEnabled="True" Mode="Default" Opacity="1.0" BackgroundColor="Black" ForegroundColor="White" > + <shell:ApplicationBar x:Name="appBar" IsVisible="True" IsMenuEnabled="True" Mode="Default" Opacity="1.0" > + <shell:ApplicationBar.MenuItems> - <shell:ApplicationBarMenuItem x:Name="settings_appBar" IsEnabled="True" Click="Settings_Click" Text="settings"/> + <shell:ApplicationBarMenuItem Text="settings" Click="Settings_Click" /> </shell:ApplicationBar.MenuItems> - <shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Select.png" IsEnabled="True" Text="multi select"/> - <shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Add.png" IsEnabled="True" Text="new"/> + + <shell:ApplicationBarIconButton x:Name="NewFolder" IconUri="/Toolkit.Content/ApplicationBar.Add.png" Text="new folder" Click="NewFolder_Click" /> + <shell:ApplicationBarIconButton x:Name="MultiSelect" IconUri="/Toolkit.Content/ApplicationBar.Select.png" Text="multi select" Click="MultiSelect_Click" /> + </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar> - <Canvas x:Name="canvas" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> - <Canvas.Resources> - <Storyboard x:Name="moveAnimation"> - <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="LayoutRoot" d:IsOptimized="True" /> - </Storyboard> - </Canvas.Resources> - <Canvas CacheMode="BitmapCache" x:Name="LayoutRoot" Width="1320" VerticalAlignment="Stretch" Canvas.Left="-420" Height="768"> - <Border Width="420" CacheMode="BitmapCache" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="768" Background="{Binding Path=SideBarColor, Mode=OneWay, Source={StaticResource appSettings}}"> - <Grid x:Name="LeftGrid"> - <Grid.Background> - <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> - <GradientStop Color="#33000000" Offset="0"/> - <GradientStop Color="#333CF1F9" Offset="1"/> - </LinearGradientBrush> - </Grid.Background> - <Grid Height="92" VerticalAlignment="Top" HorizontalAlignment="Left" Width="420" Margin="0,3,0,0"> - <toolkit:PhoneTextBox Hint="Search" HidesActionItemWhenEmpty="True" TextChanged="searchBox_TextChanged" x:Name="searchBox" HorizontalAlignment="Left" Height="88" Margin="10,4,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="400" BorderBrush="{x:Null}" Style="{StaticResource PhoneCurvedTextBoxStyle}"> - <toolkit:PhoneTextBox.Foreground> - <SolidColorBrush Color="{StaticResource PhoneChromeColor}"/> - </toolkit:PhoneTextBox.Foreground> - </toolkit:PhoneTextBox> - <Rectangle HorizontalAlignment="Left" Height="58" VerticalAlignment="Top" Width="76" Margin="316,22,0,0" Fill="{StaticResource PhoneForegroundBrush}"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/go.png"/> - </Rectangle.OpacityMask> - </Rectangle> - </Grid> - <Grid HorizontalAlignment="Left" Width="420" Margin="0,95,0,0"> - <ListBox x:Name="SideBar" Height="635" VerticalAlignment="Bottom" Margin="10,0,10,38" Background="{x:Null}"> - <Grid Width="406" Height="122"> - <Grid.Background> - <SolidColorBrush Color="{Binding Path=SideBarColor, Mode=OneWay, Source={StaticResource appSettings}}"/> - </Grid.Background> - <TextBlock Text="Home" FontSize="26" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="126,42,124,49" Width="156" Foreground="{StaticResource PhoneForegroundBrush}"/> - <Rectangle Fill="{StaticResource PhoneForegroundBrush}" HorizontalAlignment="Left" Height="50" Margin="34,37,0,0" VerticalAlignment="Top" Width="50"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/home.png"/> - </Rectangle.OpacityMask> - </Rectangle> + + + + <Grid x:Name="LayoutRoot"> + <Grid.RowDefinitions> + <RowDefinition Height="126*"/> + <RowDefinition Height="183*"/> + <RowDefinition Height="388*"/> + </Grid.RowDefinitions> + <Canvas x:Name="canvas" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.RowSpan="3"> + <Canvas.Resources> + <Storyboard x:Name="moveAnimation"> + <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="CanvasRoot" d:IsOptimized="True" /> + </Storyboard> + </Canvas.Resources> + <Canvas.Background> + <StaticResource ResourceKey="PhoneBackgroundBrush"/> + </Canvas.Background> + <Canvas CacheMode="BitmapCache" x:Name="CanvasRoot" Width="1170" VerticalAlignment="Stretch" Canvas.Left="-320" Height="768"> + <Border Width="310" CacheMode="BitmapCache" Background="{StaticResource PhoneBackgroundBrush}" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="768"> + <Grid HorizontalAlignment="Left" Width="310" Background="{StaticResource PhoneChromeBrush}"> + <ListBox x:Name="SideBar" Height="978" VerticalAlignment="Bottom" Margin="0,0,4,-301"> + <ListBox.Background> + <ImageBrush Stretch="UniformToFill" ImageSource="/Resources/Assets/Wallpaper/bg1.jpg"/> + </ListBox.Background> + <Grid Width="310" Background="{StaticResource PhoneProgressBarBackgroundBrush}"> + <Ellipse HorizontalAlignment="Left" Height="64" Margin="23,25,0,0" VerticalAlignment="Top" Width="64" Fill="{StaticResource PhoneButtonBasePressedForegroundBrush}"/> + <Image Margin="39,39,240,31" Source="/Resources/Assets/Images/user.png"/> + <TextBlock Text="Hi User!" FontSize="24" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="15,0,0,0"> + <TextBlock.Foreground> + <SolidColorBrush Color="White"/> + </TextBlock.Foreground> + </TextBlock> </Grid> - <Grid Width="406" Height="121"> - <Grid.Background> - <SolidColorBrush Color="{Binding Path=SideBarColor, Mode=OneWay, Source={StaticResource appSettings}}"/> - </Grid.Background> - <TextBlock Margin="138,50,119,47" Text="OneDrive" FontSize="26" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource PhoneForegroundBrush}"/> - <Ellipse x:Name="oneFill" Fill="#FF094AB2" HorizontalAlignment="Left" Height="95" VerticalAlignment="Top" Width="95" Margin="11,16,0,0" Stroke="{StaticResource PhoneForegroundBrush}" StrokeThickness="3"> + <Grid Width="310" Height="103" Background="#AA000000"> + <Ellipse Tap="oneFill_Tap" x:Name="oneFill" HorizontalAlignment="Left" Height="64" Margin="23,23,0,0" VerticalAlignment="Top" Width="64" Fill="#FF094AB2"> <Ellipse.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/onedrive.png"/> + <ImageBrush ImageSource="Resources/Assets/Images/onedrive.png" Stretch="Fill"/> </Ellipse.OpacityMask> </Ellipse> + <TextBlock Margin="0,0,15,0" Text="OneDrive" FontSize="24" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"> + <TextBlock.Foreground> + <SolidColorBrush Color="White"/> + </TextBlock.Foreground> + </TextBlock> </Grid> - <Grid x:Name="s" Tap="sdcard_menu_Tap" Width="406" Height="122"> - <Grid.Background> - <SolidColorBrush Color="{Binding Path=SideBarColor, Mode=OneWay, Source={StaticResource appSettings}}"/> - </Grid.Background> - <TextBlock x:Name="sdText" Margin="164,47,0,44" Text="SD" FontSize="26" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="{StaticResource PhoneForegroundBrush}"/> - <Rectangle x:Name="sdImage" Fill="{StaticResource PhoneForegroundBrush}" HorizontalAlignment="Left" Height="50" Margin="29,40,0,0" VerticalAlignment="Top" Width="50" Stretch="Uniform"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/sdcard.png"/> - </Rectangle.OpacityMask> - </Rectangle> + <Grid x:Name="sdcard_menu" Tap="sdcard_menu_Tap" Width="310" Height="107" Background="{StaticResource TransparentBrush}"> + <TextBlock Margin="100,0,0,0" Text="SD" FontSize="24" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Left"> + <TextBlock.Foreground> + <SolidColorBrush Color="White"/> + </TextBlock.Foreground> + </TextBlock> + <Ellipse Fill="{StaticResource PhoneInverseBackgroundBrush}" HorizontalAlignment="Left" Height="64" Margin="23,25,0,0" VerticalAlignment="Top" Width="64"/> + <Image Margin="35,27,237,24" Source="/Resources/Assets/Images/sdcard.png" OpacityMask="{StaticResource PhoneAccentBrush}"/> </Grid> - <Grid Width="406" Height="122"> - <Grid.Background> - <SolidColorBrush Color="{Binding Path=SideBarColor, Mode=OneWay, Source={StaticResource appSettings}}"/> - </Grid.Background> - <TextBlock Margin="157,51,0,38" Text="Phone" FontSize="26" TextAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center" Height="33" Foreground="{StaticResource PhoneForegroundBrush}"/> - <Rectangle Fill="{StaticResource PhoneForegroundBrush}" HorizontalAlignment="Left" Height="66" Margin="18,35,0,0" VerticalAlignment="Top" Width="75"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/phone.png"/> - </Rectangle.OpacityMask> - </Rectangle> + <Grid Width="310" Height="107" Background="{StaticResource PhoneDisabledBrush}"> + <TextBlock Margin="100,0,0,0" Text="Phone" FontSize="24" TextAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center"> + <TextBlock.Foreground> + <SolidColorBrush Color="White"/> + </TextBlock.Foreground> + </TextBlock> + <Ellipse Fill="{StaticResource PhoneInverseBackgroundBrush}" HorizontalAlignment="Left" Height="64" Margin="23,25,0,0" VerticalAlignment="Top" Width="64"/> + <Image Margin="43,28,245,20" Source="/Resources/Assets/Images/phone.png" OpacityMask="{StaticResource PhoneAccentBrush}"/> </Grid> - <Grid Height="137" Width="406"> - <Grid.Background> - <SolidColorBrush Color="{Binding Path=SideBarColor, Mode=OneWay, Source={StaticResource appSettings}}"/> - </Grid.Background> - <TextBlock Text="Downloads" FontSize="36" FontFamily="Segoe WP Light" Margin="27,10,206,71" Foreground="{StaticResource PhoneForegroundBrush}"/> - <TextBlock Text="there are no active downloads" FontSize="22" FontFamily="Segoe WP Light" Margin="27,66,-7,15" Foreground="{StaticResource PhoneBorderBrush}"/> - <Rectangle Fill="{StaticResource PhoneForegroundBrush}" Margin="200,10,141,71" Width="65"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/download.png"/> - </Rectangle.OpacityMask> + <Grid toolkit:TiltEffect.SuppressTilt="True" Margin="0,0,0,0" Width="310" Height="142" Background="{StaticResource PhoneBorderBrush}"> + <Rectangle x:Name="rect_above" HorizontalAlignment="Left" Height="22" Margin="24,30,0,0" VerticalAlignment="Top" Width="56" RenderTransformOrigin="0.5,0.5"> + <Rectangle.Projection> + <PlaneProjection RotationX="-67" /> + </Rectangle.Projection> </Rectangle> + + <Rectangle x:Name="dl" HorizontalAlignment="Left" Height="43" Margin="25,54,0,0" VerticalAlignment="Top" Width="54"/> + <Ellipse x:Name="pl" HorizontalAlignment="Left" Height="78" Margin="206,35,0,0" VerticalAlignment="Top" Width="90"/> + <Image HorizontalAlignment="Right" Height="112" Margin="0,12,127,18" VerticalAlignment="Center" Tap="Music_Tap" Width="82" Source="/Resources/Assets/Images/MusicBar.png"/> + <Image Tap="downloads_Tap" HorizontalAlignment="Left" Height="91" VerticalAlignment="Center" Width="84" Source="/Resources/Assets/Images/download.png" Margin="10,22,0,29" OpacityMask="{StaticResource PhoneBackgroundBrush}" Opacity="0.9"/> + <Image HorizontalAlignment="Right" Height="120" Margin="0,12,14,10" VerticalAlignment="Center" Tap="VideoLister" Width="90" Source="/Resources/Assets/Images/video.png"/> </Grid> </ListBox> + <Rectangle Fill="{StaticResource PhoneChromeBrush}" Stroke="{StaticResource PhoneChromeBrush}" toolkit:TiltEffect.SuppressTilt="True" Margin="-7,0,0,677" RadiusY="8" RadiusX="8"/> + <TextBox x:Name="searchBox" HorizontalAlignment="Left" Height="76" Margin="10,7,0,0" TextWrapping="NoWrap" VerticalAlignment="Top" Width="221" Style="{StaticResource CurvedTextBox}"/> + <Button x:Name="SearchModule" Click="SearchModule_Click" toolkit:TiltEffect.IsTiltEnabled="True" HorizontalAlignment="Left" Height="76" Margin="231,7,0,0" VerticalAlignment="Top" Width="69" ClickMode="Press" Style="{StaticResource SearchButton}"> + <Button.OpacityMask> + <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/Search.png"/> + </Button.OpacityMask> + + </Button> + </Grid> - </Grid> - </Border> - <Border Width="420" CacheMode="BitmapCache" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="768" Canvas.Left="900"> - <Border.Background> - <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> - <GradientStop Color="#33000000" Offset="0"/> - <GradientStop Color="#333CF1F9" Offset="1"/> - </LinearGradientBrush> - </Border.Background> - <Grid RenderTransformOrigin="0.452,0.507"> - <Grid Tap="playState_Tap" HorizontalAlignment="Left" Height="125" VerticalAlignment="Top" Width="420" Background="{StaticResource PhoneChromeBrush}"> - <TextBlock x:Name="songName" HorizontalAlignment="Left" Height="40" Margin="37,50,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="373" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="28" FontFamily="Segoe WP Light"/> - <TextBlock x:Name="artistName" HorizontalAlignment="Left" Height="30" Margin="36,90,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="374" Foreground="{StaticResource PhoneAccentBrush}" FontSize="22" FontFamily="Segoe wp Light"/> - <TextBlock HorizontalAlignment="Left" Height="37" Margin="72,10,0,0" TextWrapping="Wrap" Text="NOW PLAYING" VerticalAlignment="Top" Width="256" FontFamily="Segoe WP Light" FontSize="30" Foreground="{StaticResource PhoneForegroundBrush}"/> - <Rectangle x:Name="playState" Fill="{StaticResource PhoneAccentBrush}" HorizontalAlignment="Left" Height="40" Margin="18,10,0,0" StrokeThickness="6" VerticalAlignment="Top" Width="49"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/transport.play.png"/> - </Rectangle.OpacityMask> + </Border> + <Border Width="370" CacheMode="BitmapCache" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="768" Canvas.Left="800"> + <Border.Background> + <ImageBrush ImageSource="/Resources/Assets/Wallpaper/bg1.jpg"/> + </Border.Background> + <Grid x:Name="music_bg"> + <Grid.Background> + <SolidColorBrush Color="{StaticResource PhoneSemitransparentColor}"/> + </Grid.Background> + <Rectangle HorizontalAlignment="Left" Height="335" Margin="20,14,0,0" VerticalAlignment="Top" Width="327" RadiusY="22" RadiusX="22" Fill="{StaticResource PhoneDisabledBrush}" Stroke="{StaticResource PhoneChromeBrush}"/> + <Rectangle x:Name="coverArt" HorizontalAlignment="Left" Height="316" Margin="30,24,0,0" VerticalAlignment="Top" Width="306" RadiusY="22" RadiusX="22"> + <Rectangle.Fill> + <ImageBrush ImageSource="/Resources/Assets/Images/headphone.png" Stretch="None"/> + </Rectangle.Fill> </Rectangle> - </Grid> - <Slider Visibility="Collapsed" HorizontalAlignment="Left" Height="50" Margin="40,325,0,0" VerticalAlignment="Top" Width="315" Style="{StaticResource SliderStyle}" Background="#FFC7A3A3"/> - <ToggleButton Content="" HorizontalAlignment="Left" Height="50" Margin="364,4,0,0" VerticalAlignment="Top" Width="46" Background="{StaticResource PhoneForegroundBrush}" BorderThickness="0"> - <ToggleButton.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/like.png"/> - </ToggleButton.OpacityMask> - </ToggleButton> - </Grid> - </Border> - <Grid x:Name="grdCommands" CacheMode="BitmapCache" Grid.Column="1" Height="768" Width="480" Canvas.Left="420" Background="{Binding Path=PageColor, Mode=OneWay, Source={StaticResource appSettings}}" > - <Grid x:Name="header" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,625"> - <TextBlock DoubleTap="Vault_DoubleTap" HorizontalAlignment="Left" Height="33" TextWrapping="Wrap" VerticalAlignment="Top" Width="131" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="24" Margin="74,16,0,0" FontFamily="Segoe UI Symbol"> - <Run Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"/> - <Run Foreground="{StaticResource PhoneAccentBrush}" Text="°"/> + <Button x:Name="music_reverse" Content="" HorizontalAlignment="Left" Height="97" Margin="30,358,0,0" VerticalAlignment="Top" Width="102" Style="{StaticResource Previous}"/> + <Button x:Name="music_forward" Content="" HorizontalAlignment="Left" Height="97" Margin="234,358,0,0" VerticalAlignment="Top" Width="102" Style="{StaticResource Forward}"/> + <Slider x:Name="music_slider" HorizontalAlignment="Left" Height="82" Margin="30,276,0,0" VerticalAlignment="Top" Width="306" Style="{StaticResource SliderStyle}"/> + <toolkit:LongListMultiSelector + x:Name="musicLists" + Margin="0,482,0,0" + ItemTemplate="{StaticResource File360MusicTemplate}" + IsGroupingEnabled="False"/> + <Button HorizontalAlignment="Left" Height="97" Margin="132,358,0,0" VerticalAlignment="Top" Width="102" Style="{StaticResource ButtonPlay}"/> + </Grid> + </Border> + <Grid x:Name="grdCommands" CacheMode="BitmapCache" Grid.Column="1" Height="{Binding ActualHeight, ElementName=canvas}" Width="485" Canvas.Left="315" > + <toolkit:LongListMultiSelector + x:Name="sdlists" + ItemTemplate="{StaticResource File360ItemTemplate}" + IsGroupingEnabled="False" + GridCellSize="107,90" LayoutMode="Grid" Margin="15,194,10,0"/> + <TextBlock HorizontalAlignment="Left" DoubleTap="vault_button_DoubleTap" TextWrapping="Wrap" VerticalAlignment="Top" Height="26" Width="139" Margin="68,17,0,0" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="24"> + <Run Foreground="{StaticResource PhoneForegroundBrush}" Text="FILE360"/> + <Run FontWeight="Bold" Foreground="{StaticResource PhoneAccentBrush}" Text="°"/> </TextBlock> - - <Button Click="OpenClose_Right" HorizontalAlignment="Right" VerticalAlignment="Top" Width="71" Height="60" BorderBrush="{x:Null}" BorderThickness="0" Background="{x:Null}" Foreground="{x:Null}"/> - <Button Click="OpenClose_Left" Content="" VerticalAlignment="Top" Height="60" HorizontalAlignment="Right" Width="74" BorderThickness="0" Background="{StaticResource PhoneAccentBrush}" Margin="0,0,406,0" Style="{StaticResource HamburgerButton}"> - <Button.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/Hamburger.png"/> - </Button.OpacityMask> - </Button> - <TextBlock x:Name="fUrl" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Left" Height="44" Margin="10,99,0,0" TextWrapping="NoWrap" VerticalAlignment="Top" Width="460"> - <Span> - <Run x:Name="sdop" FontSize="30" FontWeight="Normal" Text="sd:\\" Foreground="{StaticResource PhoneAccentBrush}"/> + <TextBlock x:Name="nosd" Visibility="Collapsed" Style="{StaticResource PhoneTextLargeStyle}" Margin="10,173,0,0" TextWrapping="Wrap" Height="104" Width="460" TextAlignment="Center" Foreground="{StaticResource PhoneForegroundBrush}"> + <Span Foreground="{StaticResource PhoneForegroundBrush}" FontSize="32"> + <Run Text="no "/> </Span> - <Span> - <Run x:Name="fileUrl" Text=" " FontWeight="Light" FontStretch="UltraCondensed" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="26"/> + <Span Foreground="{StaticResource PhoneAccentBrush}" FontSize="32" > + <Run Text="sdcard " FontWeight="Bold"/> + </Span> + <Span Foreground="{StaticResource PhoneForegroundBrush}" FontSize="32"> + <Run Text="found, please insert one to view files. "/> </Span> </TextBlock> - <TextBlock TextTrimming="WordEllipsis" x:Name="fileHeader" HorizontalAlignment="Left" Height="46" TextWrapping="Wrap" VerticalAlignment="Top" Width="445" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="34" FontFamily="Segoe WP" Margin="10,49,0,0"/> + <TextBlock x:Name="sd" Text="sdcard" Style="{StaticResource PhoneTextLargeStyle}" Margin="24,49,17,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="49" Width="439" FontSize="40" Foreground="{StaticResource PhoneForegroundBrush}" /> + <Rectangle HorizontalAlignment="Left" Height="40" Margin="74,124,0,0" VerticalAlignment="Top" Width="401" Fill="{StaticResource PhoneChromeBrush}"/> + <TextBlock x:Name="textBlock" TextWrapping="NoWrap" Height="40" FontFamily="Segoe WP Semibold" FontSize="24" Canvas.Left="500" Canvas.Top="120" Margin="94,124,10,0" VerticalAlignment="Top" Foreground="{StaticResource PhoneForegroundBrush}"/> + <Ellipse HorizontalAlignment="Left" Height="70" Margin="15,109,0,0" VerticalAlignment="Top" Width="74" Fill="{StaticResource PhoneChromeBrush}"/> + <Button x:Name="homeButton" toolkit:TiltEffect.IsTiltEnabled="True" Tap="sdcard_menu_Tap" Content="" HorizontalAlignment="Left" Margin="14,109,0,0" VerticalAlignment="Top" Width="74" BorderBrush="{x:Null}" Foreground="{x:Null}" Height="70" Style="{StaticResource MainBarButton}"> + <Button.Background> + <ImageBrush Stretch="Uniform" ImageSource="greyhome.png"/> + </Button.Background> + <Button.OpacityMask> + <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/home.png"/> + </Button.OpacityMask> + </Button> + <Rectangle Visibility="Collapsed" x:Name="Blurer" HorizontalAlignment="Left" Height="784" VerticalAlignment="Top" Width="490" Margin="-10,0,0,-88" Fill="{StaticResource PhoneSemitransparentBrush}"/> + <Button toolkit:TiltEffect.IsTiltEnabled="True" Click="OpenClose_Left" Margin="10,11,412,639" BorderBrush="{x:Null}" Foreground="{x:Null}" Style="{StaticResource SideMenuInitiater}"> + <Button.Background> + <ImageBrush ImageSource="/Resources/Assets/Images/Hamburger.png" Stretch="Uniform"/> + </Button.Background> + </Button> + <toolkit:Rating x:Name="rating" HorizontalAlignment="Left" Height="34" Margin="685,27,-330,0" VerticalAlignment="Top" Width="130" Background="{x:Null}"/> + <Button Click="OpenClose_Right" HorizontalAlignment="Left" Height="57" Margin="416,0,0,0" VerticalAlignment="Top" Width="59"/> </Grid> - <Popup x:Name="PasswordAccepter" Margin="0,0,0,71"> - <Grid Height="700" Width="480" Background="{StaticResource PhoneBackgroundBrush}"> - <Grid Margin="0,0,0,603"> - <TextBlock x:Name="passwordDisplay" VerticalAlignment="Center" HorizontalAlignment="Left" Height="72" Margin="51,16,0,9" TextWrapping="Wrap" Width="384" FontSize="48" TextAlignment="Center" Foreground="{StaticResource PhoneForegroundBrush}"/> - </Grid> - <toolkit:WrapPanel x:Name="wrapPanel" Margin="10,102,10,187" Height="307.5"/> - <Button Content="x" HorizontalAlignment="Left" Click="PopupCancel" Height="102.5" Margin="10,462,0,0" VerticalAlignment="Top" Width="153.3" BorderBrush="{x:Null}" Background="{x:Null}" FontSize="48" FontFamily="Ebrima"/> - <Button Content="0" Click="Numbers_Click" HorizontalAlignment="Left" Height="102.5" Margin="163,462,0,0" VerticalAlignment="Top" Width="153.3" BorderBrush="{x:Null}" FontSize="35" Background="{x:Null}"/> - <Button Content="" Click="PasswordBackspace" HorizontalAlignment="Left" Height="102.5" Margin="327,462,0,0" VerticalAlignment="Top" Width="153.3" BorderBrush="{x:Null}"> - <Button.Background> - <ImageBrush Stretch="Uniform" ImageSource="/Toolkit.Content/ApplicationBar.Cancel.png"/> - </Button.Background> - </Button> - <TextBlock HorizontalAlignment="Left" Height="56" Margin="199,603,0,0" TextWrapping="Wrap" Text="Forgot Password?" VerticalAlignment="Top" Width="235" FontSize="24" Foreground="{StaticResource PhoneForegroundBrush}" FontFamily="Segoe WP Semibold"/> - <TextBlock x:Name="WarningP" Visibility="Collapsed" HorizontalAlignment="Left" Height="57" Margin="0,97,0,0" TextWrapping="Wrap" Text="MAX PASSWORD CHARACTERS 4" VerticalAlignment="Top" Width="480" TextAlignment="Center" FontSize="30" Foreground="#FFB43D3D" FontFamily="Segoe UI Symbol"/> - </Grid> - </Popup> - <TextBlock x:Name="nosd" Visibility="Collapsed" Style="{StaticResource PhoneTextLargeStyle}" Margin="10,213,10,451" TextWrapping="Wrap" Height="104" Width="460" TextAlignment="Center" Foreground="{StaticResource PhoneForegroundBrush}"> - <Span Foreground="{StaticResource PhoneForegroundBrush}" FontSize="32"> - <Run Text="no "/> - </Span> - <Span Foreground="{StaticResource PhoneAccentBrush}" FontSize="32" > - <Run Text="sdcard " FontWeight="Bold"/> - </Span> - <Span Foreground="{StaticResource PhoneForegroundBrush}" FontSize="32"> - <Run Text="found, please insert one to view files. "/> - </Span> - </TextBlock> - <phone:LongListSelector - x:Name="sdlists" - LayoutMode="Grid" - GridCellSize="110,120" - ItemTemplate="{StaticResource File360FileTemplate}" - IsGroupingEnabled="False" - Margin="10,143,10,71" Background="{x:Null}"/> - <Popup x:Name="personalization" Margin="0,0,0,15"> - <Grid Height="754" Width="480"> - <Grid.Background> - <SolidColorBrush Color="#D8FFFFFF"/> - </Grid.Background> - <TextBlock Margin="22,21,2,655" Style="{StaticResource PhoneTextTitle1Style}" Text="personalization" FontSize="40" FontFamily="Segoe WP Light"/> - <ListBox x:Name="listBox" Margin="10,84,0,0"> - <toolkit:ToggleSwitch x:Name="Wallpaper" Checked="Wallpaper_Checked" Unchecked="Wallpaper_Unchecked" Content="Wallpaper" Width="436" Height="108"/> - <Grid x:Name="WallpaperTemp" Visibility="Visible" Height="341" Width="460"> - <Rectangle x:Name="SideMenuWallChanger" Margin="10,0,10,59" RadiusY="23.5" RadiusX="23.5"> - <Rectangle.Fill> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Wallpaper/bg1.jpg"/> - </Rectangle.Fill> - </Rectangle> - <Rectangle Fill="{StaticResource PhoneDisabledBrush}" Margin="0,318,0,17" RenderTransformOrigin="0.5,0.5"> - <Rectangle.RenderTransform> - <CompositeTransform ScaleY="-1"/> - </Rectangle.RenderTransform> - </Rectangle> - <TextBlock Tap="SideMenuWallChanger_Tap" HorizontalAlignment="Left" Height="59" Margin="181,184,0,0" VerticalAlignment="Top" Width="115" Text="change" FontSize="36" FontFamily="Segoe WP Light"> - <TextBlock.Foreground> - <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> - <GradientStop Color="#99FFFFFF" Offset="0"/> - <GradientStop Color="#BFFFFFFF" Offset="1"/> - </LinearGradientBrush> - </TextBlock.Foreground> - </TextBlock> - </Grid> - <toolkit:ToggleSwitch Content="Sound FX" Width="436" Height="106"/> - <Grid Width="470"> - <TextBlock TextWrapping="Wrap" Text=" Sidebar Color" Width="192" FontFamily="Segoe WP Light" FontSize="24" Margin="10,4,268,6"/> - <Rectangle Fill="{StaticResource PhoneChromeBrush}" Stroke="{StaticResource PhoneForegroundBrush}" StrokeThickness="10" Margin="174,0,246,0" Width="42"/> - </Grid> - <Grid Height="{Binding ElementName=listPicker, Path=ViewportWidth}" Width="470"> - <toolkit:ListPicker x:Name="listPicker" Margin="0,0,10,0" BorderBrush="{x:Null}" Foreground="{StaticResource PhoneAccentBrush}"> - <toolkit:ListPickerItem Content="Current Chrome Color" Style="{StaticResource ListPickerItemStyle}"/> - <toolkit:ListPickerItem Content="Current Background Color"/> - <toolkit:ListPickerItem Content="{Binding LocalizedResources.other, Source={StaticResource LocalizedStrings}}"/> - </toolkit:ListPicker> - </Grid> - </ListBox> - </Grid> - </Popup> - <Popup x:Name="settings" Margin="10,10,10,15"> - <Grid Height="743" Width="460" Background="{StaticResource PhoneSemitransparentBrush}"> - - <phone:LongListSelector - x:Name="SettingsList" - Style="{StaticResource LongListSelectorWithNoScrollBarStyle}" - ScrollViewer.VerticalScrollBarVisibility="Hidden" - ItemTemplate="{StaticResource SettingsItemTemplate}" - IsGroupingEnabled="False" Margin="10,93,10,0"/> - <TextBlock HorizontalAlignment="Left" Height="78" Margin="10,10,0,0" TextWrapping="Wrap" Text="settings" VerticalAlignment="Top" Width="348" FontFamily="Segoe WP Light" FontSize="40" Foreground="{StaticResource PhoneForegroundBrush}"/> - </Grid> - </Popup> - <Popup x:Name="security"> - <Grid Height="734"> - <Grid.Background> - <SolidColorBrush Color="#D8000000"/> - </Grid.Background> - <toolkit:ToggleSwitch x:Name="passw" Checked="passw_Checked" Unchecked="passw_Unchecked" HorizontalAlignment="Left" Margin="10,148,0,0" VerticalAlignment="Top" Width="460" Content="password"/> - <toolkit:ToggleSwitch x:Name="shake" Checked="shake_Checked" Unchecked="shake_Unchecked" HorizontalAlignment="Left" Margin="10,256,0,0" VerticalAlignment="Top" Width="460" Content="shake to hide"/> - <TextBox x:Name="pb" HorizontalAlignment="Left" Height="84" Margin="10,359,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="460" TextChanged="PSetter" Foreground="{StaticResource PhoneBackgroundBrush}" SelectionBackground="{x:Null}" SelectionForeground="{x:Null}"/> - <TextBlock HorizontalAlignment="Left" Height="81" Margin="16,31,0,0" TextWrapping="Wrap" Text="security" VerticalAlignment="Top" Width="378" Foreground="White" FontFamily="Segoe WP Light" FontSize="40"/> - </Grid> - </Popup> - <Popup x:Name="about" IsOpen="False"> - <Grid Background="#D8000000" Width="479" Height="740"> - <Rectangle x:Name="bgChanger"/> - <Image HorizontalAlignment="Left" Height="91" Margin="105,197,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Source="/AMI.png" Width="256"/> - <HyperlinkButton Content="am Industries inc." HorizontalAlignment="Left" Margin="136,306,0,0" Grid.Row="1" VerticalAlignment="Top" FontFamily="Segoe WP Light" Foreground="{StaticResource PhoneForegroundBrush}"/> - <TextBlock HorizontalAlignment="Left" Margin="28,144,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Height="30" Text="developed &amp; produced by" Foreground="{StaticResource PhoneForegroundBrush}" FontFamily="Segoe WP Light" FontSize="18"/> - <TextBlock Text="contact developer:" HorizontalAlignment="Left" Margin="41,379,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="38" Foreground="{StaticResource PhoneForegroundBrush}" FontFamily="Segoe WP Light" FontSize="22"/> - <HyperlinkButton HorizontalAlignment="Left" Margin="213,375,0,0" VerticalAlignment="Top" Width="230" Height="38" Content="bharatvaj@yahoo.com" FontFamily="Segoe WP Light" FontSize="22" Foreground="{StaticResource PhoneForegroundBrush}"/> - <ListBox Grid.RowSpan="2" Margin="10,437,10,12" Background="{x:Null}"/> - <Rectangle x:Name="blue" HorizontalAlignment="Left" Height="100" Margin="286,188,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Width="75"/> - <Rectangle x:Name="red" HorizontalAlignment="Left" Height="100" Margin="105,188,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Width="75"/> - <Rectangle x:Name="green" HorizontalAlignment="Left" Height="100" Margin="197,188,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Width="75"/> - <TextBlock HorizontalAlignment="Left" Height="60" Margin="28,32,0,0" TextWrapping="Wrap" Text="about" VerticalAlignment="Top" Width="276" FontSize="40" FontFamily="Segoe WP Light" Foreground="{StaticResource PhoneForegroundBrush}"/> - </Grid> - </Popup> - </Grid> - <Grid x:Name="Blurer" ManipulationStarted="canvas_ManipulationStarted" ManipulationDelta="canvas_ManipulationDelta" ManipulationCompleted="canvas_ManipulationCompleted" Visibility="Collapsed" Height="768" Width="480" Canvas.Left="420"> - <Grid.Background> - <SolidColorBrush Color="{StaticResource PhoneSemitransparentColor}"/> - </Grid.Background> - </Grid> + </Canvas> </Canvas> - </Canvas> + </Grid> + </phone:PhoneApplicationPage> \ No newline at end of file diff --git a/File360/MainPage.xaml.cs b/File360/MainPage.xaml.cs @@ -7,219 +7,119 @@ using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; -using System.Windows.Input; -using System.Windows.Media.Animation; -using System.IO.IsolatedStorage; +using File360.Resources; +using System.Threading.Tasks; using Microsoft.Phone.Storage; +using System.IO; +using System.Collections; using System.Windows.Media; -using Microsoft.Xna.Framework.Media; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Audio; -using System.Collections.ObjectModel; +using Windows.Phone.Storage.SharedAccess; +using System.Data.Linq; +using Windows.Storage; +using System.Text; +using Windows.ApplicationModel; +using Windows.Phone.Devices.Notification; +using Windows.Phone.UI.Input; using System.ComponentModel; +using System.Resources; +using System.Windows.Input; +using System.IO.IsolatedStorage; using System.Windows.Media.Imaging; -using Microsoft.Devices.Sensors; -using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Media.Animation; +using Microsoft.Xna.Framework.Media; +using Microsoft.Xna.Framework; + + namespace File360 { public partial class MainPage : PhoneApplicationPage { List<sdlist> l = new List<sdlist>(); - ExternalStorageFolder tempFolder; - IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; + List<musiclist> ml = new List<musiclist>(); + const string SETTINGS_PAGE_URI = "/SettingsPage.xaml"; + const string VAULT_PAGE_URI = "/VaultPage.xaml"; public string btns; - string txts; - List<settinglist> sl = new List<settinglist>(); - AppSettings apps = new AppSettings(); + public static string Hbtns; + ExternalStorageFolder temp; + TextBox pb; + IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; + internal static BitmapImage bm = new BitmapImage(new Uri("pack://application:/Resources/Assets/Wallpaper/bg1.jpg", UriKind.Absolute)); public MainPage() { InitializeComponent(); - StateHelper(); VisualStateManager.GoToState(this, "Normal", false); #region InitialKeyUpdater if (appSettings.Count == 0) { - appSettings.Add("Shaker", "Off"); + appSettings.Add("Shaker","Off"); appSettings.Save(); - appSettings.Add("Passer", "Off"); + appSettings.Add("Passer","Off"); appSettings.Save(); appSettings.Add("PasswordValue", "2580"); appSettings.Save(); - appSettings.Add("WallPaper", "/Resources/Assets/Wallpaper/bg1.jpg"); - appSettings.Save(); } #endregion - PopupPasswordKeyboard(); - #region InitialSettings - sl.Add(new settinglist("ftp", "configure file transfer protocol", "/Resources/Assets/Settings/ftp.png")); - sl.Add(new settinglist("bluetooth", "bluetooth settings", "/Resources/Assets/Settings/bluetooth.png")); - sl.Add(new settinglist("nfc", "nfc configuration", "/Resources/Assets/Settings/nfc.png")); - sl.Add(new settinglist("personalization", "get a look", "/Resources/Assets/Settings/personalization.png")); - sl.Add(new settinglist("music", "change your music settings", "/Resources/Assets/Settings/music.png")); - sl.Add(new settinglist("security", "protect your files", "/Resources/Assets/Settings/security.png")); - sl.Add(new settinglist("about", "About Us!", "/Resources/Assets/Settings/about.png")); - SettingsList.ItemsSource = sl; - #endregion - MusicDisplay(); #region ThemeChecker - Visibility themeHold = (Visibility)Application.Current.Resources["PhoneLightThemeVisibility"]; - if (themeHold == System.Windows.Visibility.Visible) - { - ApplicationBar.BackgroundColor = Colors.White; - ApplicationBar.ForegroundColor = Colors.Black; - apps.SideBarColor = "{StaticResource PhoneSemitransparentBrush}"; - } - #endregion - #region AccelerometerReader - if (!Accelerometer.IsSupported) - { - shake.IsEnabled = false; - } - Settings_Checker(); + //Visibility isVisible = (Visibility)Application.Current.Resources["PhoneLightThemeVisibility"]; + //if (isVisible == System.Windows.Visibility.Visible) + //{ + + //} + //else + //{ + + //} #endregion - } - - #region Wallpaper - public void WallpaperChanger(BitmapImage bitm) - { - ApplyGaussianFilter(bitm); - } - public void ApplyGaussianFilter(BitmapImage image) - { - //do some fancy work - //then send to ImageApply to apply the Image. - ImageApply(image); + StateHelper(); + WallpaperChanger(bm); + MusicStateCreator(); } - public void ImageApply(BitmapImage imt) - { - ImageBrush im = new ImageBrush(); - im.ImageSource = imt; - LayoutRoot.Background = im; - } - #endregion - #region LateralMenu - private void OpenClose_Left(object sender, RoutedEventArgs e) - { - var left = Canvas.GetLeft(LayoutRoot); - if (left > -100) - { - ApplicationBar.IsVisible = true; - MoveViewWindow(-420); - Blurer.Visibility = System.Windows.Visibility.Collapsed; - } - else - { - ApplicationBar.IsVisible = false; - MoveViewWindow(0); - Blurer.Visibility = System.Windows.Visibility.Visible; - } - } - private void OpenClose_Right(object sender, RoutedEventArgs e) - { - var left = Canvas.GetLeft(LayoutRoot); - if (left > -520) - { - ApplicationBar.IsVisible = false; - MoveViewWindow(-840); - Blurer.Visibility = System.Windows.Visibility.Visible; - } - else - { - ApplicationBar.IsVisible = true; - MoveViewWindow(-420); - Blurer.Visibility = System.Windows.Visibility.Collapsed; - - } - } + #region ContextMenu - void MoveViewWindow(double left) - { - _viewMoved = true; - if (left==-420) - ApplicationBar.IsVisible = true; - else - ApplicationBar.IsVisible = false; - ((Storyboard)canvas.Resources["moveAnimation"]).SkipToFill(); - ((DoubleAnimation)((Storyboard)canvas.Resources["moveAnimation"]).Children[0]).To = left; - ((Storyboard)canvas.Resources["moveAnimation"]).Begin(); - } - private void canvas_ManipulationDelta(object sender, ManipulationDeltaEventArgs e) + private void vault_button_Tap(object sender, System.Windows.Input.GestureEventArgs e) { - if (e.DeltaManipulation.Translation.X != 0) - Canvas.SetLeft(LayoutRoot, Math.Min(Math.Max(-840, Canvas.GetLeft(LayoutRoot) + e.DeltaManipulation.Translation.X), 0)); + Button b = (Button)sender; + Hbtns = (b.Content).ToString(); } - double initialPosition; - bool _viewMoved = false; - private void canvas_ManipulationStarted(object sender, ManipulationStartedEventArgs e) + private void Copy_Click(object sender, RoutedEventArgs e) { - _viewMoved = false; - initialPosition = Canvas.GetLeft(LayoutRoot); + MessageBox.Show("Copied To Clipboard"); } - private void canvas_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e) + private void Cut_Click(object sender, RoutedEventArgs e) { - var left = Canvas.GetLeft(LayoutRoot); - if (_viewMoved) - return; - if (Math.Abs(initialPosition - left) < 100) - { - //bouncing back - MoveViewWindow(initialPosition); - return; - } - //change of state - if (initialPosition - left > 0) - { - //slide to the left - if (initialPosition > -420) - { - MoveViewWindow(-420); - Blurer.Visibility = System.Windows.Visibility.Collapsed; - } - } - else - { - //slide to the right - if (initialPosition< -420) - MoveViewWindow(-420); - Blurer.Visibility = System.Windows.Visibility.Collapsed; - - } - + MessageBox.Show("Ready to be Pasted"); } - #endregion - #region AppBar - private void MultiSelect_Click(object sender, RoutedEventArgs e) - { - } - private void NewFolder_Click(object sender, RoutedEventArgs e) + private void Delete_Click(object sender, RoutedEventArgs e) { - + MessageBox.Show("File Couldn't be deleted"); } - private void Settings_Click(object sender, EventArgs e) + + private void Hide_Click(object sender, RoutedEventArgs e) { - settings.IsOpen = true; - ApplicationBar.IsVisible = false; + MenuItem m = (MenuItem)sender; + sdlists.ItemsSource = l; } + #endregion + #region FileLister async public void StateHelper() { ExternalStorageDevice sdCard = (await ExternalStorage.GetExternalStorageDevicesAsync()).FirstOrDefault(); if (sdCard != null) { - ExternalStorageFolder sdrootFolder = sdCard.RootFolder; - tempFolder = sdrootFolder; - var folder = await sdrootFolder.GetFoldersAsync(); - var files = await sdrootFolder.GetFilesAsync(); - fileHeader.Text = "sdroot"; - fileUrl.Text = " "; - foreach (ExternalStorageFolder currentChildFolder in folder) + ExternalStorageFolder sdrootFolder = sdCard.RootFolder; + temp = sdrootFolder; + var folder = await sdrootFolder.GetFoldersAsync(); + var files = await sdrootFolder.GetFilesAsync(); + foreach(ExternalStorageFolder currentChildFolder in folder) { l.Add(new sdlist(currentChildFolder.Name, "/Resources/Assets/Images/folder.png")); } @@ -239,22 +139,23 @@ namespace File360 l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/avi.png")); if (currentChildFile.Name.EndsWith(".7z")) l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/7z.png")); + } - sdlists.ItemsSource = null; - sdlists.ItemsSource = l; } else { nosd.Visibility = System.Windows.Visibility.Visible; } + sdlists.ItemsSource = l; + } async private void folderTap_Click(object sender, System.Windows.Input.GestureEventArgs e) { - Grid grd = (Grid)sender; - TextBlock txt = (TextBlock)grd.FindName("folderTap"); - btns = txt.Text; - fileHeader.Text = btns; + + StackPanel sp = (StackPanel)sender; + TextBlock btn = (TextBlock)sp.FindName("folderTap"); + btns = btn.Text; if (btns.EndsWith(".7z") || btns.EndsWith(".avi") || btns.EndsWith(".mkv")) { if (btns.EndsWith(".7z")) @@ -272,20 +173,22 @@ namespace File360 } else { - var tempFolders = await tempFolder.GetFoldersAsync(); - foreach (ExternalStorageFolder subTemp in tempFolders) + var temps = await temp.GetFoldersAsync(); + l.Clear(); + foreach (ExternalStorageFolder subTemp in temps) { if (btns == subTemp.Name) { - tempFolder = subTemp; - var subTemps = await subTemp.GetFoldersAsync(); + temp = subTemp; + textBlock.Text = subTemp.Path; + sd.Text = subTemp.Name; + var subtemps = await subTemp.GetFoldersAsync(); var files = await subTemp.GetFilesAsync(); l.Clear(); - fileUrl.Text = subTemp.Path; - //l.Add(new sdlist("back", "/Resources/Assets/Images/back.png")); - foreach (ExternalStorageFolder folder in subTemps) + l.Add(new sdlist("back", "/Resources/Assets/Images/back.png")); + foreach (ExternalStorageFolder subsTemp in subtemps) { - l.Add(new sdlist(folder.Name, "/Resources/Assets/Images/folder.png")); + l.Add(new sdlist(subsTemp.Name, "/Resources/Assets/Images/folder.png")); } foreach (ExternalStorageFile currentChildFile in files) { @@ -307,402 +210,435 @@ namespace File360 } } } - sdlists.ItemsSource = null; sdlists.ItemsSource = l; } - #endregion - #region Video - async public void VideoLister(object sender, System.Windows.Input.GestureEventArgs e) - { - oneFill.Fill = null; - fileHeader.Text = "videos"; - Blurer.Visibility = System.Windows.Visibility.Collapsed; - //HomeBrush.ImageSource = new BitmapImage(new Uri("pack://application:/Resources/Assets/Images/Video.png", UriKind.Absolute)); - ExternalStorageDevice sdCard = (await ExternalStorage.GetExternalStorageDevicesAsync()).FirstOrDefault(); - if (sdCard != null) - { - ExternalStorageFolder sdrootFolder = sdCard.RootFolder; - tempFolder = sdrootFolder; - var folder = await sdrootFolder.GetFoldersAsync(); - l.Clear(); - foreach (ExternalStorageFolder currentChildFolder in folder) - { - var files = await currentChildFolder.GetFilesAsync(); - foreach (ExternalStorageFile currentChildFile in files) - { - if (currentChildFile.Name.EndsWith(".avi")) - l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/avi.png")); - if (currentChildFile.Name.EndsWith(".mkv")) - l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/mkv.png")); - } - var folderss = await currentChildFolder.GetFoldersAsync(); - foreach (ExternalStorageFolder currentChildFolder2 in folderss) - { - var filess = await currentChildFolder2.GetFilesAsync(); - foreach (ExternalStorageFile currentChildFile in filess) - { - if (currentChildFile.Name.EndsWith(".avi")) - l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/avi.png")); - if (currentChildFile.Name.EndsWith(".mkv")) - l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/mkv.png")); - } - } - } + #endregion - } + #region AppBarButtons - else - { - nosd.Visibility = System.Windows.Visibility.Visible; - - } - List<AlphaKeyGroup<sdlist>> DataSource = AlphaKeyGroup<sdlist>.CreateGroups(l, System.Threading.Thread.CurrentThread.CurrentUICulture, (sdlist s) => { return s.Name; }, true); - sdlists.ItemsSource = DataSource; + + void NewFolder_Click(object sender, EventArgs e) + { + l.Add(new sdlist("New Folder", "/Resources/Assets/Images/folder.png")); + sdlists.ItemsSource = l; } - #endregion - #region PopupPassword - public void PopupPasswordKeyboard() - { - for (int i = 1; i < 10; i++) - { - Button btn = new Button(); - btn.Content = i.ToString(); - btn.Width = 153.3; - btn.Height = 102.5; - btn.BorderBrush = null; - btn.FontSize = 35; - btn.Click += new RoutedEventHandler(Numbers_Click); - wrapPanel.Children.Add(btn); - } - } - private void Numbers_Click(object sender, RoutedEventArgs e) - { - Button btn = (Button)sender; - if (passwordDisplay.Text.Length < 4) + private void MultiSelect_Click(object sender, EventArgs e) { - string i = btn.Content.ToString(); - passwordDisplay.Text += i; - if(passwordDisplay.Text == (string)appSettings["PasswordValue"]) + if (sdlists.IsSelectionEnabled == false) { - passwordDisplay.Text = null; - PasswordAccepter.IsOpen = false; - l.Add(new sdlist("Hidden Folder", "/Resources/Assets/Images/hiddenFolder.png")); - sdlists.ItemsSource = null; - sdlists.ItemsSource = l; + sdlists.IsSelectionEnabled = true; + } + if (sdlists.IsSelectionEnabled == true) + { + sdlists.IsSelectionEnabled = false; } - } - else + + private void Settings_Click(object sender, EventArgs e) { - passwordDisplay.Text = null; - PasswordAccepter.IsOpen = false; + NavigationService.Navigate(new Uri(SETTINGS_PAGE_URI, UriKind.Relative)); } - } - private void Vault_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e) - { - if ((string)appSettings["Passer"] == "On") - { - PasswordAccepter.IsOpen = true; - ApplicationBar.IsVisible = false; - } - if ((string)appSettings["Passer"] == "Off") - { - l.Add(new sdlist("Hidden Folder", "/Resources/Assets/Images/hiddenFolder.png")); - sdlists.ItemsSource = null; - sdlists.ItemsSource = l; - } - } - private void PopupCancel(object sender, RoutedEventArgs e) - { - PasswordAccepter.IsOpen = false; - } - private void PasswordBackspace(object sender, RoutedEventArgs e) - { - passwordDisplay.Text = null; - } - #endregion - #region LeftSidemenu - private void downloads_Tap(object sender, System.Windows.Input.GestureEventArgs e) - { - fileHeader.Text = "downloads"; - fileUrl.Text = "downloads"; - l.Clear(); - List<AlphaKeyGroup<sdlist>> DataSource = AlphaKeyGroup<sdlist>.CreateGroups(l, System.Threading.Thread.CurrentThread.CurrentUICulture, (sdlist s) => { return s.Name; }, true); - sdlists.ItemsSource = DataSource; - MoveViewWindow(-420); - Blurer.Visibility = System.Windows.Visibility.Collapsed; - } - private void sdcard_menu_Tap(object sender, System.Windows.Input.GestureEventArgs e) - { - fileHeader.Text = "sdroot"; - fileUrl.Text = null; - l.Clear(); - StateHelper(); - MoveViewWindow(-420); - sdText.Foreground = App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush; - sdImage.Fill = App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush; - Blurer.Visibility = System.Windows.Visibility.Collapsed; - } - - private void oneFill_Tap(object sender, System.Windows.Input.GestureEventArgs e) - { - oneFill.Fill = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush; - Blurer.Visibility = System.Windows.Visibility.Collapsed; - } + #endregion - async private void searchBox_TextChanged(object sender, TextChangedEventArgs e) - { - if (searchBox.Text != null) + + + #region BackButtonControl + + protected override void OnBackKeyPress(CancelEventArgs e) { - ExternalStorageDevice sdCard = (await ExternalStorage.GetExternalStorageDevicesAsync()).FirstOrDefault(); - ExternalStorageFolder sdrootFolder = sdCard.RootFolder; - tempFolder = sdrootFolder; - var folder = await sdrootFolder.GetFoldersAsync(); - foreach (ExternalStorageFolder currentChildFolder in folder) + if (textBlock.Text == null) { - var files = await currentChildFolder.GetFilesAsync(); - foreach (ExternalStorageFile currentChildFile in files) - { - l.Clear(); - if (currentChildFile.Name.EndsWith(searchBox.Text)) - l.Add(new sdlist(searchBox.Text, "/Resources/Assets/Images/folder.png")); - } + e.Cancel = false; + } + if (textBlock.Text != null) + { + l.Clear(); + StateHelper(); + btns = null; + e.Cancel = true; + sd.Text = "sdcard"; + } + if (sdlists.IsSelectionEnabled == false) + { + e.Cancel = false; + } + if (sdlists.IsSelectionEnabled == true) + { + sdlists.IsSelectionEnabled = false; + e.Cancel = true; } - sdlists.ItemsSource = l; } - } - #endregion - #region RightMenu + #endregion - #region Music - private void MusicDisplay() - { - try + + #region HiddenVault + private void vault_button_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e) { - if (MediaPlayer.State == MediaState.Playing) + if ((string)appSettings["Passer"] == "On") { - songName.Text = MediaPlayer.Queue.ActiveSong.Name; - artistName.Text = (MediaPlayer.Queue.ActiveSong.Artist).ToString(); - ImageBrush im = new ImageBrush(); - im.ImageSource = new BitmapImage(new Uri("pack://application:/Resources/Assets/Images/transport.pause.png", UriKind.Absolute)); - playState.OpacityMask = im; + pb = new TextBox(); + pb.Background = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.Foreground = (SolidColorBrush)Resources["PhoneForegroundBrush"]; + pb.BorderBrush = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.Height = 70; + pb.Width = 356; + pb.Margin = new Thickness(124, 0, 0, 625); + pb.InputScope = new InputScope { Names = { new InputScopeName { NameValue = InputScopeNameValue.Number } } }; + pb.LostFocus += pb_LostFocus; + pb.GotFocus += pb_GotFocus; + LayoutRoot.Children.Add(pb); + pb.Focus(); + pb.TextChanged += PChanged; } - if (MediaPlayer.State == MediaState.Paused) + + if ((string)appSettings["Passer"] == "Off") { - songName.Text = MediaPlayer.Queue.ActiveSong.Name; - artistName.Text = (MediaPlayer.Queue.ActiveSong.Artist).ToString(); - ImageBrush im = new ImageBrush(); - im.ImageSource = new BitmapImage(new Uri("pack://application:/Resources/Assets/Images/transport.play.png", UriKind.Absolute)); - playState.OpacityMask = im; + NavigationService.Navigate(new Uri(VAULT_PAGE_URI, UriKind.Relative)); } - if (MediaPlayer.State == MediaState.Stopped) + } + + private void PChanged(object sender, TextChangedEventArgs e) + { + if (pb.Text == (string)appSettings["PasswordValue"]) { - songName.Text = "No Media"; - artistName.Text = null; - ImageBrush im = new ImageBrush(); - im.ImageSource = new BitmapImage(new Uri("pack://application:/Resources/Assets/Images/transport.play.png", UriKind.Absolute)); - playState.OpacityMask = im; + LayoutRoot.Children.Remove(pb); + NavigationService.Navigate(new Uri(VAULT_PAGE_URI, UriKind.Relative)); } } - catch (Exception) + void pb_GotFocus(object sender, RoutedEventArgs e) { - - MessageBox.Show("Error throw!"); + pb.Background = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.Foreground = (SolidColorBrush)Resources["PhoneForegroundBrush"]; + pb.MaxLength = 5; + pb.BorderBrush = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.TextAlignment = TextAlignment.Center; } - } - private void playState_Tap(object sender, System.Windows.Input.GestureEventArgs e) - { - if (MediaPlayer.State == MediaState.Playing) - { - FrameworkDispatcher.Update(); - MediaPlayer.Pause(); - MusicDisplay(); - } - else + private void pb_LostFocus(object sender, RoutedEventArgs e) { - FrameworkDispatcher.Update(); - MediaPlayer.Resume(); - MusicDisplay(); + LayoutRoot.Children.Remove(pb); } - //if (MediaPlayer.State == MediaState.Stopped) - //{ - // FrameworkDispatcher.Update(); - // MediaLibrary mLibrary = new MediaLibrary(); - // SongCollection songs = mLibrary.Songs; - // MediaPlayer.Play(songs); - // MusicDisplay(); - //} - } #endregion - #region Personalisation - private void SideMenuWallChanger_Tap(object sender, System.Windows.Input.GestureEventArgs e) - { - WallpaperChanger(new BitmapImage(new Uri("pack://application:/Resources/Assets/Wallpaper/bg2.jpg", UriKind.Absolute))); - } - private void Wallpaper_Checked(object sender, RoutedEventArgs e) - { - WallpaperTemp.Visibility = Visibility.Visible; - } - - private void Wallpaper_Unchecked(object sender, RoutedEventArgs e) - { - WallpaperTemp.Visibility = Visibility.Collapsed; - } - #endregion - #region Settings - - public async void SettingTap_Tap(object sender, System.Windows.Input.GestureEventArgs e) + #region LateralMenu + private void OpenClose_Left(object sender, RoutedEventArgs e) { - Grid grd = (Grid)sender; - TextBlock txt = (TextBlock)grd.FindName("txtB"); - txts = (txt.Text).ToString(); - if (txts == "about") + var left = Canvas.GetLeft(CanvasRoot); + if (left > -100) { - settings.IsOpen = false; - about.IsOpen = true; + ApplicationBar.IsVisible = true; + MoveViewWindow(-320); + Blurer.Visibility = System.Windows.Visibility.Collapsed; } - - if (txts == "security") + else { - settings.IsOpen = false; - security.IsOpen = true; + ApplicationBar.IsVisible = false; + MoveViewWindow(0); + Blurer.Visibility = System.Windows.Visibility.Visible; } + } - if (txts == "bluetooth") + private void OpenClose_Right(object sender, RoutedEventArgs e) + { + var left = Canvas.GetLeft(CanvasRoot); + if (left > -350) { - await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-bluetooth:")); + ApplicationBar.IsVisible = false; + MoveViewWindow(-680); + Blurer.Visibility = System.Windows.Visibility.Visible; } - - if (txts == "nfc") + else { - MessageBox.Show("coming soon..."); + ApplicationBar.IsVisible = true; + MoveViewWindow(-320); + Blurer.Visibility = System.Windows.Visibility.Collapsed; } + } - if (txts == "personalization") + void MoveViewWindow(double left) + { + if (left == -320) + ApplicationBar.IsVisible = true; + else + ApplicationBar.IsVisible = false; + ((Storyboard)canvas.Resources["moveAnimation"]).SkipToFill(); + ((DoubleAnimation)((Storyboard)canvas.Resources["moveAnimation"]).Children[0]).To = left; + ((Storyboard)canvas.Resources["moveAnimation"]).Begin(); + } + + private void canvas_ManipulationDelta(object sender, ManipulationDeltaEventArgs e) + { + if (e.DeltaManipulation.Translation.X != 0) + Canvas.SetLeft(CanvasRoot, Math.Min(Math.Max(-680, Canvas.GetLeft(CanvasRoot) + e.DeltaManipulation.Translation.X), 0)); + } + + double initialPosition; + bool _viewMoved = false; + private void canvas_ManipulationStarted(object sender, ManipulationStartedEventArgs e) + { + _viewMoved = false; + initialPosition = Canvas.GetLeft(CanvasRoot); + } + + private void canvas_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e) + { + var left = Canvas.GetLeft(CanvasRoot); + if (_viewMoved) + return; + if (Math.Abs(initialPosition - left) < 100) { - //settings.IsOpen = false; - personalization.IsOpen = true; + //bouncing back + MoveViewWindow(initialPosition); + return; } - - if (txts == "ftp") + //change of state + if (initialPosition - left > 0) { - NavigationService.Navigate(new Uri("/FTPServerPage.xaml", UriKind.Relative)); + //slide to the left + if (initialPosition > -320) + MoveViewWindow(-320); + else + MoveViewWindow(-680); } - if (txts == "music") + else { - MessageBox.Show("coming soon..."); + //slide to the right + if (initialPosition < -320) + MoveViewWindow(-320); + else + MoveViewWindow(0); } + } - #endregion - #region Security - #region ToggleSwitcher + #endregion - private void shake_Checked(object sender, RoutedEventArgs e) + private void downloads_Tap(object sender, System.Windows.Input.GestureEventArgs e) { - appSettings["Shaker"] = "On"; - appSettings.Save(); + sd.Text = "downloads"; + textBlock.Text = "downloads"; + sdcard_menu.Background = null; + l.Clear(); + List<AlphaKeyGroup<sdlist>> DataSource = AlphaKeyGroup<sdlist>.CreateGroups(l, System.Threading.Thread.CurrentThread.CurrentUICulture, (sdlist s) => { return s.Name; }, true); + sdlists.ItemsSource = DataSource; + MoveViewWindow(-320); + dl.Fill = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush; + rect_above.Fill = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush; + pl.Fill = null; + Blurer.Visibility = System.Windows.Visibility.Collapsed; } - private void shake_Unchecked(object sender, RoutedEventArgs e) + private void sdcard_menu_Tap(object sender, System.Windows.Input.GestureEventArgs e) { - appSettings["Shaker"] = "Off"; - appSettings.Save(); + sd.Text = "sdcard"; + textBlock.Text = null; + l.Clear(); + StateHelper(); + MoveViewWindow(-320); + //HomeBrush.ImageSource = new BitmapImage(new Uri("pack://application:/Toolkit.Content/home.png", UriKind.Absolute)); + pl.Fill = null; + dl.Fill = null; + oneFill.Fill = null; + sdcard_menu.Background = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush; + rect_above.Fill = null; + Blurer.Visibility = System.Windows.Visibility.Collapsed; } - private void passw_Checked(object sender, RoutedEventArgs e) + public void WallpaperChanger(BitmapImage bitm) { - appSettings["Passer"] = "On"; + ImageBrush im = new ImageBrush(); + im.ImageSource = bitm; + ApplyGaussianFilter(im.ImageSource); } - - private void passw_Unchecked(object sender, RoutedEventArgs e) + + public void ApplyGaussianFilter(ImageSource image) { - appSettings["Passer"] = "Off"; + ImageApply(image); } - - private void PSetter(object sender, TextChangedEventArgs e) + public void ImageApply(ImageSource imt) { - - appSettings["PasswordValue"] = pb.Text; + ImageBrush im = new ImageBrush(); + im.Stretch = Stretch.UniformToFill; + im.ImageSource = imt; + SideBar.Background = im; } + #region Music - #endregion - #region SettingsUpdater - - public void Settings_Checker() + public void MusicStateCreator() { - if ((string)appSettings["Shaker"] == "On") - { - shake.IsChecked = true; - } - - if ((string)appSettings["Shaker"] == "Off") + int trackno = 0; + try { - shake.IsChecked = false; + l.Clear(); + ml.Clear(); + using (var library = new MediaLibrary()) + { + SongCollection songs = library.Songs; + foreach (Song song in songs) + { + ml.Add(new musiclist((song.Name).ToString(), (song.Album).ToString(), (song.Artist).ToString(), (trackno+1).ToString())); + } + musicLists.ItemsSource = ml; + sdlists.ItemsSource = ml; + } } - - if ((string)appSettings["Passer"] == "On") + catch (ArgumentOutOfRangeException) { - passw.IsChecked = true; + MessageBox.Show("There are no songs in your phone..."); } - - if ((string)appSettings["Passer"] == "Off") + catch (InvalidOperationException iop) { - passw.IsChecked = false; + MessageBox.Show(iop.ToString()); } } - #endregion - #endregion - #region BackButtonPress - protected override void OnBackKeyPress(CancelEventArgs e) + + private void Music_Tap(object sender, System.Windows.Input.GestureEventArgs e) { - if (PasswordAccepter.IsOpen == true) + int trackno = 0; + //ImageBrush ib = new ImageBrush(); + //ib.ImageSource = new BitmapImage(new Uri("pack://application:/Resources/Assets/Images/MusicBar.png", UriKind.Absolute)); + //homeButton.OpacityMask = ib; + sd.Text = "music"; + pl.Fill = null; + dl.Fill = null; + rect_above.Fill = null; + oneFill.Fill = null; + sdcard_menu.Background = null; + Blurer.Visibility = System.Windows.Visibility.Collapsed; + try { - e.Cancel = true; - PasswordAccepter.IsOpen = false; - ApplicationBar.IsVisible = true; + l.Clear(); + ml.Clear(); + using (var library = new MediaLibrary()) + { + SongCollection songs = library.Songs; + foreach (Song song in songs) + { + ml.Add(new musiclist((song.Name).ToString(), (song.Artist).ToString(), (song.Album).ToString(), (trackno+1).ToString())); + } + musicLists.ItemsSource = ml; + sdlists.ItemsSource = ml; + } } - if (fileUrl.Text != " ") + catch (ArgumentOutOfRangeException) { - e.Cancel = true; - StateHelper(); + MessageBox.Show("There are no songs in your phone..."); } - if (settings.IsOpen == true) + } + + + public void txtB_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + TextBlock txt = (TextBlock)sender; + string txts = (txt.Name).ToString(); + int index = int.Parse(txts); + MainPage mp = new MainPage(); + using (var library = new MediaLibrary()) { - e.Cancel = true; - settings.IsOpen = false; - ApplicationBar.IsVisible = true; + SongCollection songs = library.Songs; + Song song = songs[index]; + try + { + FrameworkDispatcher.Update(); + MediaPlayer.Play(song); + } + catch (InvalidOperationException) + { + MediaPlayer.Play(songs[2]); + } } - if (about.IsOpen == true) + } + + #endregion + async public void VideoLister(object sender, System.Windows.Input.GestureEventArgs e) + { + pl.Fill = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush; + dl.Fill = null; + rect_above.Fill = null; + sdcard_menu.Background = null; + oneFill.Fill = null; + sd.Text = "videos"; + Blurer.Visibility = System.Windows.Visibility.Collapsed; + //HomeBrush.ImageSource = new BitmapImage(new Uri("pack://application:/Resources/Assets/Images/Video.png", UriKind.Absolute)); + ExternalStorageDevice sdCard = (await ExternalStorage.GetExternalStorageDevicesAsync()).FirstOrDefault(); + if (sdCard != null) { - e.Cancel = true; - about.IsOpen = false; - settings.IsOpen = true; + ExternalStorageFolder sdrootFolder = sdCard.RootFolder; + temp = sdrootFolder; + var folder = await sdrootFolder.GetFoldersAsync(); + l.Clear(); + foreach (ExternalStorageFolder currentChildFolder in folder) + { + var files = await currentChildFolder.GetFilesAsync(); + foreach (ExternalStorageFile currentChildFile in files) + { + if (currentChildFile.Name.EndsWith(".avi")) + l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/avi.png")); + if (currentChildFile.Name.EndsWith(".mkv")) + l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/mkv.png")); + } + var folderss = await currentChildFolder.GetFoldersAsync(); + foreach (ExternalStorageFolder currentChildFolder2 in folderss) + { + var filess = await currentChildFolder2.GetFilesAsync(); + foreach (ExternalStorageFile currentChildFile in filess) + { + if (currentChildFile.Name.EndsWith(".avi")) + l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/avi.png")); + if (currentChildFile.Name.EndsWith(".mkv")) + l.Add(new sdlist(currentChildFile.Name, "/Resources/Assets/File_Types/mkv.png")); + } + } + + } + } - if (personalization.IsOpen == true) + + else { - e.Cancel = true; - personalization.IsOpen = false; - settings.IsOpen = true; + nosd.Visibility = System.Windows.Visibility.Visible; } - if (security.IsOpen == true) + sdlists.ItemsSource = l; + } + + private void oneFill_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + oneFill.Fill = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush; + pl.Fill = null; + dl.Fill = null; + rect_above.Fill = null; + Blurer.Visibility = System.Windows.Visibility.Collapsed; + } + + async private void SearchModule_Click(object sender, RoutedEventArgs e) + { + if (searchBox.Text != null) { - e.Cancel = true; - security.IsOpen = false; - settings.IsOpen = true; + ExternalStorageDevice sdCard = (await ExternalStorage.GetExternalStorageDevicesAsync()).FirstOrDefault(); + ExternalStorageFolder sdrootFolder = sdCard.RootFolder; + temp = sdrootFolder; + var folder = await sdrootFolder.GetFoldersAsync(); + foreach (ExternalStorageFolder currentChildFolder in folder) + { + var files = await currentChildFolder.GetFilesAsync(); + foreach (ExternalStorageFile currentChildFile in files) + { + l.Clear(); + if (currentChildFile.Name.EndsWith(searchBox.Text)) + l.Add(new sdlist(searchBox.Text, "/Resources/Assets/Images/folder.png")); + } + } + sdlists.ItemsSource = l; + } - else - {} + } - #endregion } } \ No newline at end of file diff --git a/File360/MetroInMotion.cs b/File360/MetroInMotion.cs @@ -0,0 +1,524 @@ +using System; +using System.Net; +using System.Linq; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; +using Microsoft.Phone.Controls; +using LinqToVisualTree; +using System.Diagnostics; +using System.Collections.Generic; +using System.Windows.Controls.Primitives; +using System.Windows.Media.Imaging; + +namespace MetroInMotionUtils +{ + public static class MetroInMotion + { + #region AnimationLevel + + public static int GetAnimationLevel(DependencyObject obj) + { + return (int)obj.GetValue(AnimationLevelProperty); + } + + public static void SetAnimationLevel(DependencyObject obj, int value) + { + obj.SetValue(AnimationLevelProperty, value); + } + + + public static readonly DependencyProperty AnimationLevelProperty = + DependencyProperty.RegisterAttached("AnimationLevel", typeof(int), + typeof(MetroInMotion), new PropertyMetadata(-1)); + + #endregion + + #region Tilt + + public static double GetTilt(DependencyObject obj) + { + return (double)obj.GetValue(TiltProperty); + } + + public static void SetTilt(DependencyObject obj, double value) + { + obj.SetValue(TiltProperty, value); + } + + + public static readonly DependencyProperty TiltProperty = + DependencyProperty.RegisterAttached("Tilt", typeof(double), + typeof(MetroInMotion), new PropertyMetadata(2.0, OnTiltChanged)); + + /// <summary> + /// The extent of the tilt action, the larger the number, the bigger the tilt + /// </summary> + private static double TiltAngleFactor = 4; + + /// <summary> + /// The extent of the scaling action, the smaller the number, the greater the scaling. + /// </summary> + private static double ScaleFactor = 100; + + private static void OnTiltChanged(DependencyObject d, + DependencyPropertyChangedEventArgs args) + { + FrameworkElement targetElement = d as FrameworkElement; + + double tiltFactor = GetTilt(d); + + // create the required transformations + var projection = new PlaneProjection(); + var scale = new ScaleTransform(); + var translate = new TranslateTransform(); + + var transGroup = new TransformGroup(); + transGroup.Children.Add(scale); + transGroup.Children.Add(translate); + + // associate with the target element + targetElement.Projection = projection; + targetElement.RenderTransform = transGroup; + targetElement.RenderTransformOrigin = new Point(0.5, 0.5); + + targetElement.MouseLeftButtonDown += (s, e) => + { + var clickPosition = e.GetPosition(targetElement); + + // find the maximum of width / height + double maxDimension = Math.Max(targetElement.ActualWidth, targetElement.ActualHeight); + + // compute the normalised horizontal distance from the centre + double distanceFromCenterX = targetElement.ActualWidth / 2 - clickPosition.X; + double normalisedDistanceX = 2 * distanceFromCenterX / maxDimension; + + // rotate around the Y axis + projection.RotationY = normalisedDistanceX * TiltAngleFactor * tiltFactor; + + // compute the normalised vertical distance from the centre + double distanceFromCenterY = targetElement.ActualHeight / 2 - clickPosition.Y; + double normalisedDistanceY = 2 * distanceFromCenterY / maxDimension; + + // rotate around the X axis, + projection.RotationX = -normalisedDistanceY * TiltAngleFactor * tiltFactor; + + // find the distance to centre + double distanceToCentre = Math.Sqrt(normalisedDistanceX * normalisedDistanceX + + normalisedDistanceY * normalisedDistanceY); + + // scale accordingly + double scaleVal = tiltFactor * (1 - distanceToCentre) / ScaleFactor; + scale.ScaleX = 1 - scaleVal; + scale.ScaleY = 1 - scaleVal; + + // offset the plane transform + var rootElement = Application.Current.RootVisual as FrameworkElement; + var relativeToCentre = (targetElement.GetRelativePosition(rootElement).Y - rootElement.ActualHeight / 2) / 2; + translate.Y = -relativeToCentre; + projection.LocalOffsetY = +relativeToCentre; + + }; + + targetElement.ManipulationCompleted += (s, e) => + { + var sb = new Storyboard(); + sb.Children.Add(CreateAnimation(null, 0, 0.1, "RotationY", projection)); + sb.Children.Add(CreateAnimation(null, 0, 0.1, "RotationX", projection)); + sb.Children.Add(CreateAnimation(null, 1, 0.1, "ScaleX", scale)); + sb.Children.Add(CreateAnimation(null, 1, 0.1, "ScaleY", scale)); + sb.Begin(); + + translate.Y = 0; + projection.LocalOffsetY = 0; + }; + + } + + + #endregion + + #region IsPivotAnimated + + public static bool GetIsPivotAnimated(DependencyObject obj) + { + return (bool)obj.GetValue(IsPivotAnimatedProperty); + } + + public static void SetIsPivotAnimated(DependencyObject obj, bool value) + { + obj.SetValue(IsPivotAnimatedProperty, value); + } + + public static readonly DependencyProperty IsPivotAnimatedProperty = + DependencyProperty.RegisterAttached("IsPivotAnimated", typeof(bool), + typeof(MetroInMotion), new PropertyMetadata(false, OnIsPivotAnimatedChanged)); + + private static void OnIsPivotAnimatedChanged(DependencyObject d, DependencyPropertyChangedEventArgs args) + { + ItemsControl list = d as ItemsControl; + + list.Loaded += (s2, e2) => + { + // locate the pivot control that this list is within + Pivot pivot = list.Ancestors<Pivot>().Single() as Pivot; + + // and its index within the pivot + int pivotIndex = pivot.Items.IndexOf(list.Ancestors<PivotItem>().Single()); + + bool selectionChanged = false; + + pivot.SelectionChanged += (s3, e3) => + { + selectionChanged = true; + }; + + // handle manipulation events which occur when the user + // moves between pivot items + pivot.ManipulationCompleted += (s, e) => + { + if (!selectionChanged) + return; + + selectionChanged = false; + + if (pivotIndex != pivot.SelectedIndex) + return; + + // determine which direction this tab will be scrolling in from + bool fromRight = e.TotalManipulation.Translation.X <= 0; + + + // iterate over each of the items in view + var items = list.GetItemsInView().ToList(); + for (int index = 0; index < items.Count; index++ ) + { + var lbi = items[index]; + + list.Dispatcher.BeginInvoke(() => + { + var animationTargets = lbi.Descendants() + .Where(p => MetroInMotion.GetAnimationLevel(p) > -1); + foreach (FrameworkElement target in animationTargets) + { + // trigger the required animation + GetSlideAnimation(target, fromRight).Begin(); + } + }); + }; + + }; + }; + } + + + #endregion + + /// <summary> + /// Animates each element in order, creating a 'peel' effect. The supplied action + /// is invoked when the animation ends. + /// </summary> + public static void Peel(this IEnumerable<FrameworkElement> elements, Action endAction) + { + var elementList = elements.ToList(); + var lastElement = elementList.Last(); + + // iterate over all the elements, animating each of them + double delay = 0; + foreach (FrameworkElement element in elementList) + { + var sb = GetPeelAnimation(element, delay); + + // add a Completed event handler to the last element + if (element.Equals(lastElement)) + { + sb.Completed += (s, e) => + { + endAction(); + }; + } + + sb.Begin(); + delay += 50; + } + } + + + /// <summary> + /// Enumerates all the items that are currently visible in am ItemsControl. This implementation assumes + /// that a VirtualizingStackPanel is being used as the ItemsPanel. + /// </summary> + public static IEnumerable<FrameworkElement> GetItemsInView(this ItemsControl itemsControl) + { + // locate the stack panel that hosts the items + VirtualizingStackPanel vsp = itemsControl.Descendants<VirtualizingStackPanel>().First() as VirtualizingStackPanel; + + // iterate over each of the items in view + int firstVisibleItem = (int)vsp.VerticalOffset; + int visibleItemCount = (int)vsp.ViewportHeight; + for (int index = firstVisibleItem; index <= firstVisibleItem + visibleItemCount + 1; index++) + { + var item = itemsControl.ItemContainerGenerator.ContainerFromIndex(index) as FrameworkElement; + if (item == null) + continue; + + yield return item; + } + } + + /// <summary> + /// Creates a PlaneProjection and associates it with the given element, returning + /// a Storyboard which will animate the PlaneProjection to 'peel' the item + /// from the screen. + /// </summary> + private static Storyboard GetPeelAnimation(FrameworkElement element, double delay) + { + Storyboard sb; + + var projection = new PlaneProjection() + { + CenterOfRotationX = -0.1 + }; + element.Projection = projection; + + // compute the angle of rotation required to make this element appear + // at a 90 degree angle at the edge of the screen. + var width = element.ActualWidth; + var targetAngle = Math.Atan(1000 / (width / 2)); + targetAngle = targetAngle * 180 / Math.PI; + + // animate the projection + sb = new Storyboard(); + sb.BeginTime = TimeSpan.FromMilliseconds(delay); + sb.Children.Add(CreateAnimation(0, -(180 - targetAngle), 0.3, "RotationY", projection)); + sb.Children.Add(CreateAnimation(0, 23, 0.3, "RotationZ", projection)); + sb.Children.Add(CreateAnimation(0, -23, 0.3, "GlobalOffsetZ", projection)); + return sb; + } + + private static DoubleAnimation CreateAnimation(double? from, double? to, double duration, + string targetProperty, DependencyObject target) + { + var db = new DoubleAnimation(); + db.To = to; + db.From = from; + db.EasingFunction = new SineEase(); + db.Duration = TimeSpan.FromSeconds(duration); + Storyboard.SetTarget(db, target); + Storyboard.SetTargetProperty(db, new PropertyPath(targetProperty)); + return db; + } + + /// <summary> + /// Creates a TranslateTransform and associates it with the given element, returning + /// a Storyboard which will animate the TranslateTransform with a SineEase function + /// </summary> + private static Storyboard GetSlideAnimation(FrameworkElement element, bool fromRight) + { + double from = fromRight ? 80 : -80; + + Storyboard sb; + double delay = (MetroInMotion.GetAnimationLevel(element)) * 0.1 + 0.1; + + TranslateTransform trans = new TranslateTransform() { X = from }; + element.RenderTransform = trans; + + sb = new Storyboard(); + sb.BeginTime = TimeSpan.FromSeconds(delay); + sb.Children.Add(CreateAnimation(from, 0, 0.8, "X", trans)); + return sb; + } + + } + + public static class ExtensionMethods + { + public static Point GetRelativePosition(this UIElement element, UIElement other) + { + return element.TransformToVisual(other) + .Transform(new Point(0, 0)); + } + } + + /// <summary> + /// Animates an element so that it flies out and flies in! + /// </summary> + public class ItemFlyInAndOutAnimations + { + private Popup _popup; + + private Canvas _popupCanvas; + + private FrameworkElement _targetElement; + + private Point _targetElementPosition; + + private Image _targetElementClone; + + private Rectangle _backgroundMask; + + private static TimeSpan _flyInSpeed = TimeSpan.FromMilliseconds(200); + + private static TimeSpan _flyOutSpeed = TimeSpan.FromMilliseconds(300); + + public ItemFlyInAndOutAnimations() + { + // construct a popup, with a Canvas as its child + _popup = new Popup(); + _popupCanvas = new Canvas(); + _popup.Child = _popupCanvas; + } + + public static void TitleFlyIn(FrameworkElement title) + { + TranslateTransform trans = new TranslateTransform(); + trans.X = 300; + trans.Y = -50; + title.RenderTransform = trans; + + var sb = new Storyboard(); + + // animate the X position + var db = CreateDoubleAnimation(300, 0, + new SineEase(), trans, TranslateTransform.XProperty, _flyInSpeed); + sb.Children.Add(db); + + // animate the Y position + db = CreateDoubleAnimation(-100, 0, + new SineEase(), trans, TranslateTransform.YProperty, _flyInSpeed); + sb.Children.Add(db); + + sb.Begin(); + } + + /// <summary> + /// Animate the previously 'flown-out' element back to its original location. + /// </summary> + public void ItemFlyIn() + { + if (_popupCanvas.Children.Count != 2) + return; + + _popup.IsOpen = true; + _backgroundMask.Opacity = 0.0; + + Image animatedImage = _popupCanvas.Children[1] as Image; + + var sb = new Storyboard(); + + // animate the X position + var db = CreateDoubleAnimation(_targetElementPosition.X - 100, _targetElementPosition.X, + new SineEase(), + _targetElementClone, Canvas.LeftProperty, _flyInSpeed); + sb.Children.Add(db); + + // animate the Y position + db = CreateDoubleAnimation(_targetElementPosition.Y - 50, _targetElementPosition.Y, + new SineEase(), + _targetElementClone, Canvas.TopProperty, _flyInSpeed); + sb.Children.Add(db); + + sb.Completed += (s, e) => + { + // when the animation has finished, hide the popup once more + _popup.IsOpen = false; + + // restore the element we have animated + _targetElement.Opacity = 1.0; + + // and get rid of our clone + _popupCanvas.Children.Clear(); + }; + + sb.Begin(); + } + + + /// <summary> + /// Animate the given element so that it flies off screen, fading + /// everything else that is on screen. + /// </summary> + public void ItemFlyOut(FrameworkElement element, Action action) + { + _targetElement = element; + var rootElement = Application.Current.RootVisual as FrameworkElement; + + _backgroundMask = new Rectangle() + { + Fill = new SolidColorBrush(Colors.Black), + Opacity = 0.0, + Width = rootElement.ActualWidth, + Height = rootElement.ActualHeight + }; + _popupCanvas.Children.Add(_backgroundMask); + + _targetElementClone = new Image() + { + Source = new WriteableBitmap(element, null) + }; + _popupCanvas.Children.Add(_targetElementClone); + + _targetElementPosition = element.GetRelativePosition(rootElement); + Canvas.SetTop(_targetElementClone, _targetElementPosition.Y); + Canvas.SetLeft(_targetElementClone, _targetElementPosition.X); + + var sb = new Storyboard(); + + // animate the X position + var db = CreateDoubleAnimation(_targetElementPosition.X, _targetElementPosition.X + 500, + new SineEase() { EasingMode = EasingMode.EaseIn }, + _targetElementClone, Canvas.LeftProperty, _flyOutSpeed); + sb.Children.Add(db); + + // animate the Y position + db = CreateDoubleAnimation(_targetElementPosition.Y, _targetElementPosition.Y + 50, + new SineEase() { EasingMode = EasingMode.EaseOut }, + _targetElementClone, Canvas.TopProperty, _flyOutSpeed); + sb.Children.Add(db); + + // fade out the other elements + db = CreateDoubleAnimation(0, 1, + null, _backgroundMask, UIElement.OpacityProperty, _flyOutSpeed); + sb.Children.Add(db); + + sb.Completed += (s, e2) => + { + action(); + + // hide the popup, by placing a task on the dispatcher queue, this + // should be executed after the navigation has occurred + element.Dispatcher.BeginInvoke(() => + { + _popup.IsOpen = false; + }); + }; + + // hide the element we have 'cloned' into the popup + element.Opacity = 0.0; + + // open the popup + _popup.IsOpen = true; + + // begin the animation + sb.Begin(); + } + + public static DoubleAnimation CreateDoubleAnimation(double from, double to, IEasingFunction easing, + DependencyObject target, object propertyPath, TimeSpan duration) + { + var db = new DoubleAnimation(); + db.To = to; + db.From = from; + db.EasingFunction = easing; + db.Duration = duration; + Storyboard.SetTarget(db, target); + Storyboard.SetTargetProperty(db, new PropertyPath(propertyPath)); + return db; + } + } +} diff --git a/File360/Package.appxmanifest b/File360/Package.appxmanifest @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"> + + <Identity Name="c5e5323f-37ff-4a94-8835-ee041976b1b9" + Publisher="CN=Sri" + Version="1.0.0.0" /> + + <mp:PhoneIdentity PhoneProductId="6db737b7-6d8e-4901-86a4-3110a717c72f" PhonePublisherId="adf37227-c10c-460b-a659-59745477b5c6"/> + + <Properties> + <DisplayName>File360</DisplayName> + <PublisherDisplayName>Sri</PublisherDisplayName> + <Logo>Assets\StoreLogo.png</Logo> + </Properties> + + <Prerequisites> + <OSMinVersion>6.3.1</OSMinVersion> + <OSMaxVersionTested>6.3.1</OSMaxVersionTested> + </Prerequisites> + + <Resources> + <Resource Language="x-generate"/> + </Resources> + + <Applications> + <Application Id="x6db737b7y6d8ey4901y86a4y3110a717c72fx" + Executable="AGHost.exe" + EntryPoint="MainPage.xaml"> + <m3:VisualElements + DisplayName="File360" + Square150x150Logo="Assets\SquareTile150x150.png" + Square44x44Logo="Assets\Logo.png" + Description="File360" + ForegroundText="light" + BackgroundColor="#464646"> + <m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png"/> + <m3:SplashScreen Image="SplashScreenImage.jpg" /> + </m3:VisualElements> + <Extensions> + <Extension Category="windows.backgroundTasks" EntryPoint="AgHost.BackgroundTask"> + <BackgroundTasks> + <Task Type="systemEvent" /> + </BackgroundTasks> + </Extension> + </Extensions> + </Application> + </Applications> + <Capabilities> + </Capabilities> + <Extensions> + <Extension Category="windows.activatableClass.inProcessServer"> + <InProcessServer> + <Path>AgHostSvcs.dll</Path> + <ActivatableClass ActivatableClassId="AgHost.BackgroundTask" ThreadingModel="both" /> + </InProcessServer> + </Extension> + </Extensions> +</Package> +\ No newline at end of file diff --git a/File360/PersonalizationPage.xaml b/File360/PersonalizationPage.xaml @@ -0,0 +1,50 @@ +<phone:PhoneApplicationPage + x:Class="File360.PersonalizationPage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" + xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" + 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" + FontFamily="{StaticResource PhoneFontFamilyNormal}" + FontSize="{StaticResource PhoneFontSizeNormal}" + Foreground="{StaticResource PhoneForegroundBrush}" + SupportedOrientations="Portrait" Orientation="Portrait" + mc:Ignorable="d" + shell:SystemTray.IsVisible="True"> + + <!--LayoutRoot is the root grid where all page content is placed--> + <Grid x:Name="LayoutRoot" Background="Transparent"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> + </Grid.RowDefinitions> + + <!--TitlePanel contains the name of the application and page title--> + <StackPanel Grid.Row="0" Margin="12,17,0,28"> + <TextBlock Style="{StaticResource PhoneTextNormalStyle}" Text="FILE360°"/> + <TextBlock Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" Text="personalization" FontSize="60"/> + </StackPanel> + + <!--ContentPanel - place additional content here--> + <Grid x:Name="ContentPanel" Grid.Row="1" Margin="10,10,14,-10"> + <ListBox> + <toolkit:ToggleSwitch x:Name="Wallpaper" Checked="Wallpaper_Checked" Unchecked="Wallpaper_Unchecked" Content="Wallpaper" Width="446"/> + <Grid x:Name="WallpaperTemp" Visibility="Collapsed" Height="342" Width="436"> + <Grid.Background> + <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0"> + <GradientStop Color="#FF1F1F1F" Offset="0"/> + <GradientStop Color="#FF1F1F1F" Offset="1"/> + <GradientStop Color="Black" Offset="0.52"/> + </LinearGradientBrush> + </Grid.Background> + <Image Tap="SideMenuWallChanger_Tap" x:Name="SideMenuWallChanger" Margin="10,8,10,12" Source="/Resources/Assets/Wallpaper/bg1.jpg"/> + <Rectangle Fill="{StaticResource PhoneDisabledBrush}" Margin="0,335,0,0"/> + </Grid> + <toolkit:ToggleSwitch Content="Sound FX" Width="446"/> + </ListBox> + </Grid> + </Grid> + +</phone:PhoneApplicationPage> +\ No newline at end of file diff --git a/File360/PersonalizationPage.xaml.cs b/File360/PersonalizationPage.xaml.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Navigation; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; +using System.Windows.Media.Imaging; + +namespace File360 +{ + public partial class PersonalizationPage : PhoneApplicationPage + { + public PersonalizationPage() + { + InitializeComponent(); + } + + private void SideMenuWallChanger_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + BitmapImage gh = MainPage.bm; + gh = new BitmapImage(new Uri("pack://application:/Resources/Assets/Wallpaper/bg2.jpg", UriKind.Absolute)); + MainPage mp = new MainPage(); + mp.WallpaperChanger(gh); + } + + private void Wallpaper_Checked(object sender, RoutedEventArgs e) + { + WallpaperTemp.Visibility = Visibility.Visible; + } + + private void Wallpaper_Unchecked(object sender, RoutedEventArgs e) + { + WallpaperTemp.Visibility = Visibility.Collapsed; + } + } +} +\ No newline at end of file diff --git a/File360/Properties/AppManifest.xml b/File360/Properties/AppManifest.xml @@ -1,5 +1,6 @@ <Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - <Deployment.Parts> - </Deployment.Parts> + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" +> + <Deployment.Parts> + </Deployment.Parts> </Deployment> diff --git a/File360/Properties/AssemblyInfo.cs b/File360/Properties/AssemblyInfo.cs @@ -34,4 +34,4 @@ using System.Resources; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: NeutralResourcesLanguageAttribute("en-US")] +[assembly: NeutralResourcesLanguageAttribute("en-US")] +\ No newline at end of file diff --git a/File360/Properties/WMAppManifest.xml b/File360/Properties/WMAppManifest.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0"> <DefaultLanguage xmlns="" code="en-US" /> - <App xmlns="" ProductID="{12dbcdd7-c235-40e7-b8fd-71e8074350bd}" Title="File360" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="File360 author" Description="Sample description" Publisher="File360" PublisherID="{28733bbf-6cf5-4fb4-b91a-c7b8ef0434d6}"> - <IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath> + <Languages xmlns=""> + <Language code="ta" /> + </Languages> + <App xmlns="" ProductID="{6db737b7-6d8e-4901-86a4-3110a717c72f}" Title="File360°" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="AMI" Description="Elegant Beautiful Explorer for Windows Phone 8." Publisher="AMI" PublisherID="{adf37227-c10c-460b-a659-59745477b5c6}"> + <IconPath IsRelative="true" IsResource="false">File360.Logo.png</IconPath> <Capabilities> <Capability Name="ID_CAP_NETWORKING" /> <Capability Name="ID_CAP_MEDIALIB_AUDIO" /> @@ -10,6 +13,9 @@ <Capability Name="ID_CAP_SENSORS" /> <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" /> <Capability Name="ID_CAP_REMOVABLE_STORAGE" /> + <Capability Name="ID_CAP_MEDIALIB_PHOTO" /> + <Capability Name="ID_CAP_IDENTITY_DEVICE" /> + <Capability Name="ID_CAP_ISV_CAMERA" /> </Capabilities> <Tasks> <DefaultTask Name="_default" NavigationPage="MainPage.xaml" /> @@ -17,23 +23,41 @@ <Tokens> <PrimaryToken TokenID="File360Token" TaskName="_default"> <TemplateFlip> - <SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI> + <SmallImageURI IsRelative="true" IsResource="false">File360.Logo.Small.png</SmallImageURI> <Count>0</Count> - <BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI> + <BackgroundImageURI IsRelative="true" IsResource="false">File360.Logo.Medium.png</BackgroundImageURI> <Title>File360</Title> - <BackContent> - </BackContent> - <BackBackgroundImageURI> - </BackBackgroundImageURI> - <BackTitle> - </BackTitle> - <DeviceLockImageURI> - </DeviceLockImageURI> - <HasLarge> - </HasLarge> + <BackContent></BackContent> + <BackBackgroundImageURI></BackBackgroundImageURI> + <BackTitle></BackTitle> + <LargeBackgroundImageURI IsRelative="true" IsResource="false">File360.Logo.Large.png</LargeBackgroundImageURI> + <LargeBackContent /> + <LargeBackBackgroundImageURI IsRelative="true" IsResource="false"></LargeBackBackgroundImageURI> + <DeviceLockImageURI></DeviceLockImageURI> + <HasLarge>True</HasLarge> </TemplateFlip> </PrimaryToken> </Tokens> + <Extensions> + <FileTypeAssociation Name="File URI" TaskID="_default" NavUriFragment="fileToken=%s"> + <!--<Logos> + <If you want to specify your own logo files, you can do it here> + <Logo Size="small" IsRelative="true">Assets/sdk-small-33x33.png</Logo> + <Logo Size="medium" IsRelative="true">Assets/sdk-medium-69x69.png</Logo> + <Logo Size="large" IsRelative="true">Assets/sdk-large-176x176.png</Logo> + </Logos>--> + <SupportedFileTypes> + <FileType ContentType="application/rar">.rar</FileType> + <FileType ContentType="application/pdf">.pdf</FileType> + <FileType ContentType="application/svg">.svg</FileType> + <FileType ContentType="application/mkv">.mkv</FileType> + <FileType ContentType="application/avi">.avi</FileType> + <FileType ContentType="application/csv">.csv</FileType> + <FileType ContentType="application/7z">.7z</FileType> + </SupportedFileTypes> + </FileTypeAssociation> + <Protocol Name="f360" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" /> + </Extensions> <ScreenResolutions> <ScreenResolution Name="ID_RESOLUTION_WVGA" /> <ScreenResolution Name="ID_RESOLUTION_WXGA" /> diff --git a/File360/Resources/AppResources.Designer.cs b/File360/Resources/AppResources.Designer.cs @@ -133,15 +133,6 @@ namespace File360.Resources { } /// <summary> - /// Looks up a localized string similar to G. - /// </summary> - public static string tamil { - get { - return ResourceManager.GetString("tamil", resourceCulture); - } - } - - /// <summary> /// Looks up a localized string similar to true. /// </summary> public static string True { diff --git a/File360/Resources/AppResources.resx b/File360/Resources/AppResources.resx @@ -147,7 +147,4 @@ <data name="False" xml:space="preserve"> <value>flase</value> </data> - <data name="tamil" xml:space="preserve"> - <value>G</value> - </data> </root> \ No newline at end of file diff --git a/File360/Resources/Assets/Images/Hamburger_alpha.png b/File360/Resources/Assets/Images/Hamburger_alpha.png Binary files differ. diff --git a/File360/Resources/Assets/Images/add.png b/File360/Resources/Assets/Images/add.png Binary files differ. diff --git a/File360/Resources/Assets/Images/audio.png b/File360/Resources/Assets/Images/audio.png Binary files differ. diff --git a/File360/Resources/Assets/Images/back.png b/File360/Resources/Assets/Images/back.png Binary files differ. diff --git a/File360/Resources/Assets/Images/cover_art.jpg b/File360/Resources/Assets/Images/cover_art.jpg Binary files differ. diff --git a/File360/Resources/Assets/Images/cover_art.png b/File360/Resources/Assets/Images/cover_art.png Binary files differ. diff --git a/File360/Resources/Assets/Images/documents.png b/File360/Resources/Assets/Images/documents.png Binary files differ. diff --git a/File360/Resources/Assets/Images/download.png b/File360/Resources/Assets/Images/download.png Binary files differ. diff --git a/File360/Resources/Assets/Images/flatIcon.PNG b/File360/Resources/Assets/Images/flatIcon.PNG Binary files differ. diff --git a/File360/Resources/Assets/Images/greySearch.png b/File360/Resources/Assets/Images/greySearch.png Binary files differ. diff --git a/File360/Resources/Assets/Images/hamburger.png b/File360/Resources/Assets/Images/hamburger.png Binary files differ. diff --git a/File360/Resources/Assets/Images/list.png b/File360/Resources/Assets/Images/list.png Binary files differ. diff --git a/File360/Resources/Assets/Images/mute.png b/File360/Resources/Assets/Images/mute.png Binary files differ. diff --git a/File360/Resources/Assets/Images/onedrive.png b/File360/Resources/Assets/Images/onedrive.png Binary files differ. diff --git a/File360/Resources/Assets/Images/pause.png b/File360/Resources/Assets/Images/pause.png Binary files differ. diff --git a/File360/Resources/Assets/Images/phone.png b/File360/Resources/Assets/Images/phone.png Binary files differ. diff --git a/File360/Resources/Assets/Images/play.png b/File360/Resources/Assets/Images/play.png Binary files differ. diff --git a/File360/Resources/Assets/Images/sdcard.png b/File360/Resources/Assets/Images/sdcard.png Binary files differ. diff --git a/File360/Resources/Assets/Images/settings.png b/File360/Resources/Assets/Images/settings.png Binary files differ. diff --git a/File360/Resources/Assets/Images/settings_dark.png b/File360/Resources/Assets/Images/settings_dark.png Binary files differ. diff --git a/File360/Resources/Assets/Images/share.png b/File360/Resources/Assets/Images/share.png Binary files differ. diff --git a/File360/Resources/Assets/Images/slider_alpha.png b/File360/Resources/Assets/Images/slider_alpha.png Binary files differ. diff --git a/File360/Resources/Assets/Images/transport.ff.png b/File360/Resources/Assets/Images/transport.ff.png Binary files differ. diff --git a/File360/Resources/Assets/Images/transport.pause.png b/File360/Resources/Assets/Images/transport.pause.png Binary files differ. diff --git a/File360/Resources/Assets/Images/transport.play.png b/File360/Resources/Assets/Images/transport.play.png Binary files differ. diff --git a/File360/Resources/Assets/Images/transport.rew.png b/File360/Resources/Assets/Images/transport.rew.png Binary files differ. diff --git a/File360/Resources/Assets/Images/video.png b/File360/Resources/Assets/Images/video.png Binary files differ. diff --git a/File360/Resources/Assets/Images/whiteSearch.png b/File360/Resources/Assets/Images/whiteSearch.png Binary files differ. diff --git a/File360/Resources/Assets/Settings/ftp.png b/File360/Resources/Assets/Settings/ftp.png Binary files differ. diff --git a/File360/SecurityPage.xaml b/File360/SecurityPage.xaml @@ -15,7 +15,7 @@ shell:SystemTray.IsVisible="True"> <!--LayoutRoot is the root grid where all page content is placed--> - <Grid Background="Transparent"> + <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> @@ -26,7 +26,8 @@ <toolkit:ToggleSwitch x:Name="passw" Checked="passw_Checked" Unchecked="passw_Unchecked" HorizontalAlignment="Left" Margin="10,157,0,0" Grid.Row="1" VerticalAlignment="Top" Width="460" Content="password"/> <toolkit:ToggleSwitch x:Name="shake" Checked="shake_Checked" Unchecked="shake_Unchecked" HorizontalAlignment="Left" Margin="10,265,0,0" Grid.Row="1" VerticalAlignment="Top" Width="460" Content="shake to hide"/> - <TextBox x:Name="pb" HorizontalAlignment="Left" Height="84" Margin="10,368,0,0" Grid.RowSpan="2" TextWrapping="Wrap" VerticalAlignment="Top" Width="460" TextChanged="PSetter" Foreground="{StaticResource PhoneBackgroundBrush}" SelectionBackground="{x:Null}" SelectionForeground="{x:Null}"/> + <Button Click="Video_Tap" HorizontalAlignment="Left" Margin="325,36,0,0" VerticalAlignment="Top" Height="62" Width="108" Grid.Row="1" BorderBrush="{x:Null}" Foreground="{StaticResource PhoneBackgroundBrush}" Background="{StaticResource PhoneBackgroundBrush}"/> + <TextBox x:Name="pb" GotFocus="pb_GotFocus" HorizontalAlignment="Left" Height="84" Margin="10,368,0,0" Grid.RowSpan="2" TextWrapping="Wrap" VerticalAlignment="Top" Width="460" TextChanged="PSetter" Foreground="{StaticResource PhoneBackgroundBrush}" SelectionBackground="{x:Null}" SelectionForeground="{x:Null}"/> </Grid> </phone:PhoneApplicationPage> \ No newline at end of file diff --git a/File360/SecurityPage.xaml.cs b/File360/SecurityPage.xaml.cs @@ -25,7 +25,20 @@ namespace File360 { shake.IsEnabled = false; } - Settings_Checker(); + Shaker_Checker(); + pb.Background = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.Foreground = (SolidColorBrush)Resources["PhoneForegroundBrush"]; + pb.BorderBrush = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.InputScope = new InputScope { Names = { new InputScopeName { NameValue = InputScopeNameValue.Number } } }; + } + + void pb_GotFocus(object sender, RoutedEventArgs e) + { + pb.Background = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.Foreground = (SolidColorBrush)Resources["PhoneForegroundBrush"]; + pb.MaxLength = 5; + pb.BorderBrush = (SolidColorBrush)Resources["PhoneBackgroundBrush"]; + pb.TextAlignment = TextAlignment.Center; } #region ToggleSwitcher @@ -60,9 +73,10 @@ namespace File360 } #endregion + #region SettingsUpdater - public void Settings_Checker() + public void Shaker_Checker() { if ((string)appSettings["Shaker"] == "On") { @@ -85,5 +99,12 @@ namespace File360 } } #endregion + + + + private void Video_Tap(object sender, EventArgs e) + { + NavigationService.Navigate(new Uri("/VideoPlayer.xaml", UriKind.Relative)); + } } } diff --git a/File360/SettingsPage.xaml b/File360/SettingsPage.xaml @@ -0,0 +1,44 @@ +<phone:PhoneApplicationPage + x:Class="File360.SettingsPage" + xmlns:local="clr-namespace:File360" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" + 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" + FontFamily="{StaticResource PhoneFontFamilyNormal}" + FontSize="{StaticResource PhoneFontSizeNormal}" + Foreground="{StaticResource PhoneForegroundBrush}" + local:TiltEffect.IsTiltEnabled="True" + SupportedOrientations="Portrait" Orientation="Portrait" + mc:Ignorable="d" + shell:SystemTray.IsVisible="True"> + + <phone:PhoneApplicationPage.Resources> + <DataTemplate x:Name="SettingsItemTemplate"> + <Grid Tap="SettingTap_Tap" x:Name="SettingTap"> + <TextBlock x:Name="txtB" Margin="116,12,10,47" Tap="txtB_Tap" Foreground="{StaticResource PhoneForegroundBrush}" Text="{Binding SettingName}" FontSize="46"/> + <TextBlock x:Name="txtB2" Margin="116,86,10,20" Foreground="{StaticResource PhoneSubtleBrush}" Text="{Binding SettingDescription}" FontFamily="Portable User Interface"/> + <Ellipse HorizontalAlignment="Left" Height="77" Margin="12,28,0,0" Stroke="{x:Null}" VerticalAlignment="Top" Width="77"> + <Ellipse.Fill> + <ImageBrush ImageSource="{Binding SettingPicture}"/> + </Ellipse.Fill> + </Ellipse> + </Grid> + </DataTemplate> + + </phone:PhoneApplicationPage.Resources> + + <Grid> + <phone:Pivot HorizontalAlignment="Left" Height="768" Title="FILE360°" VerticalAlignment="Top" Width="480"> + <phone:PivotItem CacheMode="{x:Null}" Header="settings" Margin="0,28,-368,0" FontSize="24"> + <phone:LongListSelector + x:Name="SettingsList" + ItemTemplate="{StaticResource SettingsItemTemplate}" + IsGroupingEnabled="False" Margin="10,0"/> + </phone:PivotItem> + </phone:Pivot> + </Grid> + +</phone:PhoneApplicationPage> +\ No newline at end of file diff --git a/File360/SettingsPage.xaml.cs b/File360/SettingsPage.xaml.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Navigation; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; + +namespace File360 +{ + public partial class SettingsPage : PhoneApplicationPage + { + const string about = "/AboutPage.xaml"; + const string security = "/SecurityPage.xaml"; + const string personalization = "/PersonalizationPage.xaml"; + string txts; + List<settinglist> sl = new List<settinglist>(); + public SettingsPage() + { + InitializeComponent(); + sl.Add(new settinglist("ftp", "configure file transfer prtocol","/Resources/Assets/Settings/ftp.png")); + sl.Add(new settinglist("bluetooth", "bluetooth settings","/Resources/Assets/Images/add.png")); + sl.Add(new settinglist("nfc", "nfc configuration","")); + sl.Add(new settinglist("personalization", "get a look","")); + sl.Add(new settinglist("music", "change your music settings","")); + sl.Add(new settinglist("security", "protect your files","")); + sl.Add(new settinglist("about", "About Us!","")); + SettingsList.ItemsSource = sl; + + } + + async private void txtB_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + TextBlock txt = (TextBlock)sender; + txts = (txt.Text).ToString(); + if (txts == "about") + { + NavigationService.Navigate(new Uri(about, UriKind.Relative)); + } + + if (txts == "security") + { + NavigationService.Navigate(new Uri(security, UriKind.Relative)); + } + + if (txts == "bluetooth") + { + await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-bluetooth:")); + } + + if (txts == "nfc") + { + MessageBox.Show("coming soon..."); + } + + if (txts == "personalization") + { + NavigationService.Navigate(new Uri(personalization, UriKind.Relative)); + } + + if (txts == "ftp") + { + MessageBox.Show("coming soon..."); + } + if (txts == "music") + { + MessageBox.Show("coming soon..."); + } + } + + public void SettingTap_Tap(object sender, System.Windows.Input.GestureEventArgs e) + { + + } + + + } +} +\ No newline at end of file diff --git a/File360/SkydrivePage.xaml b/File360/SkydrivePage.xaml @@ -0,0 +1,16 @@ +<phone:PhoneApplicationPage + x:Class="File360.SkydrivePage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" + 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" + FontFamily="{StaticResource PhoneFontFamilyNormal}" + FontSize="{StaticResource PhoneFontSizeNormal}" + Foreground="{StaticResource PhoneForegroundBrush}" + SupportedOrientations="Portrait" Orientation="Portrait" + mc:Ignorable="d" + shell:SystemTray.IsVisible="True"> + +</phone:PhoneApplicationPage> +\ No newline at end of file diff --git a/File360/SkydrivePage.xaml.cs b/File360/SkydrivePage.xaml.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Navigation; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; + +namespace File360 +{ + public partial class SkydrivePage : PhoneApplicationPage + { + public SkydrivePage() + { + InitializeComponent(); + } + } +} +\ No newline at end of file diff --git a/File360/URISchemeExtensionsLandingPage.xaml b/File360/URISchemeExtensionsLandingPage.xaml @@ -0,0 +1,35 @@ +<phone:PhoneApplicationPage + x:Class="File360.URISchemeExtensionsLandingPage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" + 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" + FontFamily="{StaticResource PhoneFontFamilyNormal}" + FontSize="{StaticResource PhoneFontSizeNormal}" + Foreground="{StaticResource PhoneForegroundBrush}" + SupportedOrientations="Portrait" Orientation="Portrait" + mc:Ignorable="d" + shell:SystemTray.IsVisible="True"> + + <!--LayoutRoot is the root grid where all page content is placed--> + <Grid x:Name="LayoutRoot" Background="Transparent"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> + </Grid.RowDefinitions> + + <!--TitlePanel contains the name of the application and page title--> + <StackPanel Grid.Row="0" Margin="12,17,0,28"> + <TextBlock Text="FILE360°" Style="{StaticResource PhoneTextNormalStyle}"/> + <TextBlock Text="Opening Cont." Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> + </StackPanel> + + <!--ContentPanel - place additional content here--> + <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> + + </Grid> + </Grid> + +</phone:PhoneApplicationPage> +\ No newline at end of file diff --git a/File360/URISchemeExtensionsLandingPage.xaml.cs b/File360/URISchemeExtensionsLandingPage.xaml.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Navigation; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; + +namespace File360 +{ + public partial class URISchemeExtensionsLandingPage : PhoneApplicationPage + { + public URISchemeExtensionsLandingPage() + { + InitializeComponent(); + } + } +} +\ No newline at end of file diff --git a/File360/UriMapper.cs b/File360/UriMapper.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Navigation; +using Windows.Phone.Storage.SharedAccess; + +namespace WindowsPhoneFileandURIAssociationDemo +{ + class UriMapper : UriMapperBase + { + public override Uri MapUri(Uri uri) + { + string uriToLaunch = uri.ToString(); + + // File association launch + if (uriToLaunch.Contains("/FileTypeAssociation")) + { + + int fileIDIndex = uriToLaunch.IndexOf("fileToken=") + "fileToken=".Length; + string fileID = uriToLaunch.Substring(fileIDIndex); + + // Get the file name. + string incomingFileName = SharedStorageAccessManager.GetSharedFileName(fileID); + + // Get the file extension. + string incomingFileType = Path.GetExtension(incomingFileName); + + // Map the file extension to different pages. + switch (incomingFileType) + { + case ".pdf": + return new Uri("/EBookReader.xaml?fileToken=" + fileID, UriKind.Relative); + case ".svg": + return new Uri("/VideoPlayer.xaml?fileToken=" + fileID, UriKind.Relative); + case ".mkv": + return new Uri("/VideoPlayer.xaml?fileToken=" + fileID, UriKind.Relative); + case ".rar": + return new Uri("/VideoPlayer.xaml?fileToken=" + fileID, UriKind.Relative); + case ".csv": + return new Uri("/EBookReader.xaml?fileToken=" + fileID, UriKind.Relative); + case ".avi": + return new Uri("/EBookReader.xaml?fileToken=" + fileID, UriKind.Relative); + case ".7z": + return new Uri("/EBookReader.xaml?fileToken=" + fileID, UriKind.Relative); + default: + return new Uri("/MainPage.xaml", UriKind.Relative); + } + } + else if (System.Net.HttpUtility.UrlDecode(uriToLaunch).Contains("f360:ShowURIPage?UniqueID=")) + { + string uniqueId = uriToLaunch.Substring(System.Net.HttpUtility.UrlDecode(uriToLaunch).IndexOf("UniqueID=") + "UniqueID=".Length); + + // Map the request to URIScheme Landing page URISchemeFooBarLandingPage.xaml + return new Uri("/URISchemeExtensionsLandingPage.xaml?UniqueID=" + uniqueId, UriKind.Relative); + + } + // Otherwise perform normal launch. + return uri; + } + + } +} diff --git a/File360/VaultPage.xaml b/File360/VaultPage.xaml @@ -0,0 +1,83 @@ +<phone:PhoneApplicationPage + xmlns:local="clr-namespace:File360" + xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" + xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" + 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" + x:Class="File360.vault" + local:TiltEffect.IsTiltEnabled="True" + mc:Ignorable="d" + Orientation="Portrait" + shell:SystemTray.IsVisible="True"> + + <phone:PhoneApplicationPage.Resources> + <Style x:Key="EmptyPressedState" TargetType="Button"> + <Setter Property="HorizontalAlignment" Value="Left"/> + <Setter Property="BorderBrush" Value="Transparent"/> + <Setter Property="VerticalAlignment" Value="Top"/> + <Setter Property="FontSize" Value="30"/> + <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiLight}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="Button"> + <Grid Background="Transparent"> + <VisualStateManager.VisualStateGroups> + <VisualStateGroup x:Name="CommonStates"> + <VisualState x:Name="Pressed"> + <Storyboard> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground"> + <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/> + </ObjectAnimationUsingKeyFrames> + </Storyboard> + </VisualState> + </VisualStateGroup> + </VisualStateManager.VisualStateGroups> + <Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"> + <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/> + </Border> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + + <DataTemplate x:Key="VaultTemplate"> + <StackPanel Margin="0,0,15,50" > + <!--<Button x:Name="btnb" Content="{Binding Name}" Click="sdsub" Style="{StaticResource ListButtonStyle}"/>--> + <Button x:Name="folderTap" Content="{Binding VaultName}" Style="{StaticResource EmptyPressedState}" CharacterSpacing="0" Hold="folderTap_Hold" VerticalAlignment="Top" /> + <!--<TextBlock x:Name="subtxt" Text="{Binding Name2}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>--> + <toolkit:ContextMenuService.ContextMenu> + + <toolkit:ContextMenu IsZoomEnabled="True" x:Name="ContextMenu"> + + <toolkit:MenuItem x:Name="Remove" Header="remove" Click="Remove_Click"/> + + </toolkit:ContextMenu> + + </toolkit:ContextMenuService.ContextMenu> + </StackPanel> + </DataTemplate> + </phone:PhoneApplicationPage.Resources> + + <!--LayoutRoot is the root grid where all page content is placed--> + <Grid x:Name="LayoutRoot" Background="Transparent"> + <phone:Pivot x:Name="vaultpivot" HorizontalAlignment="Left" Height="768" Title="FILE360°" VerticalAlignment="Top" Width="480" Grid.RowSpan="2"> + <phone:PivotItem Header="vault" Margin="10,28,-358,0"> + <toolkit:LongListMultiSelector + x:Name="vaultLister" + ItemTemplate="{StaticResource VaultTemplate}" + IsGroupingEnabled="True"/> + </phone:PivotItem> + </phone:Pivot> + + </Grid> + +</phone:PhoneApplicationPage> +\ No newline at end of file diff --git a/File360/VaultPage.xaml.cs b/File360/VaultPage.xaml.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Navigation; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; +using Microsoft.Devices.Sensors; +using Microsoft.Xna.Framework; +using System.ComponentModel; +using File360.Resources; +using System.IO.IsolatedStorage; + +namespace File360 +{ + public partial class vault : PhoneApplicationPage + { + Accelerometer accelerometer; + const string MAIN_PAGE_URI = "/MainPage.xaml"; + List<vaultlist> vl = new List<vaultlist>(); + public static string Vbtns; + IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; + + int index; + public vault() + { + InitializeComponent(); + #region AccelerometerChecker + + if ((string)appSettings["Shaker"] == "On") + { + if (accelerometer == null) + { + accelerometer = new Accelerometer(); + accelerometer.TimeBetweenUpdates = TimeSpan.FromMilliseconds(20); + accelerometer.CurrentValueChanged += new EventHandler<SensorReadingEventArgs<AccelerometerReading>>(accelerometer_CurrentValueChanged); + try + { + accelerometer.Start(); + } + catch (InvalidOperationException ex) + { + MessageBox.Show("Initiating Accelerometer Failed!" + "\nAdditional Information:\n" + ex); + } + } + } + +#endregion + #region FilesLister + if (MainPage.Hbtns != null) + { + vl.Add(new vaultlist(MainPage.Hbtns, "Folder")); + List<AlphaKeyGroup<vaultlist>> DataSource = AlphaKeyGroup<vaultlist>.CreateGroups(vl, System.Threading.Thread.CurrentThread.CurrentUICulture, (vaultlist v) => { return v.VaultName; }, true); + vaultLister.ItemsSource = DataSource; + } + #endregion + } + + #region Accelerometer + + void accelerometer_CurrentValueChanged(object sender, SensorReadingEventArgs<AccelerometerReading> e) + { + Dispatcher.BeginInvoke(() => UpdateUI(e.SensorReading)); + } + + private void UpdateUI(AccelerometerReading accelerometerReading) + { + + Vector3 acceleration = accelerometerReading.Acceleration; + + if (acceleration.X >= 0.8 || acceleration.X <= -0.8) + { + if (accelerometer != null) + { + accelerometer.Stop(); + } + NavigationService.GoBack(); + } + + } + + protected override void OnBackKeyPress(CancelEventArgs e) + { + if (accelerometer != null) + { + accelerometer.Stop(); + } + } + +#endregion + #region ContextMenu + + private void Remove_Click(object sender, RoutedEventArgs e) + { + + vl.RemoveAt(index); + List<AlphaKeyGroup<vaultlist>> DataSource = AlphaKeyGroup<vaultlist>.CreateGroups(vl, System.Threading.Thread.CurrentThread.CurrentUICulture, (vaultlist v) => { return v.VaultName; }, true); + vaultLister.ItemsSource = DataSource; + } + + #endregion + + private void folderTap_Hold(object sender, System.Windows.Input.GestureEventArgs e) + { + Button b = (Button)sender; + Vbtns = (b.Content).ToString(); + vaultlist dataObject = (vaultlist)b.DataContext; + index = vl.IndexOf(dataObject); + } + + } +} +\ No newline at end of file diff --git a/File360/VideoPlayer.xaml b/File360/VideoPlayer.xaml @@ -5,109 +5,40 @@ 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:edc="clr-namespace:Microsoft.Expression.Controls;assembly=Microsoft.Expression.Drawing" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" - x:Class="File360.VideoPlayer" + x:Class="File360.secret" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="Landscape" mc:Ignorable="d" shell:SystemTray.IsVisible="False" Orientation="Landscape"> - <phone:PhoneApplicationPage.Resources> - <Style x:Key="SliderStyle" TargetType="Slider"> - <Setter Property="BorderThickness" Value="0"/> - <Setter Property="BorderBrush" Value="Transparent"/> - <Setter Property="Maximum" Value="10"/> - <Setter Property="Minimum" Value="0"/> - <Setter Property="Value" Value="0"/> - <Setter Property="Background" Value="{StaticResource PhoneChromeBrush}"/> - <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="Slider"> - <Grid Margin="0,0,0,1"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal"/> - <VisualState x:Name="MouseOver"/> - <VisualState x:Name="Disabled"> - <Storyboard> - <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HorizontalTrack"/> - <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VerticalTrack"/> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="VerticalFill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <Grid x:Name="HorizontalTemplate" Margin="10,0,10,10"> - <Rectangle x:Name="HorizontalTrack" IsHitTestVisible="False" Margin="0,15,0,32" Fill="{StaticResource PhoneBorderBrush}" RadiusY="3.5" RadiusX="3.5"/> - <Rectangle x:Name="HorizontalFill" IsHitTestVisible="False" Margin="0,15,0,32" RadiusX="3.5" RadiusY="3.5" StrokeThickness="2"> - <Rectangle.Fill> - <SolidColorBrush Color="White"/> - </Rectangle.Fill> - <Rectangle.Clip> - <RectangleGeometry Rect="0, 0, 6, 12"/> - </Rectangle.Clip> - </Rectangle> - <Rectangle x:Name="HorizontalCenterElement" HorizontalAlignment="Left" Margin="-2,7,0,24" Width="25" Stroke="{StaticResource PhoneForegroundBrush}" Fill="{StaticResource PhoneChromeBrush}" RadiusY="11" RadiusX="11" StrokeThickness="4.5"> - <Rectangle.RenderTransform> - <TranslateTransform/> - </Rectangle.RenderTransform> - </Rectangle> - </Grid> - <Grid x:Name="VerticalTemplate" Margin="{StaticResource PhoneVerticalMargin}"> - <Rectangle x:Name="VerticalTrack" Fill="{TemplateBinding Background}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12"/> - <Rectangle x:Name="VerticalFill" Fill="{TemplateBinding Foreground}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12"> - <Rectangle.Clip> - <RectangleGeometry Rect="0, 0, 12, 6"/> - </Rectangle.Clip> - </Rectangle> - <Rectangle x:Name="VerticalCenterElement" Fill="{StaticResource PhoneForegroundBrush}" Height="12" Margin="12,0,12,0" VerticalAlignment="Top" Width="24"> - <Rectangle.RenderTransform> - <TranslateTransform/> - </Rectangle.RenderTransform> - </Rectangle> - </Grid> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - </phone:PhoneApplicationPage.Resources> <Grid Background="Black"> - <MediaElement x:Name="MediaPlayer" - Tap="MediaPlayer_Tap" + <MediaElement x:Name="VideoPlayer" + Tap="VideoPlayer_Tap" + Source="123.wmv" AutoPlay="True" MediaOpened="VideoPlayer_MediaOpened" MediaEnded="VideoPlayer_MediaEnded" MediaFailed="Media_MediaFailed"/> - <Grid x:Name="ControlsContainer" HorizontalAlignment="Left" Height="221" Margin="0,259,0,0" VerticalAlignment="Top" Width="800" Background="{StaticResource PhoneSemitransparentBrush}"> - <RepeatButton x:Name="Forward" Content="" HorizontalAlignment="Right" Margin="0,95,66,36" VerticalAlignment="Center" Width="120" Height="90" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="Forward_Click" Background="{StaticResource PhoneForegroundBrush}"> - <RepeatButton.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/transport.ff.png"/> - </RepeatButton.OpacityMask> - </RepeatButton> - <Button x:Name="Play" Opacity="1" Click="Play_Click" Margin="317,95,303,12" BorderBrush="{x:Null}" Background="{StaticResource PhoneForegroundBrush}" Foreground="{x:Null}"> - <Button.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/transport.play.png"/> - </Button.OpacityMask> - </Button> - <RepeatButton x:Name="Reverse" Content="" HorizontalAlignment="Left" Margin="66,95,0,36" VerticalAlignment="Center" Width="120" Height="90" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="Reverse_Click" Background="{StaticResource PhoneForegroundBrush}"> - <RepeatButton.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/transport.rew.png"/> - </RepeatButton.OpacityMask> - </RepeatButton> - <Slider x:Name="timelineSlider" Style="{StaticResource SliderStyle}" Margin="66,27,66,126" ValueChanged="timelineSlider_ValueChanged" VerticalAlignment="Center" Height="68"/> + <Grid x:Name="ControlsContainer" HorizontalAlignment="Left" Height="259" Margin="0,221,0,0" VerticalAlignment="Top" Width="800" Opacity="0.795" Background="{StaticResource PhoneBackgroundBrush}"> + <RepeatButton x:Name="Forward" Content="" HorizontalAlignment="Right" Margin="0,91,66,70" VerticalAlignment="Center" Width="120" Height="90" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="Forward_Click"> + <RepeatButton.Background> + <ImageBrush Stretch="UniformToFill" ImageSource="/Resources/Assets/Images/transport.ff.png"/> + </RepeatButton.Background> + </RepeatButton> + <Button x:Name="Play" Opacity="1" Click="Play_Click" Margin="310,75,310,70"/> + <RepeatButton x:Name="Reverse" Content="" HorizontalAlignment="Left" Margin="66,91,0,70" VerticalAlignment="Center" Width="120" Height="90" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="Reverse_Click"> + <RepeatButton.Background> + <ImageBrush Stretch="UniformToFill" ImageSource="/Resources/Assets/Images/transport.rew.png"/> + </RepeatButton.Background> + </RepeatButton> + <Slider Name="timelineSlider" Margin="66,3,66,169" ValueChanged="timelineSlider_ValueChanged" VerticalAlignment="Center" Height="87"/> </Grid> - <Rectangle x:Name="MuteAudio" Tap="MuteAudio_Tap" Opacity="0.5" Margin="686,29,38,396" Fill="{StaticResource PhoneForegroundBrush}"> - <Rectangle.OpacityMask> - <ImageBrush Stretch="Uniform" ImageSource="Resources/Assets/Images/mute.png"/> - </Rectangle.OpacityMask> - </Rectangle> + <Image x:Name="MuteAudio" Tap="MuteAudio_Tap" Opacity="0.5" Source="/Resources/Assets/Images/mute.png" Margin="686,29,38,396"/> </Grid> </phone:PhoneApplicationPage> \ No newline at end of file diff --git a/File360/VideoPlayer.xaml.cs b/File360/VideoPlayer.xaml.cs @@ -12,10 +12,12 @@ using System.Windows.Media.Imaging; namespace File360 { - public partial class VideoPlayer : PhoneApplicationPage + public partial class secret : PhoneApplicationPage { + int i; + int j; double volume; - public VideoPlayer() + public secret() { InitializeComponent(); } @@ -23,7 +25,7 @@ namespace File360 private void Reverse_Click(object sender, RoutedEventArgs e) { - if (MediaPlayer.CanSeek) + if (VideoPlayer.CanSeek) { int SliderValue = (int)timelineSlider.Value; timelineSlider.Value = SliderValue - 0.3; @@ -32,19 +34,26 @@ namespace File360 private void Play_Click(object sender, RoutedEventArgs e) { - if (MediaPlayer.CanPause) + j++; + if (i % 2 != 1) { - MediaPlayer.Pause(); + VideoPlayer.Play(); } - else + + if (i % 2 == 1) { - MediaPlayer.Play(); + if (VideoPlayer.CanPause) + { + VideoPlayer.Pause(); + } } + + } private void Forward_Click(object sender, RoutedEventArgs e) { - if (MediaPlayer.CanSeek) + if (VideoPlayer.CanSeek) { int SliderValue = (int)timelineSlider.Value; timelineSlider.Value = SliderValue + 0.3; @@ -56,15 +65,20 @@ namespace File360 NavigationService.GoBack(); } - private void MediaPlayer_Tap(object sender, System.Windows.Input.GestureEventArgs e) + private void VideoPlayer_Tap(object sender, System.Windows.Input.GestureEventArgs e) { - if (ControlsContainer.Visibility == System.Windows.Visibility.Visible) + + i++; + if(i%2 != 1) { - ControlsContainer.Visibility = System.Windows.Visibility.Collapsed; + ControlsContainer.Visibility = System.Windows.Visibility.Collapsed; + MuteAudio.Visibility = System.Windows.Visibility.Collapsed; } - else + + if (i % 2 == 1) { ControlsContainer.Visibility = System.Windows.Visibility.Visible; + MuteAudio.Visibility = System.Windows.Visibility.Visible; } } @@ -72,30 +86,30 @@ namespace File360 { int SliderValue = (int)timelineSlider.Value; TimeSpan ts = new TimeSpan(0, 0, 0, 0, SliderValue); - MediaPlayer.Position = ts; + VideoPlayer.Position = ts; } private void VideoPlayer_MediaOpened(object sender, RoutedEventArgs e) { - timelineSlider.Maximum = MediaPlayer.NaturalDuration.TimeSpan.TotalMilliseconds; + timelineSlider.Maximum = VideoPlayer.NaturalDuration.TimeSpan.TotalMilliseconds; } private void VideoPlayer_MediaEnded(object sender, RoutedEventArgs e) { - MediaPlayer.Stop(); + VideoPlayer.Stop(); } private void MuteAudio_Tap(object sender, System.Windows.Input.GestureEventArgs e) { - if (MediaPlayer.Volume == 0) + if (VideoPlayer.Volume == 0) { - MediaPlayer.Volume = volume; + VideoPlayer.Volume = volume; } - if(MediaPlayer.Volume != 0) + if(VideoPlayer.Volume != 0) { - volume = MediaPlayer.Volume; - MediaPlayer.Volume = 0; + volume = VideoPlayer.Volume; + VideoPlayer.Volume = 0; } } diff --git a/File360/greyhome.png b/File360/greyhome.png Binary files differ. diff --git a/File360/musiclist.cs b/File360/musiclist.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace File360 +{ + class musiclist + { + + public string SongName{set;get;} + public string ArtistName { set; get; } + public string AlbumName { set; get; } + public string Musicindex { set; get; } + + public musiclist(string songName, string artistName, string albumName, string index) + { + this.SongName = songName; + this.ArtistName = artistName; + this.AlbumName = albumName; + this.Musicindex = index; + } + } +} diff --git a/File360/vaultlist.cs b/File360/vaultlist.cs @@ -0,0 +1,20 @@ +using System.Text; +using Microsoft.Phone.Storage; + +namespace File360 +{ + class vaultlist + { + + public string VaultName { set; get; } + public string VaultName2 { set; get; } + + public vaultlist(string Vaultname, string VaultsubFolderCount) + { + this.VaultName = Vaultname; + this.VaultName2 = VaultsubFolderCount; + } + } +} + + diff --git a/File360/whitehome.png b/File360/whitehome.png Binary files differ.