public void Compose(IMarkdownViewer viewer) { var vidget = viewer as IVidget; var viewerBackend = vidget.Backend.ToSwf(); viewerBackend.GotFocus -= Control.RaiseFocus; viewerBackend.GotFocus += Control.RaiseFocus; viewerBackend.KeyUp -= ToggleEditMode; viewerBackend.KeyUp += ToggleEditMode; }
public void Compose(IMarkdownViewer viewer) { var vidget = viewer as IVidget; var viewerBackend = vidget.Backend.ToXwt(); Widget.CanGetFocus = true; Widget.Frontend = this.Frontend; viewerBackend.GotFocus -= Widget.RaiseFocus; viewerBackend.GotFocus += Widget.RaiseFocus; viewerBackend.KeyPressed -= ToggleEditMode; viewerBackend.KeyPressed += ToggleEditMode; }
public void Activate(IMarkdownViewer viewer) { this.Widget.Clear(); var vidget = viewer as IVidget; var viewerBackend = vidget.Backend.ToXwt(); this.Widget.PackStart(viewerBackend, true); this.Widget.QueueForReallocate(); var wb = vidget.Backend as IWebBrowser; if (wb != null) { wb.WaitLoaded(); } viewerBackend.SetFocus(); IsEmpty = false; }
public void Activate(IMarkdownViewer viewer) { Control.SuspendLayout(); Control.Controls.Clear(); var vidget = viewer as IVidget; var viewerBackend = vidget.ToSwf(); viewerBackend.Dock = System.Windows.Forms.DockStyle.Fill; Control.Controls.Add(viewerBackend); Control.ResumeLayout(); var wb = viewerBackend as IWebBrowser; if (wb != null) { wb.MakeReady(); } viewerBackend.Focus(); IsEmpty = false; }