Пример #1
0
        public void InitToastUsingName(MyToast toast, List <Word> words)
        {
            foreach (var action in toast.ActionList)
            {
                action.Pointer = EncodingWordHelper.SearchSameWord(words, action.Name);
            }

            foreach (var visual in toast.VisualList)
            {
                visual.Pointer = EncodingWordHelper.SearchSameWord(words, visual.Name);
            }
        }
Пример #2
0
        public void InitUstingName()
        {
            foreach (CrawlingAndIndexs crawling in crawlings)
            {
                foreach (var other in crawling.Crawling.OtherCrawlingList)
                {
                    try
                    {
                        other.CrawlingPointer = crawlings.First(x => x.Crawling.Name == other.CrawlingName).Crawling;
                    }
                    catch
                    {
                        other.CrawlingPointer = new Crawling();
                    }

                    other.UrlOption.Pointer = EncodingWordHelper.SearchSameWord(
                        crawling.Crawling.WordList,
                        other.UrlOption.Name);
                }

                foreach (var action in crawling.Crawling.ActionList)
                {
                    switch (action.ActionType)
                    {
                    case Enums.BaseActionType.NOTIFITY:
                        InitToastUsingName(
                            action as MyToast,
                            crawling.Crawling.WordList
                            .Concat(crawling.Crawling.OtherCrawlingList
                                    .SelectMany(x => x.CrawlingPointer.WordList)
                                    .Select(c => c)).ToList());
                        break;
                    }
                }
            }
        }