|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Messagebox_Class;
namespace CryptPad
{
public partial class GoTo : Form
{
CryptPad Crypt_Pad;
public GoTo ()
{
InitializeComponent ();
this.Font = SystemFonts.MessageBoxFont;
}
private void buttonGoTo_Click (object sender, EventArgs e)
{
int i;
if (!Int32.TryParse (textBoxGoTo.Text, out i))
{
Messagebox.Show ("Invalid line number!");
return;
}
i = Crypt_Pad.txtBody.GetFirstCharIndexFromLine (i-1);
Crypt_Pad.SelectScroll (i, 0);
this.Close ();
}
private void buttonCancel_Click (object sender, EventArgs e)
{
this.Close ();
}
private void GoTo_Load (object sender, EventArgs e)
{
Crypt_Pad = (CryptPad) this.Owner;
int i = Crypt_Pad.txtBody.SelectionStart;
i = 1+ Crypt_Pad.txtBody.GetLineFromCharIndex (i);
textBoxGoTo.Text = i.ToString ();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a retired Software Systems Design Engineer experienced with IEEE standards and the entire IEEE software development life cycle. Concept Exploration, Requirements, Design, Implementation, Test, Installation and Checkout, Operation and Maintenance. I enjoy working with people and solving customer problems.
I am currently a writer for my personal ministry: IAUA End Time Ministry