예제 #1
0
        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);
        }
예제 #2
0
        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);
                    };
                }
            });
        }
예제 #3
0
 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));
     //}
     //}
 }
예제 #4
0
 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));
         }
     }
 }
예제 #5
0
 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;
         }
     };
 }
예제 #6
0
 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"));
 }
예제 #8
0
 public void Refresh()
 {
     Wb.Navigate(Wb.Source);
 }