Beispiel #1
0
 private void btnOpen_Click( object sender, RoutedEventArgs e )
 {
     foreach( Browser br in _browsers ) {
         if( br.Checked ) {
             string url = txtUrl.Text.Trim( );
             RememberedUrlAction rua = new RememberedUrlAction( url, br.DisplayName, false );
             if( Properties.Settings.Default.StoredActions == null ) {
                 Properties.Settings.Default.StoredActions = new RememberedUrlActions( );
             }
             Properties.Settings.Default.StoredActions.remembered_actions.Add( rua );
             Properties.Settings.Default.Save( );
             br.openUrl( url );
         }
         Application.Current.Shutdown( );
     }
 }
Beispiel #2
0
 private void btnOpen_Click( object sender, EventArgs e )
 {
     foreach( var currentBrowser in _availableBrowsers ) {
         if( !currentBrowser.Checked ) {
             continue;
         }
         var url = txtUrl.Text.Trim( );
         if( chkRemember.Checked ) {
             var rua = new RememberedUrlAction { PageUrl = url, SelectedBrowser = new List<string>{ currentBrowser.DisplayName } };
             var ruas = Properties.Settings.Default.StoredActions ?? new RememberedUrlActions( );
             ruas.RememberedActions.Add( rua );
             Properties.Settings.Default.StoredActions = ruas;
             Properties.Settings.Default.Save( );
         }
         currentBrowser.OpenUrl( url );
     }
     SaveCheckedBrowsers( );
     Application.Exit( );
 }