mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Update MainForm.cs
This commit is contained in:
parent
d3429e6843
commit
3de595c5e5
1 changed files with 5 additions and 5 deletions
|
|
@ -430,11 +430,10 @@ private async void StatusPanelMessage(string type)
|
|||
private void StatusPanelTextInfo()
|
||||
{
|
||||
int currentColumn = 1 + richTextBox.SelectionStart - richTextBox.GetFirstCharIndexOfCurrentLine();
|
||||
int currentLine = 0;
|
||||
using (RichTextBox rtb = new RichTextBox() { WordWrap = false, Text = richTextBox.Text })
|
||||
{
|
||||
currentLine = 1 + rtb.GetLineFromCharIndex(richTextBox.SelectionStart);
|
||||
}
|
||||
RichTextBox rtb = new RichTextBox();
|
||||
rtb.WordWrap = false;
|
||||
rtb.Text = richTextBox.Text;
|
||||
int currentLine = 1 + rtb.GetLineFromCharIndex(richTextBox.SelectionStart);
|
||||
int linesCount = richTextBox.Lines.Count();
|
||||
if (linesCount == 0)
|
||||
{
|
||||
|
|
@ -444,6 +443,7 @@ private void StatusPanelTextInfo()
|
|||
statusPaneLinesLabel.Text = "Lines: " + linesCount;
|
||||
statusPaneLnLabel.Text = "Ln: " + currentLine;
|
||||
statusPaneColLabel.Text = "Col: " + currentColumn;
|
||||
|
||||
}
|
||||
|
||||
private void LockFile()
|
||||
|
|
|
|||
Loading…
Reference in a new issue