Changed to MAUI Blazor

This commit is contained in:
tsommer committed 2022-08-08 21:18:39 +02:00
1 parent 0a821a7955
commit b45f7a6424
26 files changed
+246 -255

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
@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>
@@ -0,0 +1,25 @@
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,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="UI_MAUI.Pages.LoadProjectPage"
>
<ContentPage.Content>
<Label>Load Project</Label>
</ContentPage.Content>
</ContentPage>
@@ -1,9 +0,0 @@
namespace UI_MAUI.Pages;
public partial class LoadProjectPage : ContentPage
{
public LoadProjectPage()
{
this.InitializeComponent();
}
}
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="UI_MAUI.Pages.SettingsPage">
<ContentPage.Content>
<Label>Settings</Label>
</ContentPage.Content>
</ContentPage>
@@ -1,9 +0,0 @@
namespace UI_MAUI.Pages;
public partial class SettingsPage : ContentPage
{
public SettingsPage()
{
this.InitializeComponent();
}
}
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="UI_MAUI.Pages.TranslationPage">
<ContentPage.Content>
<Label>Translation</Label>
</ContentPage.Content>
</ContentPage>
@@ -1,9 +0,0 @@
namespace UI_MAUI.Pages;
public partial class TranslationPage : ContentPage
{
public TranslationPage()
{
this.InitializeComponent();
}
}