Fixed the start page

This commit is contained in:
tsommer committed 2022-08-13 18:07:14 +02:00
1 parent cbbfcf6abe
commit cd3492d53b
3 files changed
+2 -33

No files matched your search

-7
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>
@@ -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.";
}
}
@@ -1,4 +1,5 @@
@page "/load"
@page "/"
@page "/load"
<h1>Load a Project</h1>