mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Fixed #18
This commit is contained in:
parent
62492e1ec8
commit
005a3bf1fc
1 changed files with 17 additions and 14 deletions
|
|
@ -1266,34 +1266,37 @@ private void customRTB_DragDrop(object sender, DragEventArgs e)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string[] FileList = (string[])e.Data.GetData(DataFormats.FileDrop, false);
|
private void RightToLeftEditorMenuStrip_Click(object sender, EventArgs e)
|
||||||
foreach (string file in FileList) OpenFile.FileName = file;
|
foreach (string file in FileList) OpenFile.FileName = file;
|
||||||
object fname = e.Data.GetData("FileDrop");
|
object fname = e.Data.GetData("FileDrop");
|
||||||
if (fname != null)
|
if (fname != null)
|
||||||
{
|
{
|
||||||
var list = fname as string[];
|
if (RightToLeftEditorMenuStrip.Checked)
|
||||||
if (list != null && !string.IsNullOrWhiteSpace(list[0]))
|
if (list != null && !string.IsNullOrWhiteSpace(list[0]))
|
||||||
|
{
|
||||||
|
if (!WordWrapToolStripMenuItem.Checked)
|
||||||
{
|
{
|
||||||
if (!OpenFile.FileName.Contains(".cnp"))
|
string rtbTxt = CustomRTB.Text;
|
||||||
{
|
CustomRTB.Clear();
|
||||||
string opnfile = File.ReadAllText(OpenFile.FileName);
|
CustomRTB.RightToLeft = RightToLeft.Yes;
|
||||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
Application.DoEvents();
|
||||||
customRTB.Text = opnfile;
|
CustomRTB.Text = rtbTxt;
|
||||||
this.Text = appName + NameWithotPath;
|
|
||||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
|
||||||
customRTB.Select(Convert.ToInt32(cc2), 0);
|
customRTB.Select(Convert.ToInt32(cc2), 0);
|
||||||
currentFilename = Path.GetFileName(OpenFile.FileName);
|
currentFilename = Path.GetFileName(OpenFile.FileName);
|
||||||
filePath = OpenFile.FileName;
|
filePath = OpenFile.FileName;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PublicVar.openFileName = Path.GetFileName(OpenFile.FileName);
|
else
|
||||||
DecryptAES();
|
DecryptAES();
|
||||||
if (PublicVar.okPressed == true)
|
if (PublicVar.okPressed == true)
|
||||||
{
|
{
|
||||||
PublicVar.okPressed = false;
|
CustomRTB.RightToLeft = RightToLeft.Yes;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CustomRTB.RightToLeft = RightToLeft.No;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveConfirm(bool exit)
|
public void saveConfirm(bool exit)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue