mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
The position of some variables has been changed to avoid some bugs
This commit is contained in:
parent
c14f525569
commit
2548674b26
1 changed files with 2 additions and 2 deletions
|
|
@ -273,13 +273,13 @@ private void DeleteUpdateFiles()
|
|||
|
||||
private void SaveConfirm()
|
||||
{
|
||||
string messageBoxText;
|
||||
if (richTextBox.Modified)
|
||||
{
|
||||
if (string.IsNullOrEmpty(PublicVar.openFileName))
|
||||
{
|
||||
PublicVar.openFileName = "Unnamed.cnp";
|
||||
}
|
||||
string messageBoxText;
|
||||
if (!PublicVar.keyChanged)
|
||||
{
|
||||
messageBoxText = "Save file: " + "\"" + PublicVar.openFileName + "\"" + " ? ";
|
||||
|
|
@ -453,11 +453,11 @@ private void LockFile()
|
|||
string opnfile = File.ReadAllText(filePath);
|
||||
string de = AES.Decrypt(opnfile, TypedPassword.Value, null, settings.HashAlgorithm, Convert.ToInt32(settings.PasswordIterations), Convert.ToInt32(settings.KeySize));
|
||||
fileLockedPanel.Visible = false;
|
||||
richTextBox.Focus();
|
||||
richTextBox.Text = de;
|
||||
richTextBox.SelectionStart = caretPos;
|
||||
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
||||
TypedPassword.Value = null;
|
||||
richTextBox.Focus();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue