Exemple #1
0
 /// <summary>PageSubmit().</summary>
 public void PageSubmit()
 {
  int           maxResults         =  MaxResults;
  string        exceptionMessage   =  null;
  string        withAllOfTheWords  =  WithAllOfTheWords;
  StringBuilder sbResultElement    =  null;
  
  UtilityGoogle.Search
  (
   ref withAllOfTheWords,
   ref maxResults,
   ref exceptionMessage,
   ref sbResultElement
  );
  
  if ( exceptionMessage == null )
  {
  	SearchResult = sbResultElement.ToString();
  }//if ( exceptionMessage == null )	
  else
  {
   Feedback = exceptionMessage;
  }//if ( exceptionMessage != null ) 
  
 }//public void PageSubmit()
Exemple #2
0
  /// <summary>The entry point for the application.</summary>
  /// <param name="argv">A list of arguments</param>
  public static void Main( string[] argv )
  {
   int           maxResults        =  MaxResults;
   string        exceptionMessage  =  null;
   string        question          =  Question;
   StringBuilder sbResultElement   =  null;

   if ( argv.Length > 0 ) { question = argv[0]; }

   UtilityGoogle.Search
   (
    ref question,
    ref maxResults,
    ref exceptionMessage,
    ref sbResultElement
   );

  }//public static void Main(string[] argv)
Exemple #3
0
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {
   string              exceptionMessage                = null;
 
   serverMapPath = this.MapPath("");
   if ( serverMapPath != null)
   {
    filenameConfigurationXml = serverMapPath + @"\" + filenameConfigurationXml;
   }//if ( serverMapPath != null)
   UtilityGoogle.ConfigurationXml
   (
        filenameConfigurationXml,
    ref exceptionMessage
   );
   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null ) 
  }//Page_Load