Skip to content

Commit 5f1d78a

Browse files
Luke BlevinsLuke Blevins
authored andcommitted
Started work on custom library locations in Settings and Copy/Paste for Directories
1 parent 09f6502 commit 5f1d78a

File tree

6 files changed

+110
-10
lines changed

6 files changed

+110
-10
lines changed

Files.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@
126126
<Compile Include="SettingsPages\Personalization.xaml.cs">
127127
<DependentUpon>Personalization.xaml</DependentUpon>
128128
</Compile>
129+
<Compile Include="SettingsPages\Preferences.xaml.cs">
130+
<DependentUpon>Preferences.xaml</DependentUpon>
131+
</Compile>
129132
<Compile Include="YourHome.xaml.cs">
130133
<DependentUpon>YourHome.xaml</DependentUpon>
131134
</Compile>
@@ -224,6 +227,10 @@
224227
<SubType>Designer</SubType>
225228
<Generator>MSBuild:Compile</Generator>
226229
</Page>
230+
<Page Include="SettingsPages\Preferences.xaml">
231+
<SubType>Designer</SubType>
232+
<Generator>MSBuild:Compile</Generator>
233+
</Page>
227234
<Page Include="YourHome.xaml">
228235
<SubType>Designer</SubType>
229236
<Generator>MSBuild:Compile</Generator>

ItemInteractions.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,14 @@ public static async void PasteItem_ClickAsync(object sender, RoutedEventArgs e)
269269

270270
if (item.IsOfType(StorageItemTypes.Folder))
271271
{
272-
CloneDirectory(item.Path, DestinationPath);
273-
272+
//CloneDirectory(item.Path, DestinationPath);
273+
StorageFolder ClipboardFolder = await StorageFolder.GetFolderFromPathAsync(item.Path);
274+
//await ClipboardFolder.
274275
}
275276
else if (item.IsOfType(StorageItemTypes.File))
276277
{
277-
StorageFile DestinationFile = await StorageFile.GetFileFromPathAsync(item.Path);
278-
await DestinationFile.CopyAsync(await StorageFolder.GetFolderFromPathAsync(DestinationPath));
278+
StorageFile ClipboardFile = await StorageFile.GetFileFromPathAsync(item.Path);
279+
await ClipboardFile.CopyAsync(await StorageFolder.GetFolderFromPathAsync(DestinationPath));
279280
}
280281

281282
}

Settings.xaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,23 @@
2727

2828
<SplitView IsPaneOpen="True" PaneBackground="{ThemeResource SystemControlAcrylicWindowBrush}" DisplayMode="Inline">
2929
<SplitView.Pane>
30-
<StackPanel Orientation="Vertical">
30+
<ListView Name="SecondaryPane" ItemClick="ListView_ItemClick" IsItemClickEnabled="True" SelectionChanged="ListView_SelectionChanged" SelectedIndex="0">
3131
<NavigationViewItemSeparator/>
3232
<NavigationViewItemSeparator/>
3333
<NavigationViewItemSeparator/>
3434
<NavigationViewItemSeparator/>
3535
<NavigationViewItemSeparator/>
36-
<NavigationViewItemHeader Margin="0, -4, 0, 0" Content="Settings"/>
37-
<NavigationViewItem Content="Personalization" />
38-
<NavigationViewItem Content="Features"/>
39-
<NavigationViewItem Content="About"/>
40-
</StackPanel>
36+
<NavigationViewItemHeader Margin="10, -4, 0, 0" Content="Settings"/>
37+
<ListViewItem x:Name="Personalization">
38+
<NavigationViewItem Content="Personalization" />
39+
</ListViewItem>
40+
<ListViewItem x:Name="Preferences">
41+
<NavigationViewItem Content="Preferences" />
42+
</ListViewItem>
43+
<ListViewItem x:Name="About">
44+
<NavigationViewItem Content="About" />
45+
</ListViewItem>
46+
</ListView>
4147

4248
</SplitView.Pane>
4349
<Frame Name="SettingsContentFrame" HorizontalAlignment="Stretch">

Settings.xaml.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public sealed partial class Settings : Page
4040
public Settings()
4141
{
4242
this.InitializeComponent();
43+
SecondaryPane.SelectedIndex = 0;
4344
SettingsContentFrame.Navigate(typeof(Personalization));
4445
}
4546

@@ -57,5 +58,18 @@ private void NavigationView_SelectionChanged(NavigationView sender, NavigationVi
5758

5859
}
5960
}
61+
62+
private void ListView_ItemClick(object sender, ItemClickEventArgs e)
63+
{
64+
65+
}
66+
67+
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
68+
{
69+
foreach(ListViewItem lvi in SecondaryPane.Items)
70+
{
71+
72+
}
73+
}
6074
}
6175
}

SettingsPages/Preferences.xaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<Page
2+
x:Class="Files.SettingsPages.Preferences"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:Files.SettingsPages"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
mc:Ignorable="d"
9+
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
10+
11+
<Grid Padding="50,150,50,0">
12+
<StackPanel>
13+
<TextBlock x:Name="Header" Text="Preferences" Margin="0,0,0,25" FontFamily="Segoe UI Black" FontWeight="Bold" FontSize="48" HorizontalAlignment="Left" VerticalAlignment="Top" />
14+
<Grid Name="CustomLibraries">
15+
<StackPanel Orientation="Vertical">
16+
<TextBlock Text="Custom Library Locations"/>
17+
<ToggleSwitch VerticalAlignment="Top"/>
18+
<Grid Margin="0, 0, 0, 12.5">
19+
<TextBlock Text="Downloads" VerticalAlignment="Center" Margin="0,0,25,0"/>
20+
<TextBox BorderThickness="1" PlaceholderText="Custom Downloads Location" HorizontalAlignment="Left" Width="500" Margin="125,0,0,0"/>
21+
</Grid>
22+
<Grid Margin="0, 0, 0, 12.5">
23+
<TextBlock Text="Documents" VerticalAlignment="Center" Margin="0,0,25,0"/>
24+
<TextBox BorderThickness="1" PlaceholderText="Custom Documents Location" HorizontalAlignment="Left" Width="500" Margin="125,0,0,0"/>
25+
</Grid>
26+
<Grid Margin="0, 0, 0, 12.5">
27+
<TextBlock Text="Pictures" VerticalAlignment="Center" Margin="0,0,25,0"/>
28+
<TextBox BorderThickness="1" PlaceholderText="Custom Pictures Location" HorizontalAlignment="Left" Width="500" Margin="125,0,0,0"/>
29+
</Grid>
30+
<Grid Margin="0, 0, 0, 12.5">
31+
<TextBlock Text="Music" VerticalAlignment="Center" Margin="0,0,25,0"/>
32+
<TextBox BorderThickness="1" PlaceholderText="Custom Music Location" HorizontalAlignment="Left" Width="500" Margin="125,0,0,0"/>
33+
</Grid>
34+
<Grid Margin="0, 0, 0, 12.5">
35+
<TextBlock Text="Videos" VerticalAlignment="Center" Margin="0,0,25,0"/>
36+
<TextBox BorderThickness="1" PlaceholderText="Custom Videos Location" HorizontalAlignment="Left" Width="500" Margin="125,0,0,0"/>
37+
</Grid>
38+
</StackPanel>
39+
</Grid>
40+
</StackPanel>
41+
</Grid>
42+
</Page>

SettingsPages/Preferences.xaml.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.Foundation;
7+
using Windows.Foundation.Collections;
8+
using Windows.UI.Xaml;
9+
using Windows.UI.Xaml.Controls;
10+
using Windows.UI.Xaml.Controls.Primitives;
11+
using Windows.UI.Xaml.Data;
12+
using Windows.UI.Xaml.Input;
13+
using Windows.UI.Xaml.Media;
14+
using Windows.UI.Xaml.Navigation;
15+
16+
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
17+
18+
namespace Files.SettingsPages
19+
{
20+
/// <summary>
21+
/// An empty page that can be used on its own or navigated to within a Frame.
22+
/// </summary>
23+
public sealed partial class Preferences : Page
24+
{
25+
public Preferences()
26+
{
27+
this.InitializeComponent();
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)