34 lines
754 B
C#
34 lines
754 B
C#
using System.Diagnostics;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Input;
|
|
using Avalonia.Markup.Xaml;
|
|
|
|
namespace DispenserUI.Views.Windows;
|
|
|
|
public partial class CameraViewerNotifyWindow : ToastWindow
|
|
{
|
|
private string _title;
|
|
|
|
private string _path;
|
|
|
|
public CameraViewerNotifyWindow(string title, string path)
|
|
{
|
|
_title = title;
|
|
_path = path;
|
|
InitializeComponent();
|
|
|
|
TitleText = this.FindControl<TextBlock>("TitleText");
|
|
TitleText!.Text = _title;
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
|
|
private void OpenBrowser(object? sender, TappedEventArgs e)
|
|
{
|
|
// 打开文件目录
|
|
Process.Start("explorer.exe", _path);
|
|
}
|
|
} |