private void View_MyDownloads(object sender, RoutedEventArgs e)
 {
     pnlItems.ItemsSource = null;
     pnlItems.ItemsSource = DataManeger.Downloads();
     currentpath          = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");
     backHistory.Push(new Histrory(currentpath, false));
 }
        private void OpenFolder(object sender, RoutedEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == true)
            {
                pnlItems.ItemsSource = DataManeger.GetItems(System.IO.Path.GetDirectoryName(ofd.FileName));
            }
        }
        private void Open(object sender, MouseButtonEventArgs e)
        {
            if (pnlItems.SelectedItems.Count == 1)
            {
                FileInformation info = pnlItems.SelectedItems[0] as FileInformation;
                currentpath = info.FullPath;


                if (info.IsFolder)
                {
                    pnlItems.ItemsSource = DataManeger.GetItems(info.FullPath);
                    backHistory.Push(new Histrory(info.FullPath, false));
                    if (backHistory.Count > 1)
                    {
                        back_btn.Foreground = new SolidColorBrush(Colors.White);
                    }
                }
                else if (info.IsComputer)
                {
                    pnlItems.ItemsSource = DataManeger.GetDrives();
                    backHistory.Push(new Histrory(info.FullPath, true));
                    if (backHistory.Count > 1)
                    {
                        back_btn.Foreground = new SolidColorBrush(Colors.White);
                    }
                }
                else
                {
                    {
                        try
                        {
                            System.Diagnostics.Process.Start(info.FullPath);
                        }
                        catch
                        {
                            MessageBox.Show("It Can't Load The File");
                        }
                    }
                }
            }
            pnlItems.Items.Refresh();
            Option.Visibility = Visibility.Visible;
            GetData();
            sortCombBox.SelectedIndex = -1;
            sortCombBox.Text          = "Sort By.....";
        }
 private void back_btn_Clicked(object sender, RoutedEventArgs e)
 {
     if (backHistory.Count > 1)
     {
         backHistory.Pop();
         if (!backHistory.Peek().isDrive)
         {
             pnlItems.ItemsSource = DataManeger.GetItems(backHistory.Peek().path);
         }
         else
         {
             pnlItems.ItemsSource = DataManeger.GetDrives();
         }
         if (backHistory.Count == 1)
         {
             back_btn.Foreground = new SolidColorBrush(Colors.Gray);
         }
     }
     GetData();
 }
 private void View_MyComputer(object sender, RoutedEventArgs e)
 {
     pnlItems.ItemsSource = DataManeger.GetDrives();
     backHistory.Push(new Histrory("Drives", true));
 }