protected void OnBeforeNewWindow(string url, out bool cancel)
 {
     EventHandler<ExtendedNavigatingEventArgs> handler = BeforeNewWindow;
       ExtendedNavigatingEventArgs args = new ExtendedNavigatingEventArgs(url, null);
       if (null != handler)
       {
     handler(this, args);
       }
       cancel = args.Cancel;
 }
Пример #2
0
 private void Browser_BeforeNewWindow(object sender, ExtendedNavigatingEventArgs e)
 {
   if (CurrentModel.Mode == Model.WorkMode.Browse)
   {
     WebPosition position = WebPosition.Parse(e.Url);
     if (position != null)
       CurrentModel.CurrentPositions.Add(position);
   }
   e.Cancel = true;
 }
 protected void OnBeforeNavigate(string url, string frame, out bool cancel)
 {
     EventHandler<ExtendedNavigatingEventArgs> handler = BeforeNavigate;
       ExtendedNavigatingEventArgs args = new ExtendedNavigatingEventArgs(url, frame);
       if (null != handler)
       {
     handler(this, args);
       }
       cancel = args.Cancel;
 }