mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-13 19:43:24 +08:00
29 lines
677 B
C#
29 lines
677 B
C#
using BetterGenshinImpact.ViewModel.Windows;
|
|
using System.Windows;
|
|
using Wpf.Ui.Controls;
|
|
|
|
namespace BetterGenshinImpact.View.Windows;
|
|
|
|
public partial class JsonMonoDialog : FluentWindow
|
|
{
|
|
public JsonMonoViewModel ViewModel { get; }
|
|
|
|
public JsonMonoDialog(string path)
|
|
{
|
|
DataContext = ViewModel = new(path);
|
|
InitializeComponent();
|
|
|
|
// Manual MVVM binding
|
|
JsonCodeBox.TextChanged += (_, _) => ViewModel.JsonText = JsonCodeBox.Text;
|
|
}
|
|
|
|
public static void Show(string path)
|
|
{
|
|
JsonMonoDialog dialog = new(path)
|
|
{
|
|
Owner = Application.Current.MainWindow
|
|
};
|
|
dialog.Show();
|
|
}
|
|
}
|