void ReleaseDesignerOutlets ()
		{
			if (webView != null) {
				webView.Dispose ();
				webView = null;
			}
		}
 void ReleaseDesignerOutlets()
 {
     if (webView != null) {
         webView.Dispose ();
         webView = null;
     }
 }
示例#3
0
        void ReleaseDesignerOutlets()
        {
            if (lookupEntry != null)
            {
                lookupEntry.Dispose();
                lookupEntry = null;
            }

            if (outline != null)
            {
                outline.Dispose();
                outline = null;
            }

            if (webView != null)
            {
                webView.Dispose();
                webView = null;
            }

            if (statusLabel != null)
            {
                statusLabel.Dispose();
                statusLabel = null;
            }
        }
示例#4
0
 public HTMLWidget()
 {
     this.Build ();
     m_view = new WebKit.WebView();
     htmlScroll.Add(m_view);
     m_view.LoadFinished += HandleM_viewLoadFinished;
     m_view.NavigationRequested += HandleM_viewNavigationRequested;
 }
示例#5
0
        public override void Initialize()
        {
            base.Initialize();

            view   = new WebKit.WebView();
            Widget = GtkMacInterop.NSViewToGtkWidget(view);
            Widget.Show();
        }
示例#6
0
 public override NSMenuItem [] UIGetContextMenuItems(WebKit.WebView sender, NSDictionary forElement, NSMenuItem [] defaultMenuItems)
 {
     if (backend.ContextMenuEnabled)
     {
         return(defaultMenuItems);
     }
     return(null);
 }
示例#7
0
 void ReleaseDesignerOutlets()
 {
     if (authWebView != null)
     {
         authWebView.Dispose();
         authWebView = null;
     }
 }
示例#8
0
        public override void Initialize()
        {
            base.Initialize();

            view            = new WebKit.WebView();
            view.UIDelegate = new XwtWebUIDelegate(this);
            Widget          = GtkMacInterop.NSViewToGtkWidget(view);
            Widget.Show();
        }
示例#9
0
		public WebKitWebBrowser ()
		{
			webView = new WebKit.WebView();
			Add(webView);
			webView.Show();

			#region WebView Events
			webView.StatusBarTextChanged += delegate (object o, WebKit.StatusBarTextChangedArgs args) {
				jsStatus = args.Value;
				if (JSStatusChanged != null)
					JSStatusChanged (this, new StatusMessageChangedEventArgs (jsStatus));
			};

			webView.HoveringOverLink += delegate (object o, WebKit.HoveringOverLinkArgs args) {
				linkStatus = args.Link;
				if (LinkStatusChanged != null)
					LinkStatusChanged (this, new StatusMessageChangedEventArgs (linkStatus));
			};

			webView.TitleChanged += delegate (object o, WebKit.TitleChangedArgs args) {
				if (TitleChanged != null)
					TitleChanged (this, new TitleChangedEventArgs(args.Title));
			};

			webView.NavigationRequested += delegate (object o, WebKit.NavigationRequestedArgs args) {
				// FIXME: There's currently no way to tell the difference 
				// between a link being clicked and another navigation event.
				// This is a temporary workaround.
				if (args.Request.Uri == linkStatus) {
					if (LinkClicked != null)
						LinkClicked (this, new LocationChangingEventArgs(args.Request.Uri, false));
				} else {
					if (LocationChanged != null)
						LocationChanged (this, new LocationChangedEventArgs (args.Request.Uri));
				}
				args.RetVal = WebKit.NavigationResponse.Accept;
			};

			webView.LoadStarted += delegate {
				if (NetStart != null)
					NetStart (this, EventArgs.Empty);
			};

			webView.LoadFinished += delegate {
				if (NetStop != null)
					NetStop (this, EventArgs.Empty);
			};

			webView.LoadProgressChanged += delegate (object o, WebKit.LoadProgressChangedArgs args) {
				if (LoadingProgressChanged != null)
					LoadingProgressChanged(this, new LoadingProgressChangedEventArgs(args.Progress));
			};
			
			#endregion
		}
示例#10
0
        public XcbWebView(WebKit.WebView webView)
        {
            if (webView == null)
            {
                throw new ArgumentNullException("webView");
            }

            this.webView = webView;
            this.webView.FinishedLoad += (sender, e) => {
                FinishedLoad?.Invoke(this, EventArgs.Empty);
            };
        }
示例#11
0
        void ReleaseDesignerOutlets()
        {
            if (MainWebView != null)
            {
                MainWebView.Dispose();
                MainWebView = null;
            }

            if (MainTextView != null)
            {
                MainTextView.Dispose();
                MainTextView = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (downloadButton != null)
            {
                downloadButton.Dispose();
                downloadButton = null;
            }

            if (messageLabel != null)
            {
                messageLabel.Dispose();
                messageLabel = null;
            }

            if (remindMeLaterButton != null)
            {
                remindMeLaterButton.Dispose();
                remindMeLaterButton = null;
            }

            if (titleLabel != null)
            {
                titleLabel.Dispose();
                titleLabel = null;
            }

            if (webView != null)
            {
                webView.Dispose();
                webView = null;
            }

            if (progressBar != null)
            {
                progressBar.Dispose();
                progressBar = null;
            }

            if (progressLabel != null)
            {
                progressLabel.Dispose();
                progressLabel = null;
            }

            if (cancelButton != null)
            {
                cancelButton.Dispose();
                cancelButton = null;
            }
        }
示例#13
0
        public static void Initialize(IScheduler dispatcher)
        {
            // Need to initialize HttpEncoder.Current because it doesn't default to HttpEncoder.Default.
            // See #3385 for more details.
            System.Web.Util.HttpEncoder.Current = System.Web.Util.HttpEncoder.Default;

            WebView.Implementation.UrlFactory = (uri, onNavigating) =>
                Control.Create(self =>
                {
                    var webView = new WebKit.WebView();

                    webView.DecidePolicyForNavigation += (sender, eventArgs) =>
                    {
                        var listener = new WebPolicyListener(eventArgs.DecisionToken.Handle);
                        listener.Use();

                        var navigatingArgs = new Navigating(new Uri(eventArgs.Request.Url.AbsoluteString));
                        onNavigating(navigatingArgs);

                        if (navigatingArgs.Cancel)
                            listener.Ignore();
                    };

                    webView.MainFrame.LoadRequest(new NSUrlRequest(new NSUrl(uri.AbsoluteUri)));

                    self.BindNativeDefaults(webView, dispatcher);

                    return webView;
                });

            WebView.Implementation.StringFactory = (content) =>
                Control.Create (self =>
                    {
                        var webView = new WebKit.WebView();

                        self.BindNativeProperty(dispatcher, "content", content, c => webView.MainFrame.LoadHtmlString(c, new NSUrl("")));
                        self.BindNativeDefaults(webView, dispatcher);

                        return webView;
                    });
        }
示例#14
0
		public Window (ComparisonInfo info) : base ("ilContrast Assembly Comparison Tool") 
		{
			DefaultSize = new Size (450, 450);

			main_vbox = new VBox (false, 0);
			AddActionUI ();
#if USE_GECKO
			browser = new Gecko.WebControl ();
			main_vbox.PackStart (browser, true, true, 0);
#else
			web_view = new WebKit.WebView ();
			ScrolledWindow sw = new ScrolledWindow ();
			sw.Add (web_view);
			main_vbox.PackStart (sw, true, true, 0);
#endif
			statusbar = new Statusbar ();
			main_vbox.PackStart (statusbar, false, false, 0);
			Add (main_vbox);
			main_vbox.ShowAll ();
			first_show = true;
			this.info = info;
		}
        public Window(ComparisonInfo info) : base("ilContrast Assembly Comparison Tool")
        {
            DefaultSize = new Size(450, 450);

            main_vbox = new VBox(false, 0);
            AddActionUI();
#if USE_GECKO
            browser = new Gecko.WebControl();
            main_vbox.PackStart(browser, true, true, 0);
#else
            web_view = new WebKit.WebView();
            ScrolledWindow sw = new ScrolledWindow();
            sw.Add(web_view);
            main_vbox.PackStart(sw, true, true, 0);
#endif
            statusbar = new Statusbar();
            main_vbox.PackStart(statusbar, false, false, 0);
            Add(main_vbox);
            main_vbox.ShowAll();
            first_show = true;
            this.info  = info;
        }
示例#16
0
        void ReleaseDesignerOutlets()
        {
            if (addFacultyButton != null)
            {
                addFacultyButton.Dispose();
                addFacultyButton = null;
            }

            if (addName != null)
            {
                addName.Dispose();
                addName = null;
            }

            if (allFacultyCheckBox != null)
            {
                allFacultyCheckBox.Dispose();
                allFacultyCheckBox = null;
            }

            if (classCombo != null)
            {
                classCombo.Dispose();
                classCombo = null;
            }

            if (classCombo2 != null)
            {
                classCombo2.Dispose();
                classCombo2 = null;
            }

            if (classCombo3 != null)
            {
                classCombo3.Dispose();
                classCombo3 = null;
            }

            if (eventInput1 != null)
            {
                eventInput1.Dispose();
                eventInput1 = null;
            }

            if (eventInput2 != null)
            {
                eventInput2.Dispose();
                eventInput2 = null;
            }

            if (eventInput3 != null)
            {
                eventInput3.Dispose();
                eventInput3 = null;
            }

            if (eventInput5 != null)
            {
                eventInput5.Dispose();
                eventInput5 = null;
            }

            if (facultyListCombo != null)
            {
                facultyListCombo.Dispose();
                facultyListCombo = null;
            }

            if (firstNameInput != null)
            {
                firstNameInput.Dispose();
                firstNameInput = null;
            }

            if (htmlScheduleCombo != null)
            {
                htmlScheduleCombo.Dispose();
                htmlScheduleCombo = null;
            }

            if (lastNameInput != null)
            {
                lastNameInput.Dispose();
                lastNameInput = null;
            }

            if (listOfChosen != null)
            {
                listOfChosen.Dispose();
                listOfChosen = null;
            }

            if (listOfChosenText != null)
            {
                listOfChosenText.Dispose();
                listOfChosenText = null;
            }

            if (middleInitialInput != null)
            {
                middleInitialInput.Dispose();
                middleInitialInput = null;
            }

            if (removeFacultyButton != null)
            {
                removeFacultyButton.Dispose();
                removeFacultyButton = null;
            }

            if (removeName != null)
            {
                removeName.Dispose();
                removeName = null;
            }

            if (resultTextBox != null)
            {
                resultTextBox.Dispose();
                resultTextBox = null;
            }

            if (scheduleButton != null)
            {
                scheduleButton.Dispose();
                scheduleButton = null;
            }

            if (scrapeButton != null)
            {
                scrapeButton.Dispose();
                scrapeButton = null;
            }

            if (timeCombo != null)
            {
                timeCombo.Dispose();
                timeCombo = null;
            }

            if (timeCombo2 != null)
            {
                timeCombo2.Dispose();
                timeCombo2 = null;
            }

            if (webViewSchedule != null)
            {
                webViewSchedule.Dispose();
                webViewSchedule = null;
            }
        }
示例#17
0
        public WebKitWebBrowser()
        {
            webView = new WebKit.WebView();
            Add(webView);
            webView.Show();

            #region WebView Events
            webView.StatusBarTextChanged += delegate(object o, WebKit.StatusBarTextChangedArgs args) {
                jsStatus = args.Value;
                if (JSStatusChanged != null)
                {
                    JSStatusChanged(this, new StatusMessageChangedEventArgs(jsStatus));
                }
            };

            webView.HoveringOverLink += delegate(object o, WebKit.HoveringOverLinkArgs args) {
                linkStatus = args.Link;
                if (LinkStatusChanged != null)
                {
                    LinkStatusChanged(this, new StatusMessageChangedEventArgs(linkStatus));
                }
            };

            webView.TitleChanged += delegate(object o, WebKit.TitleChangedArgs args) {
                if (TitleChanged != null)
                {
                    TitleChanged(this, new TitleChangedEventArgs(args.Title));
                }
            };

            webView.NavigationRequested += delegate(object o, WebKit.NavigationRequestedArgs args) {
                // FIXME: There's currently no way to tell the difference
                // between a link being clicked and another navigation event.
                // This is a temporary workaround.
                if (args.Request.Uri == linkStatus)
                {
                    if (LinkClicked != null)
                    {
                        LinkClicked(this, new LocationChangingEventArgs(args.Request.Uri, false));
                    }
                }
                else
                {
                    if (LocationChanged != null)
                    {
                        LocationChanged(this, new LocationChangedEventArgs(args.Request.Uri));
                    }
                }
                args.RetVal = WebKit.NavigationResponse.Accept;
            };

            webView.LoadStarted += delegate {
                if (NetStart != null)
                {
                    NetStart(this, EventArgs.Empty);
                }
            };

            webView.LoadFinished += delegate {
                if (NetStop != null)
                {
                    NetStop(this, EventArgs.Empty);
                }
            };

            webView.LoadProgressChanged += delegate(object o, WebKit.LoadProgressChangedArgs args) {
                if (LoadingProgressChanged != null)
                {
                    LoadingProgressChanged(this, new LoadingProgressChangedEventArgs(args.Progress));
                }
            };

            #endregion
        }
示例#18
0
 private void CreateWebView()
 {
     _webview          = new WebKit.WebView();
     _webview.Editable = false;
 }