Fixed the start page
This commit is contained in:
3 files changed
+2
-33
No files matched your search
@@ -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>
|
<h1>Load a Project</h1>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user