public Map(string width, string height) { InitializeComponent(); string a = "https://www.google.com/maps/dir//" + width + "," + height + "/@" + width + "," + height + "z/data=!4m2!4m1!3e0"; Wb.Navigate(a); }
public WatinWebBrowserExample() { InitializeComponent(); DataContext = new MainWindowViewModel(); Wb.Navigate("http://google.com"); Wb.LoadCompleted += ((sender, args) => { if (_docEvent != null) { _docEvent.oncontextmenu -= x => { WbShowContextMenu(); return(false); }; } if (Wb.Document != null) { _docEvent = (HTMLDocumentEvents2_Event)Wb.Document; _docEvent.oncontextmenu += x => { WbShowContextMenu(); return(false); }; } }); }
public void SetAddressBar(string path) { //if (System.IO.Directory.Exists(path)) //{ //var uri = new Uri(path); //if (Wb.WebBrowser.Source != uri) //{ Wb.Navigate(new Uri(path)); //} //} }
private void MfVaultView_Loaded(object sender, RoutedEventArgs e) { _viewModel = DataContext as MfVaultViewModel; if (_viewModel != null) { _viewModel.BrowserView = this; if (_viewModel.SourcePath != null) { Wb.Navigate(new Uri(_viewModel.SourcePath)); } } }
public MainWindow() { InitializeComponent(); Wb.Navigate("http://google.com"); Wb.LoadCompleted += delegate { if (_docEvent != null) { _docEvent.oncontextmenu -= _docEvent_oncontextmenu; } if (Wb.Document != null) { _docEvent = (HTMLDocumentEvents2_Event)Wb.Document; _docEvent.oncontextmenu += _docEvent_oncontextmenu; } }; }
public Map() { InitializeComponent(); Wb.Navigate("https://www.google.com/maps/dir//53.8913847,27.5592104/@53.8908151,27.5572328,17.79z/data=!4m2!4m1!3e0"); }
public McDonalds() { this.InitializeComponent(); Wb.Navigate(new Uri("https://www.google.dk/maps/search/nearest+Mcdonalds/@55.5893805,9.6126911,11z/data=!3m1!4b1")); }
public void Refresh() { Wb.Navigate(Wb.Source); }