Пример #1
0
        public MainWindow(string url) : base(Gtk.WindowType.Toplevel)
        {
            if (url != "")
            {
                this.url = url;
            }

            CreateWidgets();
            webview.Open(this.url);
        }
 public MainWindow()
     : base(Gtk.WindowType.Toplevel)
 {
     Build ();
     webView = new WebView ();
     this.scrolledWebWindow.Add(webView);
     this.text_adress.Text = HOME_PAGE;
     webView.LoadFinished += new LoadFinishedHandler (OnLoadFinished);
     webView.Open (text_adress.Text);
     pathFolderSave = Environment.GetFolderPath (Environment.SpecialFolder.MyMusic);
     downloadList = new DownloadList (this.scrolledListDownlaods);
     downloader = new Downloader (downloadList);
     downloader.SavePath = pathFolderSave;
 }
Пример #3
0
        public static void Main(string[] args)
        {
            string url = "http://localhost:8000/testing";

            Console.WriteLine("Loading...");

            Application.Init();
            Window window = new Window ("lolbr");
            window.SetDefaultSize(1024, 500);

            window.Destroyed += delegate (object sender, EventArgs e) {
                Application.Quit ();
            };

            ScrolledWindow scrolled_window = new ScrolledWindow ();
            WebView web_view = new WebView ();
            web_view.Open (url);
            scrolled_window.Add (web_view);
            window.Add(scrolled_window);
            window.ShowAll();

            Application.Run();
        }
Пример #4
0
        public void Init()
        {
            try{
                var fxd = new Fixed();
                _window.Add(fxd);
                _wbkt = new WebView();
                fxd.Add(_wbkt);

                //init window
                this.SetSizeRequest(_window_width, _window_height);
                _window.AllowShrink = false;
                _window.Resizable = false;
                _window.SetPosition(WindowPosition.CenterAlways);

                //subscribe on events
                _window.DeleteEvent += OnDelete;
                _wbkt.LoadFinished += OnWindowLoaded;

                //webkit init
                _wbkt.Open(string.Format (URL, this._app_id, _scope, _display, _api_veresion));
            }
            catch(Exception ex)
            {
                this.throwError(22, "Error while window initialization: " + ex.Message);
            }
        }
Пример #5
0
 public void Navigate(string uri)
 {
     wb.Open(uri);
 }
Пример #6
0
 void NewTab_Activated(object sender, EventArgs args)
 {
     anotherWebView = new WebView();
     anotherWebView.Open(this.url);
     nb.AppendPage(anotherWebView,new Label (this.url));
 }
Пример #7
0
 /// <summary>
 /// Navigate to an Url. Uses default loading flags, so the page might come
 /// from cache
 /// </summary>
 /// <param name="url">
 /// A <see cref="System.String"/> representing an Url
 /// </param>
 public void Go(string url)
 {
     Gdk.Threads.Enter();
     webview.Open(url);
     Gdk.Threads.Leave();
 }