コード例 #1
0
 public FindReplaceForm(CommandEditor ce)
 {
     mainEditor = ce;
     InitializeComponent();
     loaded = false;
 }
コード例 #2
0
		/// <summary>
		/// Creates a new instance of the CommandEditorPage.
		/// </summary>
		/// <param name="fileName">File name of the document being opened.</param>
		/// <param name="parent">Parent that will hold rhw new tab document.</param>
		public CommandEditorPage(string fileName, CommandEditor parent) : base()
		{
			//Initialize test result list.
			this.testResults = new List<CommandResult>();

			//Text editor initialization.
			_textEditor = new SWAT_Editor.Controls.TextEditor.TextEditor(this);
			_textEditor.Size = this.Size - new Size(30, 20);
			_textEditor.BorderStyle = BorderStyle.Fixed3D;
			_textEditor.Font = new Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Point, ((byte)0));
			_textEditor.KeyUp += new KeyEventHandler(editor_KeyUp);
			_textEditor.MouseClick += new MouseEventHandler(editor_MouseClick);
			_textEditor.DisplayBreakpointPanel = false;
			if (parent.Help == null)
				parent.Help = new SWAT.DynamicHelp.SwatHelp(parent.WebBrowser);
            
            _textEditor.Document.WordWrap = false;
            _textEditor.Document.RightMargin = 90000000;
			
            si = new SWAT.Auto_Complete.SwatAuto_Complete(_textEditor.Document, _listBox, _toolTip);

			_parent = parent;
			_textEditor.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
			this.Controls.Add(_textEditor);
			this.Controls.Add(_listBox);
			this.Controls.Add(_toolTip);

			loadFile(fileName);

			//when loading a new tab, read the and set the current setting of the use of the intellisense
			setIntellisense(parent.UseIntellisense);
		}