file360

Log | Files | Refs

commit 41b8b3eef33ad9ee702761a5c395055b6464ecfb
parent f5e70039e39d873bb65fc5f37b4bf02f1522018a
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date:   Thu,  3 Apr 2025 04:02:56 +0530

Added Post 8.1 Modern changes

PhonePages are changed to Page

Diffstat:
AFile360/FolderMenu.xaml | 22++++++++++++++++++++++
AFile360/FolderMenu.xaml.cs | 20++++++++++++++++++++
AFile360/MainGrid.xaml.cs | 649+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AFile360/MainViewModel.cs | 30++++++++++++++++++++++++++++++
MFile360/PersonalizationPage.xaml | 66+++++++++++++++++++++++++++---------------------------------------
MFile360/PersonalizationPage.xaml.cs | 46++++++++++++++++++++++------------------------
MFile360/Properties/WMAppManifest.xml | 46+++++++++++++++++++---------------------------
MFile360/Resources/Assets/ApplicationIcon.png | 0
AFile360/Resources/Assets/BadgeLogo.png | 0
AFile360/Resources/Assets/FILE360M.png | 0
AFile360/Resources/Assets/Hamburger.png | 0
AFile360/Resources/Assets/Hamburger_alpha.png | 0
AFile360/Resources/Assets/Logo.png | 0
AFile360/Resources/Assets/SplashScreen.png | 0
AFile360/Resources/Assets/SquareTile150x150.png | 0
AFile360/Resources/Assets/SquareTile71x71.png | 0
AFile360/Resources/Assets/StoreLogo.png | 0
AFile360/Resources/Assets/WideLogo.png | 0
AFile360/Resources/Assets/add.png | 0
AFile360/Resources/Assets/addressHelper.png | 0
AFile360/Resources/Assets/audio.png | 0
AFile360/Resources/Assets/back.png | 0
AFile360/Resources/Assets/camp-day-2015-equalizer.gif | 0
AFile360/Resources/Assets/check33.png | 0
AFile360/Resources/Assets/compression1.png | 0
AFile360/Resources/Assets/copy25.png | 0
AFile360/Resources/Assets/coverArt.png | 0
AFile360/Resources/Assets/cover_art.jpg | 0
AFile360/Resources/Assets/cover_art.png | 0
AFile360/Resources/Assets/cut1.png | 0
AFile360/Resources/Assets/documents.png | 0
AFile360/Resources/Assets/down.png | 0
AFile360/Resources/Assets/download.png | 0
AFile360/Resources/Assets/edit45.png | 0
AFile360/Resources/Assets/file360_header.png | 0
AFile360/Resources/Assets/flatIcon.PNG | 0
AFile360/Resources/Assets/grd_back.png | 0
AFile360/Resources/Assets/greySearch.png | 0
AFile360/Resources/Assets/hiddenFolder.png | 0
AFile360/Resources/Assets/home.png | 0
AFile360/Resources/Assets/list.png | 0
AFile360/Resources/Assets/mute.png | 0
AFile360/Resources/Assets/onedrive.png | 0
AFile360/Resources/Assets/pause.png | 0
AFile360/Resources/Assets/pdf.png | 0
AFile360/Resources/Assets/phone.png | 0
AFile360/Resources/Assets/play.png | 0
AFile360/Resources/Assets/popup_alpha.png | 0
AFile360/Resources/Assets/rubbish7.png | 0
AFile360/Resources/Assets/sdcard.png | 0
AFile360/Resources/Assets/settings.png | 0
AFile360/Resources/Assets/settings_dark.png | 0
AFile360/Resources/Assets/share.png | 0
AFile360/Resources/Assets/slider_alpha.png | 0
AFile360/Resources/Assets/sort27.png | 0
AFile360/Resources/Assets/transport.ff.png | 0
AFile360/Resources/Assets/transport.pause.png | 0
AFile360/Resources/Assets/transport.play.png | 0
AFile360/Resources/Assets/transport.rew.png | 0
AFile360/Resources/Assets/transport.stop.png | 0
AFile360/Resources/Assets/video.png | 0
AFile360/Resources/Assets/video_cover.png | 0
AFile360/Resources/Assets/whiteSearch.png | 0
AFile360/Resources/Assets/write38.png | 0
AFile360/Resources/Fonts/LiveSymbol.ttf | 0
AFile360/Resources/Fonts/UI/UIFont.ttf | 0
MFile360/sdlist.cs | 3---
MFile360/settinglist.cs | 1-
68 files changed, 789 insertions(+), 94 deletions(-)

diff --git a/File360/FolderMenu.xaml b/File360/FolderMenu.xaml @@ -0,0 +1,21 @@ +<UserControl x:Class="File360.FolderMenu" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + mc:Ignorable="d" + FontFamily="{StaticResource PhoneFontFamilyNormal}" + FontSize="{StaticResource PhoneFontSizeNormal}" + Foreground="{StaticResource PhoneForegroundBrush}" + d:DesignHeight="100" d:DesignWidth="420"> + + <Grid Height="100" Width="420" VerticalAlignment="Center" HorizontalAlignment="Center"> + <TextBlock x:Name="folderName" Text="Folder" HorizontalAlignment="Right" Height="40" Margin="0,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="314" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="28" FontFamily="Segoe WP Light"/> + <TextBlock x:Name="folderAddress" Text="sd://bharat/vcard" HorizontalAlignment="Right" Height="30" Margin="0,50,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="314" FontSize="22" FontFamily="Segoe wp Light" Foreground="{StaticResource PhoneTextBoxBrush}"/> + <Rectangle HorizontalAlignment="Left" Height="100" Stroke="Black" VerticalAlignment="Center" Width="85"> + <Rectangle.Fill> + <ImageBrush Stretch="Uniform" ImageSource="/Resources/Assets/Images/folder.png"/> + </Rectangle.Fill> + </Rectangle> + </Grid> +</UserControl> +\ No newline at end of file diff --git a/File360/FolderMenu.xaml.cs b/File360/FolderMenu.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 FolderMenu : UserControl + { + public FolderMenu() + { + InitializeComponent(); + } + } +} diff --git a/File360/MainGrid.xaml.cs b/File360/MainGrid.xaml.cs @@ -0,0 +1,649 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Windows.Storage; +using Windows.Storage.Pickers; +using Windows.UI.Popups; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; +using Windows.ApplicationModel.Activation; +using Windows.Storage.AccessCache; +using Windows.UI.Xaml.Media.Imaging; +using Windows.Storage.FileProperties; +using System.Threading.Tasks; + +namespace File360 +{ + public sealed partial class MainGrid : Page, IFolderPickerContinuable + { + #region Variables + + #region SettingsVaribles + string UserName="User"; + bool GridType = true; + #endregion + ApplicationDataContainer settings; + StorageFolder folder; + BitmapImage niy = new BitmapImage(new Uri("ms-appx:///Assets/IMG-20150528-WA0003.jpg", UriKind.Absolute)); + ImageSource musicCoverArt = null; + IReadOnlyList<IStorageItem> Items; + List<sdlist> sd = new List<sdlist>(); + private string mruToken = null; + IStorageFolder CurrentFolder = null; + string[] fT = { ".zip",".rar",".mkv",".",".inf",".ini"}; + #endregion + #region MainMethod + public MainGrid() + { + this.InitializeComponent(); + SideMenu.InitializeDrawerLayout(); + Addresser.InitializeComponent(); + musicCoverArt = niy; + #region SettingsSerializer + settings = Windows.Storage.ApplicationData.Current.LocalSettings; + if (settings.Values.Count == 0) + { + settings.Values["userName"] = "User"; + UserName = (string)settings.Values["userName"]; + settings.Values["itemType"] = "0"; + GridType = ((string)settings.Values["itemType"] == "0"); + } + else + { + UserName = (string)settings.Values["userName"]; + GridType = ((string)settings.Values["itemType"] == "0"); + } + #endregion + this.NavigationCacheMode = NavigationCacheMode.Required; + #region HardwareHandler + Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; + #endregion + + #region Orientation + Window.Current.SizeChanged += Current_SizeChanged; + #endregion + } + #region UserManipulation + private void RemoveFolderLocation(object sender, RoutedEventArgs e) + { + var button = sender as Button; + if (button != null && button.CommandParameter != null) + { + var folders = App.ViewModel.Folders; + var tempFolder = folders.First(); + folders.Remove(tempFolder); + + } + } + + private void Reset() + { + App.ViewModel.Folders.Clear(); + } + + private void AddFolderLocation(object sender, RoutedEventArgs e) + { + var folder = new Folder(); + folder.Name = "User - " + (App.ViewModel.Folders.Count + 1); + App.ViewModel.Folders.Add(folder); + } + + + #endregion + #region OrientationHelpers + void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) + { + if (IsVertical()) + { + } + if (!IsVertical()) + { + + } + } + public bool IsVertical() + { + if (Window.Current.Bounds.Height > Window.Current.Bounds.Width) return true; + else return false; + } + #endregion + #endregion + #region BackButtonHandler + private async void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) + { + e.Handled = true; + if (SettingsGrid.Visibility == Windows.UI.Xaml.Visibility.Visible) + { + SettingsFrame.Content= null; + SettingsGrid.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + return; + } + else if(CurrentFolder != null) + { + StorageFolder sf = await StorageFolder.GetFolderFromPathAsync(CurrentFolder.Path.Replace(CurrentFolder.Name,String.Empty)); + GetFilesAndFolder(sf); + this.Addresser.Children.RemoveAt(this.Addresser.Children.Count - 1); + } + else if (this.SideMenu.IsDrawerOpen == true) + { + this.SideMenu.CloseDrawer(); + return; + } + else if (SDGridView.SelectionMode == ListViewSelectionMode.Multiple) + { + scrollBar.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + headerText.Visibility = Windows.UI.Xaml.Visibility.Visible; + SDGridView.SelectionMode = ListViewSelectionMode.None; + SDGridView.IsItemClickEnabled = true; + return; + } + else if(!this.DialogBox.IsOpen) + { + this.DialogBox.IsOpen = true; + this.DialogBox.LeftButtonHandler += ExitApplicaton; + } + } + + #endregion + #region ExitApplication + + private void ExitApplicaton(object sender, RoutedEventArgs e) + { + Application.Current.Exit(); + } + #endregion + #region FileLister + private async void GetFilesAndFolder(IStorageFolder anyFolder) + { + CurrentFolder = anyFolder; + Items = null; + sd.Clear(); + SDGridView.ItemsSource = null; + Items = await anyFolder.GetItemsAsync(); + foreach (IStorageItem Data in Items) + { + if (Data.IsOfType(StorageItemTypes.Folder)) + { + IStorageFolder Folder; + Folder = (IStorageFolder)Data; + IReadOnlyList<IStorageItem> item = await Folder.GetItemsAsync(); + headerText.Text = anyFolder.Name; + sd.Add(new sdlist(Folder.Name, "f", item.Count.ToString())); + } + if (Data.IsOfType(StorageItemTypes.File)) + { + IStorageFile File; + File = (IStorageFile)Data; + string FileName = File.Name; + sd.Add(new sdlist(FileName, "Q")); + //string FileType = File.FileType; + //#region FileTypes + //foreach (string ft in fT) + //{ + //if (ft == FileType) + //{ + //sd.Add(new sdlist(FileName, "Q")); + //} + //} + //#endregion + + } + + + } + SDGridView.ItemsSource = sd; + //SDGridView.ItemTemplate = GridType ? GridFoldersView : ListFoldersView; + } + #endregion + #region LateralMenu + private void Menu_Click(object sender, RoutedEventArgs e) + { + if(SideMenu.IsDrawerOpen == false) + { + SideMenu.OpenDrawer(); + } + else + { + SideMenu.CloseDrawer(); + } + } + #endregion + #region MusicMenu + private void MusicMenuClick(object sender, RoutedEventArgs e) + { + if (MusicElement.Visibility == Windows.UI.Xaml.Visibility.Visible) + { + MusicElement.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + OpenMusic.Content = "u"; + return; + } + else if (MusicElement.Visibility == Windows.UI.Xaml.Visibility.Collapsed) + { + MusicElement.Visibility = Windows.UI.Xaml.Visibility.Visible; + OpenMusic.Content = "d"; + } + } + #endregion + #region ListBox + Object preObj = null; + Object curObj = null; + + private void SideMenuLeft_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + ListBox lBox = (ListBox)sender; + if (preObj != null) + { + SideBarMenuButton preSBMB = (SideBarMenuButton)preObj; + preSBMB.BackgroundColor = null; + } + curObj = lBox.SelectedItem; + preObj = curObj; + SideBarMenuButton stkChildren = (SideBarMenuButton)curObj; + stkChildren.BackgroundColor = (SolidColorBrush)Application.Current.Resources["PhoneAccentBrush"]; + } + #endregion + #region NavigationHelper + protected override void OnNavigatedTo(NavigationEventArgs e) + { + SuspensionManager.RegisterFrame(SettingsFrame, "SettingsFrame"); + if (SettingsFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the ScenarioList + if (!SettingsFrame.Navigate(typeof(SettingsPage))) + { + throw new Exception("Failed to create scenario list"); + } + } + } + #endregion + #region MenuHandlers + #region SDCard + private void SDStorageEnumerator(object sender, TappedRoutedEventArgs e) + { + if (true) + { + FolderPicker folderPicker = new FolderPicker(); + folderPicker.SuggestedStartLocation = PickerLocationId.Desktop; + try + { + SDGridView.ItemsPanel = GridType ? GridViewItemsPanel : ListViewItemsPanel; + folderPicker.PickFolderAndContinue(); + } + catch + { + return; + } + } + } + #endregion + #region Phone + private void PhoneStorageEnumerator(object sender, TappedRoutedEventArgs e) + { + + } + #endregion + #region Pictures + private async void PicturesLibraryTapped(object sender, TappedRoutedEventArgs e) + { + var pA = KnownFolders.PicturesLibrary; + var pF = await pA.GetFoldersAsync(); + SDGridView.ItemsSource = null; + sd.Clear(); + if (pF.Count != 0) + { + SDGridView.ItemTemplate = PicturesView; + SDGridView.ItemsPanel = GridViewItemsPanel; + Items = pF; + //BitmapImage bm = new BitmapImage(new Uri("ms-appx:///SampleData/SampleDataSource1/SampleDataSource1_Files/image01.png", UriKind.RelativeOrAbsolute)); + //var wb = await WinRTXamlToolkit.Imaging.WriteableBitmapFromBitmapImageExtension.FromBitmapImage(bm); + //ColorSampler cs = new ColorSampler(); + //WriteableBitmap wd = wb; + //MusicDock.Background = new SolidColorBrush(cs.GetPixel(wd)); + foreach (var pFo in pF) + { + try + { + GetThumbnailImageAsync(pFo, ThumbnailMode.PicturesView); + } + catch (Exception) + { + //MessageDialog md = new MessageDialog(ex.Message + ex.Source + ex.StackTrace); + //md.ShowAsync(); + } + + } + SDGridView.ItemsSource = sd; + MusicView.ItemsSource = sd; + } + } + private void SettingsPage(object sender, TappedRoutedEventArgs e) + { + SettingsGrid.Visibility = Windows.UI.Xaml.Visibility.Visible; + } + + #endregion + #region Video + private async void VideoLibraryTapped(object sender, TappedRoutedEventArgs e) + { + var vL = KnownFolders.VideosLibrary; + var vA = await vL.GetFoldersAsync(); + SDGridView.ItemsSource = null; + sd.Clear(); + if (vA.Count != 0) + { + SDGridView.ItemTemplate = VideosView; + SDGridView.ItemsPanel = GridViewItemsPanel; + foreach (var vF in vA) + { + try + { + GetThumbnailImageAsync(vF, ThumbnailMode.VideosView); + } + + catch (Exception ex) + { + MessageDialog md = new MessageDialog(ex.Message+ex.Source+ex.StackTrace); + md.ShowAsync(); + } + } + SDGridView.ItemsSource = sd; + } + else + { + return;//The Folder is empty :( + } + } + + #region Music + private async void MusicLibraryTapped(object sender, TappedRoutedEventArgs e) + { + IReadOnlyList<IStorageItem> mA = KnownFolders.MusicLibrary.GetItemsAsync().GetResults(); + + SDGridView.ItemsSource = null; + sd.Clear(); + if (mA.Count != 0) + { + SDGridView.ItemTemplate = MusicsView; + SDGridView.ItemsPanel = GridViewItemsPanel; + foreach (var mF in mA) + { + if (mF.IsOfType(StorageItemTypes.Folder)) + { + StorageFolder sf = (StorageFolder)mF; + GetThumbnailImageAsync(sf, ThumbnailMode.MusicView); + } + else + { + + } + try + { + } + catch (Exception ex) + { + MessageDialog mds = new MessageDialog(ex.Message + ex.Source + ex.StackTrace); + mds.ShowAsync(); + } + } + + } + SDGridView.ItemsSource = sd; + //} + //else + //{ + // return;//Add details. + //} + } + public static async Task<bool> IsEmpty(StorageFolder directory) + { + var items = await directory.GetItemsAsync(); + return items.Count == 0; + } + #endregion + async void GetThumbnailImageAsync(StorageFolder item, ThumbnailMode mode) + { + if (item == null) + return; + + using (var thumbnail = await item.GetThumbnailAsync(mode, 100)) + { + if (thumbnail != null && thumbnail.Type == ThumbnailType.Image) + { + BitmapImage bitmap = new BitmapImage(); + + Grid grf; + MessageDialog md = new MessageDialog("drg"); + ImageBrush imgs = new ImageBrush(); + imgs.Stretch = Stretch.UniformToFill; + imgs.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, () => bitmap.SetSource(thumbnail)).Completed += delegate + { + ImageBrush img = new ImageBrush(); + img.ImageSource = bitmap; + Grid grd = new Grid(); + grd.Height = PicHeight; + grd.Width = PicWidth; + + Grid subGrd = new Grid(); + subGrd.Height = ImageHeight; + subGrd.Width = ImageWidth; + subGrd.Background = img; + + TextBlock txt = new TextBlock(); + txt.VerticalAlignment = VerticalAlignment.Center; + txt.HorizontalAlignment = HorizontalAlignment.Center; + txt.Text = item.DisplayName; + + Grid idGrid = new Grid(); + idGrid.VerticalAlignment = VerticalAlignment.Bottom; + idGrid.Background = (SolidColorBrush)App.Current.Resources["PhoneChromeBrush"]; + idGrid.Children.Add(txt); + ObservableCollection<Grid> mediaCollect = new ObservableCollection<Grid>(); + mediaCollect.Add(grd); + }; + + + + + // < Grid Heigth = "{Binding PicHeight}" Width = "{Binding PicWidth}" > + //< Grid Height = "{Binding ImageHeight}" Width = "{Binding ImageWidth}" > + // < Grid.Background > + // < ImageSource = "{Binding Background}" Stretch = "UniformToFill" /> + // </ Grid.Background > + // < Grid VerticalAlignment = "Bottom" Background = "{ThemeResource PhoneChromeBrush}" > + // < TextBlock HorizontalAlignment = "Center" VerticalAlignment = "Center" Text = "{Binding Name}" FontFamily = "Assets/Font/Custom/Lobster 1.4.otf#Lobster 1.4" /> + // </ Grid > + // </ Grid > + // </ Grid > + } + else return; + } + } + #endregion + #endregion + + #region UI + public double PicHeight + { + get + { + if (IsVertical()) return Window.Current.Bounds.Height / 3; + else return Window.Current.Bounds.Width / 3; + } + } + public double PicWidth + { + get + { + if (IsVertical()) return Window.Current.Bounds.Width / 2; + else return Window.Current.Bounds.Height / 2; + } + } + public double ImageHeight + { + get + { + if (IsVertical()) return Window.Current.Bounds.Height / 3.5; + else return Window.Current.Bounds.Width / 3.5; + } + } + public double ImageWidth + { + get + { + if (IsVertical()) return Window.Current.Bounds.Width / 2.2; + else return Window.Current.Bounds.Height / 2.2; + } + } + public double Space + { + get { return Window.Current.Bounds.Height / 600; } + } + public double GridHeight + { + get + { + if (IsVertical()) return Window.Current.Bounds.Height / 4; + else return Window.Current.Bounds.Width / 4; + } + } + public double GridWidth + { + get + { + if (IsVertical()) return Window.Current.Bounds.Width / 3; + else return Window.Current.Bounds.Height / 3; + } + } + #endregion + + #region FolderPicker + + + public void ContinueFolderPicker(FolderPickerContinuationEventArgs args) + { + folder = args.Folder; + try + { + var id = folder.FolderRelativeId; + if (folder != null) + { + if (folder.IsOfType(StorageItemTypes.Folder)) + { + this.Addresser.Address = "D:"; + } + StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder); + mruToken = Windows.Storage.AccessCache.StorageApplicationPermissions.MostRecentlyUsedList.Add(folder); + GetFilesAndFolder(folder); + } + else + { + return; + } + } + catch + { return; } + } + #endregion + #region FolderInteraction + private void FolderHold(object sender, HoldingRoutedEventArgs e) + { + if (scrollBar.Visibility == Windows.UI.Xaml.Visibility.Collapsed) + { + headerText.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + scrollBar.Visibility = Windows.UI.Xaml.Visibility.Visible;//Start Cool Animations also :) + SDGridView.SelectionMode = ListViewSelectionMode.Multiple; + SDGridView.IsItemClickEnabled = false; + sdlist sdl = (sdlist)SDGridView.SelectedItem; + SDGridView.SelectedIndex = sd.IndexOf(sdl); + } + } + private async void GridItemClick(object sender, ItemClickEventArgs e) + { + sdlist sdl = (sdlist)e.ClickedItem; + IStorageItem selectedItem = Items.ElementAt(sd.IndexOf(sdl)); + if (selectedItem.IsOfType(StorageItemTypes.Folder)) + { + this.Addresser.Address = selectedItem.Name; + GetFilesAndFolder((IStorageFolder)selectedItem); + return; + } + else if (selectedItem.IsOfType(StorageItemTypes.File)) + { + MessageDialog mDialog = new MessageDialog("File Selected"); + await mDialog.ShowAsync(); + } + } + #endregion + #region FileOperations + private void SelectAll(object sender, TappedRoutedEventArgs e) + { + BottomBarItem bbi = (BottomBarItem)sender; + if (bbi.ContentText == "unselect all") + { + bbi.ContentText = "select all"; + scrollBar.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + headerText.Visibility = Windows.UI.Xaml.Visibility.Visible; + SDGridView.SelectionMode = ListViewSelectionMode.None; + SDGridView.IsItemClickEnabled = true; + return; + } + bbi.ContentText = "unselect all"; + SDGridView.SelectAll(); + SDGridView.IsItemClickEnabled = false; + } + #endregion + #region ApplicationSettings + private void SaveData(string key, string value) + { + //Assuming you have the variable declared in App.Xaml.cs. + //settings.Values[value] = App.UserName; + } + // Method to Load data from IsolatedStorageSettings + private void LoadData(string key, string value) + { + //if (settings.Values.Count &lt;= 0) return; + //{ + //Assuming you to have the variable present in App.Xaml.cs + //App.UserName = settings.Values.ContainsKey(value)? settings.Values[value] as String : String.Empty; + //} + } + #endregion + #region SDGridViewSelectionChanged + private void SDGridViewSelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (SDGridView.SelectedIndex == -1) + { + scrollBar.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + headerText.Visibility = Windows.UI.Xaml.Visibility.Visible; + SDGridView.SelectionMode = ListViewSelectionMode.None; + SDGridView.IsItemClickEnabled = true; + return; + } + else { return; } + } + #endregion + #region MusicOptions + private void PlayCurrent(object sender, RoutedEventArgs e) + { + + } + #endregion + + private void SortList(object sender, TappedRoutedEventArgs e) + { + this.Addresser.SelectedFolder(2); + } + + private void ListBoxSelectionChanged(object sender, SelectionChangedEventArgs e) + { + this.Addresser.Reset(); + sd.Clear(); + SDGridView.ItemsSource = null; + headerText.Text = String.Empty; + } + } +} diff --git a/File360/MainViewModel.cs b/File360/MainViewModel.cs @@ -0,0 +1,29 @@ +using System.Collections.ObjectModel; +using System.ComponentModel; + +namespace File360 +{ + public class MainViewModel : INotifyPropertyChanged + { + + public ObservableCollection<Folder> Folders { get; set; } + + public MainViewModel() + { + Folders = new ObservableCollection<Folder>(); + } + + + #region Interface Implementation + + public event PropertyChangedEventHandler PropertyChanged; + + protected void RaiseNotification(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + + #endregion + } +} +\ No newline at end of file diff --git a/File360/PersonalizationPage.xaml b/File360/PersonalizationPage.xaml @@ -1,50 +1,39 @@ -<phone:PhoneApplicationPage +<Page 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:local="using:File360" 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" + xmlns:toolkit="using:WinRTXamlToolkit.Controls" mc:Ignorable="d" - shell:SystemTray.IsVisible="True"> - - <!--LayoutRoot is the root grid where all page content is placed--> - <Grid x:Name="LayoutRoot" Background="Transparent"> + Foreground="White"> + + <Grid> <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 Orientation="Horizontal"> + <Button Style="{StaticResource DefaultButton}" MinWidth="20" Click="GoBack"> + <StackPanel Orientation="Horizontal"> + <TextBlock FontSize="35" TextAlignment="Center" Text="g" FontFamily="Assets/Font/settingsfont.ttf#settingsfont" Foreground="White"/> + <TextBlock Margin="10,0,0,0" + HorizontalAlignment="Left" + TextWrapping="Wrap" + Text="PERSONALIZATION" + VerticalAlignment="Center" + FontFamily="Segoe WP Black" + FontSize="26.667" Foreground="White"/> + </StackPanel> + </Button> </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> + <ScrollViewer Margin="0,10,0,0" FontSize="30" Foreground="White" Grid.Row="1" Background="{x:Null}"> + <StackPanel> + <local:ColorPicker ColorSet="2" x:Name="folderColor" OptionName="Folder Color" /> + <local:ColorPicker ColorSet="0" x:Name="accentColor" OptionName="App Accent Color" /> + <local:ColorPicker ColorSet="1" x:Name="themeColor" OptionName="App Theme Color" /> + </StackPanel> + </ScrollViewer> </Grid> - -</phone:PhoneApplicationPage> -\ No newline at end of file +</Page> diff --git a/File360/PersonalizationPage.xaml.cs b/File360/PersonalizationPage.xaml.cs @@ -1,39 +1,38 @@ -using System; +using File360.Common; +using System; using System.Collections.Generic; +using System.IO; 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; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; namespace File360 { - public partial class PersonalizationPage : PhoneApplicationPage + public sealed partial class PersonalizationPage : Page { public PersonalizationPage() { - InitializeComponent(); + this.InitializeComponent(); + Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; } - private void SideMenuWallChanger_Tap(object sender, System.Windows.Input.GestureEventArgs e) + private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs 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; + if (this.Frame.CanGoBack) this.Frame.GoBack(); } - private void Wallpaper_Unchecked(object sender, RoutedEventArgs e) + private void GoBack(object sender, RoutedEventArgs e) { - WallpaperTemp.Visibility = Visibility.Collapsed; + if (this.Frame.CanGoBack) this.Frame.GoBack(); } + } -} -\ No newline at end of file +} diff --git a/File360/Properties/WMAppManifest.xml b/File360/Properties/WMAppManifest.xml @@ -1,21 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0"> +<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2014/deployment" AppPlatformVersion="8.1"> <DefaultLanguage xmlns="" code="en-US" /> - <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> + <App xmlns="" ProductID="{12dbcdd7-c235-40e7-b8fd-71e8074350bd}" Title="File360" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="File360 author" Description="ASAPIEN" Publisher="File360" PublisherID="{28733bbf-6cf5-4fb4-b91a-c7b8ef0434d6}"> + <IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath> <Capabilities> <Capability Name="ID_CAP_NETWORKING" /> <Capability Name="ID_CAP_MEDIALIB_AUDIO" /> <Capability Name="ID_CAP_MEDIALIB_PLAYBACK" /> <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" /> @@ -23,14 +17,14 @@ <Tokens> <PrimaryToken TokenID="File360Token" TaskName="_default"> <TemplateFlip> - <SmallImageURI IsRelative="true" IsResource="false">File360.Logo.Small.png</SmallImageURI> + <SmallImageURI IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</SmallImageURI> <Count>0</Count> - <BackgroundImageURI IsRelative="true" IsResource="false">File360.Logo.Medium.png</BackgroundImageURI> + <BackgroundImageURI IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</BackgroundImageURI> <Title>File360</Title> <BackContent></BackContent> <BackBackgroundImageURI></BackBackgroundImageURI> <BackTitle></BackTitle> - <LargeBackgroundImageURI IsRelative="true" IsResource="false">File360.Logo.Large.png</LargeBackgroundImageURI> + <LargeBackgroundImageURI IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</LargeBackgroundImageURI> <LargeBackContent /> <LargeBackBackgroundImageURI IsRelative="true" IsResource="false"></LargeBackBackgroundImageURI> <DeviceLockImageURI></DeviceLockImageURI> @@ -39,24 +33,22 @@ </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>--> + <FileTypeAssociation Name="Portable Document File" TaskID="_default" NavUriFragment="fileToken=%s"> <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> + <FileType ContentType="application/sdk">.pdf</FileType> + <FileType ContentType="application/sdk">.mkv</FileType> + <FileType ContentType="application/sdk">.avi</FileType> + <FileType ContentType="application/sdk">.txt</FileType> + <FileType ContentType="application/sdk">.mkv</FileType> + <FileType ContentType="application/sdk">.svg</FileType> + <FileType ContentType="application/sdk">.rar</FileType> + <FileType ContentType="application/sdk">.csv</FileType> + <FileType ContentType="application/sdk">.bmp</FileType> + <FileType ContentType="application/sdk">.jpeg</FileType> + <FileType ContentType="application/sdk">.tiff</FileType> + <FileType ContentType="application/sdk">.7z</FileType> </SupportedFileTypes> </FileTypeAssociation> - <Protocol Name="f360" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" /> </Extensions> <ScreenResolutions> <ScreenResolution Name="ID_RESOLUTION_WVGA" /> diff --git a/File360/Resources/Assets/ApplicationIcon.png b/File360/Resources/Assets/ApplicationIcon.png Binary files differ. diff --git a/File360/Resources/Assets/BadgeLogo.png b/File360/Resources/Assets/BadgeLogo.png Binary files differ. diff --git a/File360/Resources/Assets/FILE360M.png b/File360/Resources/Assets/FILE360M.png Binary files differ. diff --git a/File360/Resources/Assets/Hamburger.png b/File360/Resources/Assets/Hamburger.png Binary files differ. diff --git a/File360/Resources/Assets/Hamburger_alpha.png b/File360/Resources/Assets/Hamburger_alpha.png Binary files differ. diff --git a/File360/Resources/Assets/Logo.png b/File360/Resources/Assets/Logo.png Binary files differ. diff --git a/File360/Resources/Assets/SplashScreen.png b/File360/Resources/Assets/SplashScreen.png Binary files differ. diff --git a/File360/Resources/Assets/SquareTile150x150.png b/File360/Resources/Assets/SquareTile150x150.png Binary files differ. diff --git a/File360/Resources/Assets/SquareTile71x71.png b/File360/Resources/Assets/SquareTile71x71.png Binary files differ. diff --git a/File360/Resources/Assets/StoreLogo.png b/File360/Resources/Assets/StoreLogo.png Binary files differ. diff --git a/File360/Resources/Assets/WideLogo.png b/File360/Resources/Assets/WideLogo.png Binary files differ. diff --git a/File360/Resources/Assets/add.png b/File360/Resources/Assets/add.png Binary files differ. diff --git a/File360/Resources/Assets/addressHelper.png b/File360/Resources/Assets/addressHelper.png Binary files differ. diff --git a/File360/Resources/Assets/audio.png b/File360/Resources/Assets/audio.png Binary files differ. diff --git a/File360/Resources/Assets/back.png b/File360/Resources/Assets/back.png Binary files differ. diff --git a/File360/Resources/Assets/camp-day-2015-equalizer.gif b/File360/Resources/Assets/camp-day-2015-equalizer.gif Binary files differ. diff --git a/File360/Resources/Assets/check33.png b/File360/Resources/Assets/check33.png Binary files differ. diff --git a/File360/Resources/Assets/compression1.png b/File360/Resources/Assets/compression1.png Binary files differ. diff --git a/File360/Resources/Assets/copy25.png b/File360/Resources/Assets/copy25.png Binary files differ. diff --git a/File360/Resources/Assets/coverArt.png b/File360/Resources/Assets/coverArt.png Binary files differ. diff --git a/File360/Resources/Assets/cover_art.jpg b/File360/Resources/Assets/cover_art.jpg Binary files differ. diff --git a/File360/Resources/Assets/cover_art.png b/File360/Resources/Assets/cover_art.png Binary files differ. diff --git a/File360/Resources/Assets/cut1.png b/File360/Resources/Assets/cut1.png Binary files differ. diff --git a/File360/Resources/Assets/documents.png b/File360/Resources/Assets/documents.png Binary files differ. diff --git a/File360/Resources/Assets/down.png b/File360/Resources/Assets/down.png Binary files differ. diff --git a/File360/Resources/Assets/download.png b/File360/Resources/Assets/download.png Binary files differ. diff --git a/File360/Resources/Assets/edit45.png b/File360/Resources/Assets/edit45.png Binary files differ. diff --git a/File360/Resources/Assets/file360_header.png b/File360/Resources/Assets/file360_header.png Binary files differ. diff --git a/File360/Resources/Assets/flatIcon.PNG b/File360/Resources/Assets/flatIcon.PNG Binary files differ. diff --git a/File360/Resources/Assets/grd_back.png b/File360/Resources/Assets/grd_back.png Binary files differ. diff --git a/File360/Resources/Assets/greySearch.png b/File360/Resources/Assets/greySearch.png Binary files differ. diff --git a/File360/Resources/Assets/hiddenFolder.png b/File360/Resources/Assets/hiddenFolder.png Binary files differ. diff --git a/File360/Resources/Assets/home.png b/File360/Resources/Assets/home.png Binary files differ. diff --git a/File360/Resources/Assets/list.png b/File360/Resources/Assets/list.png Binary files differ. diff --git a/File360/Resources/Assets/mute.png b/File360/Resources/Assets/mute.png Binary files differ. diff --git a/File360/Resources/Assets/onedrive.png b/File360/Resources/Assets/onedrive.png Binary files differ. diff --git a/File360/Resources/Assets/pause.png b/File360/Resources/Assets/pause.png Binary files differ. diff --git a/File360/Resources/Assets/pdf.png b/File360/Resources/Assets/pdf.png Binary files differ. diff --git a/File360/Resources/Assets/phone.png b/File360/Resources/Assets/phone.png Binary files differ. diff --git a/File360/Resources/Assets/play.png b/File360/Resources/Assets/play.png Binary files differ. diff --git a/File360/Resources/Assets/popup_alpha.png b/File360/Resources/Assets/popup_alpha.png Binary files differ. diff --git a/File360/Resources/Assets/rubbish7.png b/File360/Resources/Assets/rubbish7.png Binary files differ. diff --git a/File360/Resources/Assets/sdcard.png b/File360/Resources/Assets/sdcard.png Binary files differ. diff --git a/File360/Resources/Assets/settings.png b/File360/Resources/Assets/settings.png Binary files differ. diff --git a/File360/Resources/Assets/settings_dark.png b/File360/Resources/Assets/settings_dark.png Binary files differ. diff --git a/File360/Resources/Assets/share.png b/File360/Resources/Assets/share.png Binary files differ. diff --git a/File360/Resources/Assets/slider_alpha.png b/File360/Resources/Assets/slider_alpha.png Binary files differ. diff --git a/File360/Resources/Assets/sort27.png b/File360/Resources/Assets/sort27.png Binary files differ. diff --git a/File360/Resources/Assets/transport.ff.png b/File360/Resources/Assets/transport.ff.png Binary files differ. diff --git a/File360/Resources/Assets/transport.pause.png b/File360/Resources/Assets/transport.pause.png Binary files differ. diff --git a/File360/Resources/Assets/transport.play.png b/File360/Resources/Assets/transport.play.png Binary files differ. diff --git a/File360/Resources/Assets/transport.rew.png b/File360/Resources/Assets/transport.rew.png Binary files differ. diff --git a/File360/Resources/Assets/transport.stop.png b/File360/Resources/Assets/transport.stop.png Binary files differ. diff --git a/File360/Resources/Assets/video.png b/File360/Resources/Assets/video.png Binary files differ. diff --git a/File360/Resources/Assets/video_cover.png b/File360/Resources/Assets/video_cover.png Binary files differ. diff --git a/File360/Resources/Assets/whiteSearch.png b/File360/Resources/Assets/whiteSearch.png Binary files differ. diff --git a/File360/Resources/Assets/write38.png b/File360/Resources/Assets/write38.png Binary files differ. diff --git a/File360/Resources/Fonts/LiveSymbol.ttf b/File360/Resources/Fonts/LiveSymbol.ttf Binary files differ. diff --git a/File360/Resources/Fonts/UI/UIFont.ttf b/File360/Resources/Fonts/UI/UIFont.ttf Binary files differ. diff --git a/File360/sdlist.cs b/File360/sdlist.cs @@ -132,9 +132,6 @@ namespace File360 else IsVisible = true; } -string Name; -string Image; - public sdlist(string name, string image, string count) { this.Name = name; diff --git a/File360/settinglist.cs b/File360/settinglist.cs @@ -1,5 +1,4 @@ using System.Text; -using Microsoft.Phone.Storage; namespace File360 {