Example #1
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();
 }
Example #2
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 ) );
            }
        }