From bff0928b7ccd6cadd2c127983eb0cdf3de792685 Mon Sep 17 00:00:00 2001 From: WeeXnes Date: Thu, 13 Jun 2024 11:45:35 +0200 Subject: [PATCH] file editor changes --- .../TextEditorView.xaml.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/WeeXnes/Views/EncryptedTextEditor/TextEditorView.xaml.cs b/WeeXnes/Views/EncryptedTextEditor/TextEditorView.xaml.cs index 1493db2..ed57ec7 100644 --- a/WeeXnes/Views/EncryptedTextEditor/TextEditorView.xaml.cs +++ b/WeeXnes/Views/EncryptedTextEditor/TextEditorView.xaml.cs @@ -1,5 +1,8 @@ -using System.Windows; +using System; +using System.IO; +using System.Windows; using System.Windows.Controls; +using System.Windows.Forms; namespace WeeXnes.Views.EncryptedTextEditor; @@ -12,7 +15,20 @@ public partial class TextEditorView : Page private void Btn_openFile_OnClick(object sender, RoutedEventArgs e) { - throw new System.NotImplementedException(); + var fileContent = string.Empty; + var filePath = string.Empty; + + using (OpenFileDialog openFileDialog = new OpenFileDialog()) + { + openFileDialog.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory; + openFileDialog.Filter = "WXN Text Files (*.wtf)|*.wtf"; + openFileDialog.RestoreDirectory = true; + + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + + } + } } private void Btn_saveFile_OnClick(object sender, RoutedEventArgs e)