Example #1
0
        public static WebSiteModel CreateModel(List<UrlModel> downloadUrls, RuleModel rule, 
                                                Uri sourceAddress)
        {
            WebSiteModel model = new WebSiteModel();

            model.DownloadUrls = downloadUrls;
            model.Rule = rule;
            model.SourceAddress = sourceAddress;

            return model;
        }
Example #2
0
        public static RuleModel CreateModel(string titleXPath, string articleXPath, string typeXPath, 
                                            string recomendXPath , string summaryXPath, string imageXPath, 
                                            string createdXPath)
        {
            RuleModel model = new RuleModel();

            model.TitleXPath = titleXPath;
            model.ArticleXPath = articleXPath;
            model.TypeXPath = titleXPath;
            model.RecomendXPath = recomendXPath;
            model.SummaryXPath = summaryXPath;
            model.ImageXPath = imageXPath;
            model.CreatedXPath = createdXPath;

            return model;
        }
Example #3
0
 public Rule()
 {
     DataContext = this;
     _selectedRule = new RuleModel();
 }
Example #4
0
 private void Remove()
 {
     Device.RuleCollection.Remove(_selectedRule);
     SelectedRule = Device.RuleCollection.FirstOrDefault();
 }
Example #5
0
 private void AddNew()
 {
     var newRule = new RuleModel() {};
     Device.RuleCollection.Add(newRule);
     SelectedRule = newRule;
     IsEditMode = true;
 }
 private void AddOutMessageQueue(RuleModel rule)
 {
     Thread.Sleep(rule.Interval);
     AccessFormMarshal("AppendToMonitorOutput", rule.OutMessage);
 }