예제 #1
0
 /// <summary>
 /// Constructs a new instance of the Plugin's settings form.
 /// </summary>
 public frmPluginSettings()
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     settings = PluginSettings.Instance();
 }
예제 #2
0
 /// <summary>
 /// Create a new instance of the <see cref="EbayPlugin"/> class.
 /// </summary>
 public EbayPlugin()
 {
     mutex = new Mutex();
     settings = PluginSettings.Instance();
     name = "CrawlWave.ServerPlugins.Ebay";
     description = "CrawlWave Ebay Plugin";
     dataDependent = true;
     state = PluginState.Stopped;
     enabled = true;
     version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
     percent = 0;
     mustStop = false;
     pluginThread = null;
     dbProvider = DBConnectionStringProvider.Instance();
     settings.DBConnectionString = dbProvider.ProvideDBConnectionString(name);
     dbcon = new SqlConnection(settings.DBConnectionString);
     regUser = new Regex("<h1>eBay My World:\\s*(?<user>[^<]*)<img", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline);
     regFeedback = new Regex("Feedback score: <b>(?<feedback>\\d+)</b><span class=\"vSep\">\\|</span>Positive feedback: <b>(?<positive>\\d+\\.?\\d)%</b>", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline);
     //eBay My World: c7gman<img
     //Feedback score: <b>285</b><span class="vSep">|</span>Positive feedback: <b>100%</b>
 }
예제 #3
0
 /// <summary>
 /// Provides a global access point for the single instance of the <see cref="PluginSettings"/>
 /// class.
 /// </summary>
 /// <returns>A reference to the single instance of <see cref="PluginSettings"/>.</returns>
 public static PluginSettings Instance()
 {
     if (instance==null)
     {
         lock(typeof(PluginSettings))
         {
             if( instance == null )
             {
                 instance = new PluginSettings();
             }
         }
     }
     return instance;
 }