public AutoCompleteForm(TextView view, TextControl owner, TextBufferLocation location, ITextAutoCompletionList list) { this.InitializeComponent(); this._pickedItem = string.Empty; this._list = list; foreach (TextAutoCompletionItem item in list.Items) { this._itemList.Items.Add(item); } this._view = view; this._nextHandler = this._view.AddCommandHandler(this); this._owner = owner; if (location.ColumnIndex == location.Line.Length) { this._startLocation = location.Clone(); } else { using (TextBufferSpan span = this._view.GetWordSpan(location)) { this._startLocation = span.Start.Clone(); } } this._timer = new Timer(); this._timer.Interval = 500; this._timer.Tick += new EventHandler(this.OnTimerTick); }
public void Dispose() { if (this._codeTextControlHost != null) { this._codeTextControlHost.Dispose(); } this._control = null; this._serviceProvider = null; }
public void Dispose() { if (this._handlerList != null) { for (int i = this._handlerList.Count - 1; i >= 0; i--) { ((IDisposable) this._handlerList[i]).Dispose(); } this._handlerList.Clear(); } this._control = null; }
public QuickTagEditDialog(IServiceProvider provider) : base(provider) { this.InitializeComponent(); this._textControl = new TextControl(); ((ISupportInitialize) this._textControl).BeginInit(); this._textControl.MarginWidth = 0; this._textControl.LineNumbersVisible = false; this._textControl.Dock = DockStyle.Fill; IDocumentDesignerHost service = (IDocumentDesignerHost) base.ServiceProvider.GetService(typeof(IDocumentDesignerHost)); Document document = service.Document; this._textControl.Site = new TextControlSite(base.ServiceProvider, document.Language as ITextLanguage); ((ISupportInitialize) this._textControl).EndInit(); this._containerPanel.Controls.Add(this._textControl); }
public void Dispose() { if (this._handlerList != null) { for (int i = this._handlerList.Count - 1; i >= 0; i--) { ((IDisposable) this._handlerList[i]).Dispose(); } this._handlerList.Clear(); } if (this._codeTextControlHost != null) { this._codeTextControlHost.Dispose(); } this._control = null; this._serviceProvider = null; }
internal TextView(TextControl owner, TextBuffer buffer, TextManager manager) { this._textManager = manager; this._owner = owner; this._buffer = buffer; this._location = this._buffer.CreateTextBufferLocation(); this._location.LocationChanged += new EventHandler(this.OnLocationChanged); this._selectionStart = this._buffer.CreateTextBufferLocation(); this._selectionEnd = this._buffer.CreateTextBufferLocation(); this._buffer.TextBufferChanged += new TextBufferEventHandler(this.OnTextBufferChanged); base.SetStyle(ControlStyles.UserPaint, true); base.SetStyle(ControlStyles.AllPaintingInWmPaint, true); base.SetStyle(ControlStyles.Opaque, true); base.SetStyle(ControlStyles.DoubleBuffer, true); base.SetStyle(ControlStyles.ResizeRedraw, true); this._horizontalScrollBar = new HScrollBar(); this._horizontalScrollBar.Cursor = Cursors.Arrow; this._horizontalScrollBar.Scroll += new ScrollEventHandler(this.OnHorizontalScrollBarScroll); if (this._buffer.MaxLine != null) { this._viewMaxLineLength = this.GetViewIndex(this._buffer.MaxLine, this._buffer.MaxLineLength); } else { this._viewMaxLineLength = 0; } this._horizontalScrollBar.Maximum = this._viewMaxLineLength; this._verticalScrollBar = new VScrollBar(); this._verticalScrollBar.Cursor = Cursors.Arrow; this._verticalScrollBar.Scroll += new ScrollEventHandler(this.OnVerticalScrollBarScroll); this._verticalScrollBar.Maximum = this._buffer.LineCount; this.Cursor = Cursors.IBeam; this._viewTopLineNumber = 0; this._caretWidth = 2; this._insertMode = true; base.Controls.Add(this._verticalScrollBar); base.Controls.Add(this._horizontalScrollBar); this.AddCommandHandler(new PlainTextViewCommandHandler(this, this._buffer)); this.AllowDrop = true; }
public JSharpTextControlHost(TextControl control) { this._control = control; }
public HtmlTextControlHost(TextControl control) { this._control = control; }
protected override ITextControlHost GetTextControlHost(TextControl control, IServiceProvider provider) { return new WebFormsTextControlHost(control, provider); }
protected override ITextControlHost GetTextControlHost(TextControl control, IServiceProvider provider) { return new VisualBasicTextControlHost(control); }
internal void RegisterTextControl(TextControl textControl) { if (!this.TextControlsInternal.Contains(textControl)) { textControl.Font = this.SourceFont; this.TextControlsInternal.Add(textControl); } }
public virtual ITextControlHost GetTextControlHost(TextControl control, IServiceProvider provider) { return null; }
protected virtual ITextControlHost GetTextControlHost(TextControl control, IServiceProvider serviceProvider) { return null; }
public VisualBasicTextControlHost(TextControl control) { this._control = control; }
public WebFormsTextControlHost(TextControl control, IServiceProvider provider) { this._serviceProvider = provider; this._control = control; }
internal void UnregisterTextControl(TextControl textControl) { this.TextControlsInternal.Remove(textControl); }
public AspNetTextControlHost(TextControl control, IServiceProvider provider) { this._serviceProvider = provider; this._control = control; }
protected override ITextControlHost GetTextControlHost(TextControl control, IServiceProvider provider) { return new CSharpTextControlHost(control); }
ITextControlHost ITextLanguage.GetTextControlHost(TextControl control, IServiceProvider serviceProvider) { return this.GetTextControlHost(control, serviceProvider); }