Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
remove more win32 file stuff and fix ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tunip3 committed Oct 25, 2021
1 parent a4c11c7 commit fc2599b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 3 additions & 0 deletions UniversalFtpServer/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Windows.ApplicationModel.Core;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.System;
using Windows.UI;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
Expand All @@ -25,6 +26,7 @@ namespace UniversalFtpServer
/// </summary>
sealed partial class App : Application
{
public static User user = null;
/// <summary>
/// 初始化单一实例应用程序对象。这是执行的创作代码的第一行,
/// 已执行,逻辑上等同于 main() 或 WinMain()。
Expand All @@ -44,6 +46,7 @@ public App()
/// <param name="e">有关启动请求和过程的详细信息。</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
user = e.User;
Frame rootFrame = Window.Current.Content as Frame;

// 不要在窗口已包含内容时重复应用程序初始化,
Expand Down
2 changes: 1 addition & 1 deletion UniversalFtpServer/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock x:Uid="MainPage_TitleBlock" Margin="12,12,812,12"
<TextBlock x:Uid="MainPage_TitleBlock" Margin="12,12,706,12"
Style="{StaticResource TitleTextBlockStyle}" Text="Durango FTP" />
<ScrollViewer Grid.Row="1">
<RelativePanel x:Name="rootPanel" Margin="6">
Expand Down
10 changes: 2 additions & 8 deletions UniversalFtpServer/UwpFileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,8 @@ private string GetLocalVfsPath(string path)
{
//split the path into each folder
string[] localpath = toFullPath.Split("\\");
//get the parent of the apps local appdata folder
var Localfoldertask = ApplicationData.Current.LocalFolder.GetParentAsync();
Localfoldertask.AsTask().Wait();
//get the parent of that folder
Localfoldertask = Localfoldertask.GetResults().GetParentAsync();
Localfoldertask.AsTask().Wait();
//get the path value of that folder as a string and set the base directory of the input path to be the local app data folder
localpath[0] = Localfoldertask.GetResults().Path;
//get local state folder
localpath[0] = UserDataPaths.GetForUser(App.user).LocalAppData + "\\Packages";
//rejoin the parts of the path together
toFullPath = String.Join("\\", localpath);
}
Expand Down

0 comments on commit fc2599b

Please sign in to comment.