25 lines
609 B
C#
25 lines
609 B
C#
|
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.";
|
|||
|
}
|
|||
|
}
|