当前位置: 首页>>代码示例>>C#>>正文


C# WebControl.LoadUrl方法代码示例

本文整理汇总了C#中WebControl.LoadUrl方法的典型用法代码示例。如果您正苦于以下问题:C# WebControl.LoadUrl方法的具体用法?C# WebControl.LoadUrl怎么用?C# WebControl.LoadUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebControl的用法示例。


在下文中一共展示了WebControl.LoadUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WebViewer

        public WebViewer()
            : base(WindowType.Toplevel)
        {
            xml = new XML (null, "MainWindow.glade", "mainBox", null);
            xml.Autoconnect (this);
            Gdk.Pixbuf pix = new Gdk.Pixbuf (null, "webnotes-16.png");

            //Window settings
            Title = "WebNotes";
            WindowPosition = WindowPosition.Center;
            Icon = pix;
            Resize (650,600);

            //Trayicon stuff
            trayIcon = new TrayIcon ("WebNotes");
            EventBox ebox = new EventBox ();
            ebox.ButtonPressEvent += ButtonPressed;
            Image image = new Image (pix);
            ebox.Add (image);
            trayIcon.Add (ebox);
            trayIcon.ShowAll ();

            //Gecko webcontrol
            wc = new WebControl ();
            wc.LoadUrl ("http://localhost:8000");
            geckoBox.Add (wc);

            optionMenu.Changed += OptionChanged;
            BuildMenu ();
            int firstPage = list.IndexOf ("WikiHome");
            if (firstPage != -1)
            optionMenu.SetHistory ((uint)firstPage);

            Add (mainBox);
        }
开发者ID:BackupTheBerlios,项目名称:mspace-svn,代码行数:35,代码来源:WebViewer.cs

示例2: MainWindow

    //private Notebook geckoTab;
    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        //geckoTab = new Notebook();
        gecko = new WebControl();

        gecko.Show();
        gecko.LoadUrl("http://www.google.de");
        //Button b = new Button();
        //b.Clicked += new EventHandler(OnGoBack);
        //urlentry.KeyPressEvent += OnKeyPressed;

        //Handler for GeckoEvents
        gecko.OpenUri += OnOpenUri;
        //b.Show();

        Build ();
        //RC_Liste initialisieren
        this.rc_view.AppendColumn("Editor", new CellRendererText (), "text", 0);
        this.rc_view.AppendColumn("Artikel", new CellRendererText (), "text", 1);
        this.rc_view.AppendColumn("Diff", new CellRendererText (), "text", 2);
        this.rc_view.AppendColumn("Begründung", new CellRendererText (), "text", 3);
        ListStore store = new ListStore (typeof (string),typeof (string), typeof (int),typeof(string));
               for (int i= 100;i>1;i--){
               store.AppendValues ("127.0.0.1","Spielwiese",+9121,"blödsin");
                store.AppendValues ("C-M","Allgemeine Relativitätstheorie",-1231,"revert Vandalismus");
                }
                this.rc_view.Model = store;

        //Browser initialisieren
        this.urlentry.InsertText(0,gecko.Location);
        this.geckobox.Add(gecko);
        this.history_treeview.AppendColumn("Verglich", new Gtk.CellRendererToggle(), "text", 0);
        this.history_treeview.AppendColumn("", new Gtk.CellRendererToggle(), "text", 0);
        this.history_treeview.AppendColumn("Revert", new Gtk.CellRendererToggle(), "text", 0);
        this.history_treeview.AppendColumn("Datum/Uhrzeit", new CellRendererText (), "text", 0);
        this.history_treeview.AppendColumn("Verglich", new CellRendererText (), "text", 0);
        this.history_treeview.AppendColumn("Benutzer", new CellRendererText (), "text", 0);
        this.history_treeview.AppendColumn("Kommentar", new CellRendererText (), "text", 0);

        ListStore history_store = new ListStore (typeof (Gtk.ToggleButton),typeof (Gtk.ToggleButton), typeof (Gtk.ToggleButton),typeof(string),typeof(string),typeof(string),typeof(string));

        this.history_treeview.Model = history_store;
    }
开发者ID:BackupTheBerlios,项目名称:wikifighter-svn,代码行数:45,代码来源:MainWindow.cs

示例3: Main

    static void Main(string [] args)
    {
        for (int i = 0; i < args.Length; i++){
            switch (args [i]){
            case "-width":
                try {
                    i++;
                    width = Int32.Parse (args [i]);
                } catch {
                    Console.WriteLine ("-width requires an int argument");
                }
                break;
            case "-height":
                try {
                    i++;
                    height = Int32.Parse (args [i]);
                } catch {
                    Console.WriteLine ("-height requires an int argument");
                }
                break;
            case "-help":
            case "-h":
                Help ();
                break;

            default:
                if (url == null)
                    url = args [i];
                else if (output == null)
                    output = args [i];
                else
                    Help ();
                break;
            }
        }
        if (url == null)
            Help ();
        if (output == null)
            output = "shot.png";

        Application.Init();
        Window w = new Window ("test");
        wc = new WebControl ();
        wc.LoadUrl (args [0]);
        wc.Show ();
        wc.LocChange += WaitABit;
        wc.SetSizeRequest (1024, 768);
        w.Add (wc);
        w.ShowAll ();
        //GLib.Timeout.Add(700, new TimeoutHandler(MakeShot));
        Application.Run();
    }
开发者ID:mono,项目名称:gtkmozembed-sharp,代码行数:52,代码来源:WebThumbnailer.cs


注:本文中的WebControl.LoadUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。