Exemplo n.º 1
0
        internal TabView( MainWindow parent, String url )
        {
            parentWindow = parent;
            initialUrl = url;

            this.Loaded += OnLoaded;
        }
Exemplo n.º 2
0
 private static void SecondInstance( object obj )
 {
     // When the user is trying to launch a new instance of the application,
     // trick him/her by simply opening a new window in this application.
     // It is important that no more that one WebCore is started per process.
     MainWindow win = new MainWindow( new string[] { Settings.Default.HomeURL } );
     win.Show();
 }
Exemplo n.º 3
0
 internal TabSourceView( MainWindow parent, String url )
     : base( parent, url )
 {
     this.IsSourceView = true;
 }
Exemplo n.º 4
0
        private void OnOpenWindow( object sender, ExecutedRoutedEventArgs e )
        {
            string target = (string)e.Parameter ?? ( SelectedView != null ? SelectedView.Browser.TargetURL : String.Empty );

            if ( !String.IsNullOrWhiteSpace( target ) )
            {
                // Open link in a new window.
                MainWindow win = new MainWindow( new string[] { target } );
                win.Show();

                // Or we can launch a separate process. Not appropriate in Awesomium;
                // it can only be safe if we are not using cache and logging.
                //Process.Start( Assembly.GetExecutingAssembly().Location, String.Format( "\"{0}\"", target ) );
            }
        }