-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from duke7553/testing
Incorporate changes from Testing
- Loading branch information
Showing
17 changed files
with
1,113 additions
and
713 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<ContentDialog | ||
x:Class="Files.Dialogs.ExtractFilesDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Files.Dialogs" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
CornerRadius="4" | ||
Title="Extract Compressed Archive" | ||
PrimaryButtonText="Extract" | ||
CloseButtonText="Cancel" | ||
DefaultButton="Primary" | ||
PrimaryButtonClick="ContentDialog_PrimaryButtonClick" | ||
CloseButtonClick="ContentDialog_CloseButtonClick"> | ||
|
||
<Grid MinWidth="375"> | ||
<StackPanel Orientation="Vertical"> | ||
<TextBlock TextWrapping="WrapWholeWords" Text="Pick a location to extract this compressed archive to. You'll need to stay in the current folder until we're done. A new tab will open up with the extracted items."/> | ||
<Grid ColumnSpacing="5" Margin="0,14,0,0" > | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="75*"/> | ||
<ColumnDefinition Width="25*"/> | ||
</Grid.ColumnDefinitions> | ||
<TextBox x:Name="DestPathText" Grid.Column="0"/> | ||
<Button x:Name="BrowseButton" Grid.Column="1" Content="Browse" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Click="BrowseButton_Click"/> | ||
</Grid> | ||
</StackPanel> | ||
</Grid> | ||
</ContentDialog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace Files.Dialogs | ||
{ | ||
public sealed partial class ExtractFilesDialog : ContentDialog | ||
{ | ||
public ExtractFilesDialog(string currentDirectory) | ||
{ | ||
this.InitializeComponent(); | ||
DestPathText.Text = currentDirectory; | ||
Windows.Storage.ApplicationData.Current.LocalSettings.Values["Extract_Destination_Path"] = currentDirectory; | ||
} | ||
|
||
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) | ||
{ | ||
Windows.Storage.ApplicationData.Current.LocalSettings.Values["Extract_Destination_Cancelled"] = false; | ||
} | ||
|
||
|
||
|
||
private async void BrowseButton_Click(object sender, RoutedEventArgs e) | ||
{ | ||
Windows.Storage.Pickers.FolderPicker folderPicker = new Windows.Storage.Pickers.FolderPicker(); | ||
folderPicker.CommitButtonText = "Select Folder"; | ||
folderPicker.FileTypeFilter.Add("*"); | ||
var selectedFolder = await folderPicker.PickSingleFolderAsync(); | ||
if(selectedFolder != null) | ||
{ | ||
DestPathText.Text = selectedFolder.Path; | ||
Windows.Storage.ApplicationData.Current.LocalSettings.Values["Extract_Destination_Path"] = selectedFolder.Path; | ||
} | ||
} | ||
|
||
private void ContentDialog_CloseButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) | ||
{ | ||
Windows.Storage.ApplicationData.Current.LocalSettings.Values["Extract_Destination_Cancelled"] = true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Files.Filesystem | ||
{ | ||
public class SidebarItem | ||
{ | ||
public string IconGlyph { get; set; } | ||
|
||
public string Text { get; set; } | ||
|
||
public bool isDefaultLocation { get; set; } = false; | ||
|
||
public string Path { get; set; } = null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.