Пример #1
0
        //public Condition(Nullable<OldPolishVowels> oldPolishVowel = null, Nullable<ContextType> contextType = null, Nullable<ExcerptNo> excerptNo = null, Nullable<Age> age = null, Nullable<Education> education = null, Nullable<PlaceType> placeType = null, Nullable<DwellingTime> dwellingTime = null, Nullable<ParentsOrigin> parentOrigin = null)
        //{
        //    this.OldPolishVowel = oldPolishVowel.HasValue ? oldPolishVowel.Value : OldPolishVowels.allVowels;
        //    this.ContextType = contextType.HasValue ? contextType.Value : Phonetics.Enums.ContextType.unspecified;

        //    this.ExcerptNo = excerptNo.HasValue ? excerptNo.Value : ExcerptNo.bothExcerpts;

        //    this.Age = age.HasValue ? age.Value : Age.noInformation;
        //    this.Education = education.HasValue ? education.Value : Education.noInformation;
        //    this.PlaceType = placeType.HasValue ? placeType.Value : PlaceType.noInformation;
        //    this.DwellingTime = dwellingTime.HasValue ? dwellingTime.Value : DwellingTime.noInformation;
        //    this.ParentOrigin = parentOrigin.HasValue ? parentOrigin.Value : ParentsOrigin.noInformation;

        //}


        public Condition(Nullable <OldPolishVowels> oldPolishVowel = null, Nullable <ContextType> contextType = null,
                         Nullable <ExcerptNo> excerptNo            = null, Nullable <Age> age = null, Nullable <Education> education = null, Nullable <PlaceType> placeType = null, Nullable <DwellingTime> dwellingTime = null, Nullable <ParentsOrigin> parentOrigin = null, Nullable <MorphCategory> morphCategory = null)
        {
            this.OldPolishVowel = oldPolishVowel.HasValue ? oldPolishVowel.Value : OldPolishVowels.allVowels;
            this.ContextType    = contextType.HasValue ? contextType.Value : Phonetics.Enums.ContextType.unspecified;

            this.MorphCategory = morphCategory.HasValue ? morphCategory.Value : MorphCategory.inne;

            this.ExcerptNo = excerptNo.HasValue ? excerptNo.Value : ExcerptNo.bothExcerpts;

            this.Age          = age.HasValue ? age.Value : Age.noInformation;
            this.Education    = education.HasValue ? education.Value : Education.noInformation;
            this.PlaceType    = placeType.HasValue ? placeType.Value : PlaceType.noInformation;
            this.DwellingTime = dwellingTime.HasValue ? dwellingTime.Value : DwellingTime.noInformation;
            this.ParentOrigin = parentOrigin.HasValue ? parentOrigin.Value : ParentsOrigin.noInformation;
        }
Пример #2
0
            public void AddMorph(DAZMorph morph, string path, string parentPath)
            {
                var slash = path.IndexOf("/");

                if (slash == -1)
                {
                    DoAddMorph(morph, parentPath);
                }
                else
                {
                    string subcatName = path.Substring(0, slash).Trim();

                    if (subcatName == "")
                    {
                        // collapse slashes and add morphs in this category
                        AddMorph(morph, path.Substring(slash + 1), parentPath);
                        return;
                    }

                    string subcatPath = parentPath;

                    if (subcatPath != "")
                    {
                        subcatPath += "/";
                    }

                    subcatPath += subcatName;

                    MorphCategory subcat;
                    if (!children_.TryGetValue(subcatPath, out subcat))
                    {
                        subcat = new MorphCategory(subcatPath, flags_, mc_);
                        children_.Add(subcatPath, subcat);
                    }

                    subcat.AddMorph(morph, path.Substring(slash + 1), subcatPath);
                }
            }
Пример #3
0
        public MorphCheckboxes(
            string name, MorphsCallback addedCallback,
            MorphsCallback removedCallback, int flags = 0)
            : base(flags)
        {
            name_            = name;
            addedCallback_   = addedCallback;
            removedCallback_ = removedCallback;
            root_            = new MorphCategory(name_, flags_, this);
            search_          = new Textbox("Search", "", SearchChanged, flags_);
            search_.Height   = 100;

            show_ = new StringList(
                "Show", "all",
                new List <string>()
            {
                "All", "Morphs", "Poses"
            },
                new List <string>()
            {
                "all", "morphs", "poses"
            },
                ShowChanged, flags_);
        }