public NewViewEventArgs(IWebBrowserView view, BrowserWindowStartMode startMode, TargetAddressType addressType)
 {
     ArgumentUtility.CheckNotNull ("view", view);
       StartMode = startMode;
       AddressType = addressType;
       View = view;
 }
        protected override void Dispatch(IExtendedWebBrowser browser, BrowserWindowTarget target, BrowserWindowStartMode startMode, string targetName, TargetAddressType addressType)
        {
            var webBrowser = (TridentWebBrowser) browser;
              IWebBrowserView view;
              Guid id;
              if(!Guid.TryParse (targetName, out id))
            id = new Guid();

              if (target == BrowserWindowTarget.PopUp)
            view = new PopUpWindow (webBrowser, id);
              else
            view = new BrowserTab (webBrowser, id, _states);
              ViewCreationDone (view, startMode, addressType);
        }
        public NavigationEventArgs(
            BrowserWindowStartMode startMode,
            bool cancel,
            Uri uri,
            string target,
            BrowserWindowTarget windowTarget,
            TargetAddressType addressType)
        {
            ArgumentUtility.CheckNotNull ("target", target);
              ArgumentUtility.CheckNotNull ("uri", uri);
              ArgumentUtility.CheckNotNull ("windowTarget", windowTarget);

              StartMode = startMode;
              Cancel = cancel;
              Url = uri;
              TargetName = target;
              BrowserWindowTarget = windowTarget;
              AddressType = addressType;
        }
        public void Show(BrowserWindowStartMode startMode)
        {
            switch (startMode)
              {
            case BrowserWindowStartMode.Active:
              Focus();
              break;
            case BrowserWindowStartMode.Background:
              TabHeaderViewModel.CloseButtonVisibility = Visibility.Collapsed;

              break;
            default:
              throw new InvalidOperationException (string.Format ("Start mode '{0}' is not supported for BrowserTab.", startMode));
              }
        }
 public void Show(BrowserWindowStartMode startMode)
 {
     switch (startMode)
       {
     case BrowserWindowStartMode.Active:
       Show();
       break;
     case BrowserWindowStartMode.Modal:
       ShowDialog();
       break;
     default:
       throw new InvalidOperationException (string.Format ("Start mode '{0}' is not supported for PopUpWindow.", startMode));
       }
 }
 public abstract void NewView(BrowserWindowTarget target, Uri uri, BrowserWindowStartMode startMode);
 public FullWindowPreparations(IExtendedWebBrowser browser, Uri uri, BrowserWindowTarget target, BrowserWindowStartMode startMode)
     : base(browser, uri, target)
 {
     StartMode = startMode;
 }
 protected void ViewCreationDone(IWebBrowserView view, BrowserWindowStartMode startMode, TargetAddressType addressType)
 {
     if (ViewCreated != null)
     ViewCreated (this, new NewViewEventArgs (view, startMode, addressType));
 }
        protected void Prepare(IExtendedWebBrowser webBrowser, Uri uri, BrowserWindowStartMode startMode, BrowserWindowTarget target)
        {
            ArgumentUtility.CheckNotNull ("webBrowser", webBrowser);

              _preparations = new FullWindowPreparations (webBrowser, uri, target, startMode);
        }
 protected abstract void Dispatch(
 IExtendedWebBrowser browser, BrowserWindowTarget target, BrowserWindowStartMode startMode, string targetName, TargetAddressType addressType);
 public override void NewView(BrowserWindowTarget target, Uri uri, BrowserWindowStartMode startMode)
 {
     var browser = CreateBrowser();
       Prepare (browser, uri, startMode, target);
       browser.Navigate (uri.ToString()); // starts event chain (handled in base class)
 }