コード例 #1
0
        internal static SearchCriteriaXmlSettings ToXml(SearchCriteriaSettings setting)
        {
            var criteria = new ArrayList();
            foreach (var child in setting.Items.OfType<SearchSubrecord>().Where(x => x.Checked))
            {
                criteria.Add(new SearchSubrecordXml { SubRecord = child.Record.name, Type = child.Type });
            }

            foreach (var elem in setting.Items.OfType<SearchElement>().Where(x => x.Checked))
            {
                var par = elem.Parent;
                criteria.Add(new SearchElementXml { SubRecord = par.Record.name, Element = elem.Record.name, Type = elem.Type, Value = elem.Value != null ? elem.Value.ToString() : null });
            }

            return new SearchCriteriaXmlSettings { Name = setting.ToString(), Type = setting.Type, Items = criteria.ToArray() };
        }
コード例 #2
0
        public static SearchCriteriaXmlSettings ToXml(SearchCriteriaSettings setting)
        {
            var criteria = new ArrayList();

            foreach (var child in setting.Items.OfType <SearchSubrecord>().Where(x => x.Checked))
            {
                criteria.Add(new SearchSubrecordXml {
                    SubRecord = child.Record.name, Type = child.Type
                });
            }

            foreach (var elem in setting.Items.OfType <SearchElement>().Where(x => x.Checked))
            {
                var par = elem.Parent;
                criteria.Add(new SearchElementXml {
                    SubRecord = par.Record.name, Element = elem.Record.name, Type = elem.Type, Value = elem.Value != null ? elem.Value.ToString() : null
                });
            }

            return(new SearchCriteriaXmlSettings {
                Name = setting.ToString(), Type = setting.Type, Items = criteria.ToArray()
            });
        }
コード例 #3
0
ファイル: RecordSearchForm.cs プロジェクト: rxantos/tesv-snip
 internal void SetSearchCriteria(SearchCriteriaSettings settings, bool doSearch)
 {
     this.subrecordPanel.SetSearchCriteria(settings, doSearch);
 }