file editor fix
This commit is contained in:
parent
55c753dead
commit
111c511ac9
3 changed files with 24 additions and 11 deletions
|
@ -8,7 +8,7 @@ namespace WeeXnes.Core
|
|||
{
|
||||
public class Information
|
||||
{
|
||||
public const string Version = "4.5.2";
|
||||
public const string Version = "4.5.2.1";
|
||||
public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
|
||||
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
|
||||
}
|
||||
|
|
|
@ -17,6 +17,11 @@ public partial class TextEditorView : Page
|
|||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void RaiseClickEvent(System.Windows.Controls.Button button)
|
||||
{
|
||||
var clickEventArgs = new RoutedEventArgs(System.Windows.Controls.Button.ClickEvent);
|
||||
button.RaiseEvent(clickEventArgs);
|
||||
}
|
||||
|
||||
private void Btn_openFile_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
@ -45,11 +50,15 @@ public partial class TextEditorView : Page
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void Btn_saveFile_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.currentFilePath == null)
|
||||
return;
|
||||
|
||||
{
|
||||
RaiseClickEvent(btn_saveFileAs);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Saving file " + currentFilePath);
|
||||
TextRange textRange = new TextRange(rtb_FileEditor.Document.ContentStart, rtb_FileEditor.Document.ContentEnd);
|
||||
string plainText = textRange.Text;
|
||||
|
@ -59,6 +68,10 @@ public partial class TextEditorView : Page
|
|||
File.WriteAllLines(this.currentFilePath, encryptedContent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void Btn_saveFileAs_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Console.WriteLine("Calling SaveFileDialog");
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<Version>4.5.2</Version>
|
||||
<Version>4.5.2.1</Version>
|
||||
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>WeeXnes</RootNamespace>
|
||||
|
|
Loading…
Add table
Reference in a new issue