// ********************************************************************** // **************************** Constructor ***************************** // ********************************************************************** /// <name>ReplaceView::ReplaceView(a_scribeView)</name> /// <summary> /// Constructor for the ReplaceForm that requires a reference the current /// document the user is working on /// </summary> /// <param name="a_scribeView">Reference to the Scribe View</param> /// <author>Michael Marsh</author> /// <date>7:35pm 4/3/2016</date> public ReplaceView(ScribeView a_scribeView) { // Initializes this form's model m_replaceModel = new ReplaceModel(); // Set the parameters with the class variable m_scribeView = a_scribeView; // Initialize the GUI for the replace form InitializeComponent(); }
/// <name>GoToForm::GoToForm(a_scribeView, lineNumber)</name> /// <summary> /// Constructor for the GoTo Form that requires a reference the current /// document the user is working on /// </summary> /// <param name="a_scribeView">Reference to the Scribe View</param> /// <param name="a_lineNumber"> /// Reference to the current line the cursor is on in the document /// </param> /// <author>Michael Marsh</author> /// <date>9:45pm 4/3/2016</date> public GoToForm(ScribeView a_scribeView, int a_lineNumber) { // Stores a reference to the document the user connected to this form m_scribeView = a_scribeView; // Initialize the GUI for the GoTo Form InitializeComponent(); // Store the current line number in the line number text box int lineNum = a_lineNumber + 1; m_lineNumTxtBox.Text = lineNum.ToString(); }
static void Main() { // Sets up the default frame of the application Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Creates a new fourm, sets up a closed form listener, and displays // it to the console. var main = new ScribeView(); main.FormClosed += new FormClosedEventHandler(FormClosed); main.Show(); // Launches the application Application.Run(); }