本文整理汇总了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);
}
示例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;
}
示例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();
}