Fixed the start page

This commit is contained in:
Thorsten Sommer 2022-08-13 18:07:14 +02:00
parent cbbfcf6abe
commit cd3492d53b
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 2 additions and 33 deletions

View File

@ -1,7 +0,0 @@
@page "/"
<h1>Hello, world!</h1>
<button class="btn btn-primary" @onclick="this.OpenFile">Open a project</button>
<button class="btn btn-primary" @onclick="this.System">System</button>
<div>@label</div>

View File

@ -1,25 +0,0 @@
namespace UI_MAUI.Pages;
public partial class Index
{
private static string label = "test";
private async Task OpenFile()
{
// Show the open file dialog:
var result = await FilePicker.PickAsync(new PickOptions
{
PickerTitle = "Open a project",
});
label = result?.FullPath;
}
private void System()
{
var info = new FileInfo(label);
var result = Directory.EnumerateDirectories(info.DirectoryName, "*");
var num = result.Count();
label = $"{num} files found.";
}
}

View File

@ -1,4 +1,5 @@
@page "/load"
@page "/"
@page "/load"
<h1>Load a Project</h1>