예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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;
        }
예제 #4
0
        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;
        }