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;
|
||||
}
|
||||
|
||||
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;
|
||||
object fname = e.Data.GetData("FileDrop");
|
||||
if (fname != null)
|
||||
{
|
||||
var list = fname as string[];
|
||||
{
|
||||
if (RightToLeftEditorMenuStrip.Checked)
|
||||
if (list != null && !string.IsNullOrWhiteSpace(list[0]))
|
||||
{
|
||||
if (!WordWrapToolStripMenuItem.Checked)
|
||||
{
|
||||
if (!OpenFile.FileName.Contains(".cnp"))
|
||||
{
|
||||
string opnfile = File.ReadAllText(OpenFile.FileName);
|
||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
customRTB.Text = opnfile;
|
||||
this.Text = appName + NameWithotPath;
|
||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
string rtbTxt = CustomRTB.Text;
|
||||
CustomRTB.Clear();
|
||||
CustomRTB.RightToLeft = RightToLeft.Yes;
|
||||
Application.DoEvents();
|
||||
CustomRTB.Text = rtbTxt;
|
||||
customRTB.Select(Convert.ToInt32(cc2), 0);
|
||||
currentFilename = Path.GetFileName(OpenFile.FileName);
|
||||
filePath = OpenFile.FileName;
|
||||
return;
|
||||
}
|
||||
PublicVar.openFileName = Path.GetFileName(OpenFile.FileName);
|
||||
else
|
||||
DecryptAES();
|
||||
if (PublicVar.okPressed == true)
|
||||
{
|
||||
PublicVar.okPressed = false;
|
||||
}
|
||||
{
|
||||
CustomRTB.RightToLeft = RightToLeft.Yes;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CustomRTB.RightToLeft = RightToLeft.No;
|
||||
}
|
||||
}
|
||||
|
||||
public void saveConfirm(bool exit)
|
||||
|
|
|
|||
Loading…
Reference in a new issue