Skip to content

Commit 85b350d

Browse files
committed
First Phase of the New UI
1 parent c1b3257 commit 85b350d

File tree

12 files changed

+1583
-419
lines changed

12 files changed

+1583
-419
lines changed

Files UWP/App.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<ResourceDictionary>
88
<ResourceDictionary.MergedDictionaries>
9-
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
9+
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
1010
<ResourceDictionary>
1111
<ResourceDictionary.ThemeDictionaries>
1212
<ResourceDictionary x:Key="Default">

Files UWP/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
9797
// When the navigation stack isn't restored navigate to the first page,
9898
// configuring the new page by passing required information as a navigation
9999
// parameter
100-
rootFrame.Navigate(typeof(MainPage), e.Arguments);
100+
rootFrame.Navigate(typeof(ProHome), e.Arguments);
101101

102102

103103
}

Files UWP/FilesUWP.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<AssemblyName>Files</AssemblyName>
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14-
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18342.0</TargetPlatformVersion>
14+
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
1515
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<FileAlignment>512</FileAlignment>
@@ -255,7 +255,7 @@
255255
<None Include="Files_TemporaryKey.pfx" />
256256
</ItemGroup>
257257
<ItemGroup>
258-
<SDKReference Include="WindowsDesktop, Version=10.0.18342.0">
258+
<SDKReference Include="WindowsDesktop, Version=10.0.17763.0">
259259
<Name>Windows Desktop Extensions for the UWP</Name>
260260
</SDKReference>
261261
</ItemGroup>

Files UWP/Filesystem/ItemViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void CancelLoadAndClearFiles()
8888

8989
public static async void DisplayConsentDialog()
9090
{
91-
await MainPage.permissionBox.ShowAsync();
91+
await ProHome.permissionBox.ShowAsync();
9292
}
9393

9494
public async void AddItemsToCollectionAsync(string path, Page currentPage)

Files UWP/GenericFileBrowser.xaml

Lines changed: 108 additions & 220 deletions
Large diffs are not rendered by default.

Files UWP/GenericFileBrowser.xaml.cs

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,29 @@ public GenericFileBrowser()
6060
CutItem.Click += Interaction.CutItem_Click;
6161
CopyItem.Click += Interaction.CopyItem_ClickAsync;
6262
AllView.RightTapped += Interaction.AllView_RightTapped;
63-
Back.Click += NavigationActions.Back_Click;
64-
Forward.Click += NavigationActions.Forward_Click;
65-
Refresh.Click += NavigationActions.Refresh_Click;
66-
AddItem.Click += AddItem_ClickAsync;
63+
//Back.Click += NavigationActions.Back_Click;
64+
//Forward.Click += NavigationActions.Forward_Click;
65+
//Refresh.Click += NavigationActions.Refresh_Click;
66+
//AddItem.Click += AddItem_ClickAsync;
6767
AllView.DoubleTapped += Interaction.List_ItemClick;
68-
Clipboard.ContentChanged += Clipboard_ContentChanged;
69-
AddItemBox = AddDialog;
70-
NameBox = NameDialog;
71-
inputFromRename = RenameInput;
68+
//Clipboard.ContentChanged += Clipboard_ContentChanged;
69+
//AddItemBox = AddDialog;
70+
//NameBox = NameDialog;
71+
//inputFromRename = RenameInput;
7272
emptySpaceContext = EmptySpaceFlyout;
7373
RefreshEmptySpace.Click += NavigationActions.Refresh_Click;
7474
PasteEmptySpace.Click += Interaction.PasteItem_ClickAsync;
75-
CopiedFlyout = CopiedPathFlyout;
75+
//CopiedFlyout = CopiedPathFlyout;
7676
grid = RootGrid;
77-
GetPath.Click += Interaction.GetPath_Click;
78-
PathBarTip.IsOpen = true;
77+
//GetPath.Click += Interaction.GetPath_Click;
78+
//PathBarTip.IsOpen = true;
7979
}
8080

8181

8282

8383
private async void AddItem_ClickAsync(object sender, RoutedEventArgs e)
8484
{
85-
await AddDialog.ShowAsync();
85+
//await AddDialog.ShowAsync();
8686
}
8787

8888
private void Clipboard_ContentChanged(object sender, object e)
@@ -118,112 +118,112 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
118118
if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)))
119119
{
120120
App.PathText.Text = "Desktop";
121-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
122-
{
123-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DesktopIC")
124-
{
125-
MainPage.Select.itemSelected = NavItemChoice;
126-
break;
127-
}
128-
}
121+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
122+
//{
123+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DesktopIC")
124+
// {
125+
// MainPage.Select.itemSelected = NavItemChoice;
126+
// break;
127+
// }
128+
//}
129129
}
130130
else if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)))
131131
{
132132
App.PathText.Text = "Documents";
133-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
134-
{
135-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DocumentsIC")
136-
{
137-
MainPage.Select.itemSelected = NavItemChoice;
138-
break;
139-
}
140-
}
133+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
134+
//{
135+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DocumentsIC")
136+
// {
137+
// MainPage.Select.itemSelected = NavItemChoice;
138+
// break;
139+
// }
140+
//}
141141
}
142142
else if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Downloads"))
143143
{
144144
App.PathText.Text = "Downloads";
145-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
146-
{
147-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DownloadsIC")
148-
{
149-
MainPage.Select.itemSelected = NavItemChoice;
150-
break;
151-
}
152-
}
145+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
146+
//{
147+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DownloadsIC")
148+
// {
149+
// MainPage.Select.itemSelected = NavItemChoice;
150+
// break;
151+
// }
152+
//}
153153
}
154154
else if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)))
155155
{
156156
App.PathText.Text = "Pictures";
157-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
158-
{
159-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "PicturesIC")
160-
{
161-
MainPage.Select.itemSelected = NavItemChoice;
162-
break;
163-
}
164-
}
157+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
158+
//{
159+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "PicturesIC")
160+
// {
161+
// MainPage.Select.itemSelected = NavItemChoice;
162+
// break;
163+
// }
164+
//}
165165
}
166166
else if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)))
167167
{
168168
App.PathText.Text = "Music";
169-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
170-
{
171-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "MusicIC")
172-
{
173-
MainPage.Select.itemSelected = NavItemChoice;
174-
break;
175-
}
176-
}
169+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
170+
//{
171+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "MusicIC")
172+
// {
173+
// MainPage.Select.itemSelected = NavItemChoice;
174+
// break;
175+
// }
176+
//}
177177
}
178178
else if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\OneDrive"))
179179
{
180180
App.PathText.Text = "OneDrive";
181-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
182-
{
183-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "OneD_IC")
184-
{
185-
MainPage.Select.itemSelected = NavItemChoice;
186-
break;
187-
}
188-
}
181+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
182+
//{
183+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "OneD_IC")
184+
// {
185+
// MainPage.Select.itemSelected = NavItemChoice;
186+
// break;
187+
// }
188+
//}
189189
}
190190
else if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos)))
191191
{
192192
App.PathText.Text = "Videos";
193-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
194-
{
195-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "VideosIC")
196-
{
197-
MainPage.Select.itemSelected = NavItemChoice;
198-
break;
199-
}
200-
}
193+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
194+
//{
195+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "VideosIC")
196+
// {
197+
// MainPage.Select.itemSelected = NavItemChoice;
198+
// break;
199+
// }
200+
//}
201201
}
202202
else
203203
{
204204
//App.ViewModel.Universal.path = parameters;
205205
App.PathText.Text = parameters;
206206
if (parameters.Contains("C:\\") || parameters.Contains("c:\\"))
207207
{
208-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
209-
{
210-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString() == "LDPage")
211-
{
212-
MainPage.Select.itemSelected = NavItemChoice;
213-
break;
214-
}
215-
}
208+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
209+
//{
210+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString() == "LDPage")
211+
// {
212+
// MainPage.Select.itemSelected = NavItemChoice;
213+
// break;
214+
// }
215+
//}
216216
}
217217
else
218218
{
219-
foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
220-
{
221-
if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString().Contains(parameters.Split("\\")[0]))
222-
{
223-
MainPage.Select.itemSelected = NavItemChoice;
224-
break;
225-
}
226-
}
219+
//foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
220+
//{
221+
// if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString().Contains(parameters.Split("\\")[0]))
222+
// {
223+
// MainPage.Select.itemSelected = NavItemChoice;
224+
// break;
225+
// }
226+
//}
227227
}
228228
}
229229

@@ -296,7 +296,7 @@ private async void AllView_CellEditEnded(object sender, DataGridCellEditEndedEve
296296

297297
private void ContentDialog_Loaded(object sender, RoutedEventArgs e)
298298
{
299-
AddDialogFrame.Navigate(typeof(AddItem), new SuppressNavigationTransitionInfo());
299+
//AddDialogFrame.Navigate(typeof(AddItem), new SuppressNavigationTransitionInfo());
300300
}
301301

302302
private void GenericItemView_PointerReleased(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)

0 commit comments

Comments
 (0)