public Language(Konfiguration cfg, Logger log) { this.config = cfg; this.logger = log; this.parser = new LanguageParser(this.config, this.logger); }
public Worker(Konfiguration cfg, Logger log, Language lang, Outlook.Application objOutlook) { Forms.Application.EnableVisualStyles(); Forms.Application.DoEvents(); this.config = cfg; this.logger = log; this.language = lang; this.outlook = objOutlook; this.mailparser = new MailParser(this.logger, this.outlook, this); this.mailparser.resetAutotraining(this.config.UseAutoTrain, this.config.AutoTraining_Spam, this.config.AutoTraining_Ham); this.config.SettingsChanged += config_SettingsChanged; }
public Connect() { String tmpPath = System.IO.Path.GetTempPath(); if (tmpPath.EndsWith(@"\") == false) { tmpPath += @"\"; } tmpPath += "dspam-addin.txt"; try { this.logger = new Logger(tmpPath); this.konfiguration = new Konfiguration(@"dspam_config.xml", this.logger); this.konfiguration.Load(); this.language = new Language(this.konfiguration, this.logger); this.language.Load(); } catch (Exception ex) { // errForm ef = new errForm(this.language, @"can't create file '" + tmpPath + "' for logging:" + Environment.NewLine + ex.Message + Environment.NewLine + ex.StackTrace); } }
public Worker(Konfiguration cfg, Logger log, Language lang) : this(cfg, log, lang, new Outlook.Application()) { }