コード例 #1
0
 protected AutoCatVrSupport(AutoCatVrSupport other) : base(other)
 {
     Filter = other.Filter;
     Prefix = other.Prefix;
     IncludedVrSupportFlags = other.IncludedVrSupportFlags;
     Selected = other.Selected;
 }
コード例 #2
0
        public override void LoadFromAutoCat(AutoCat autocat)
        {
            AutoCatVrSupport ac = autocat as AutoCatVrSupport;

            if (ac == null)
            {
                return;
            }

            txtPrefix.Text = ac.Prefix;

            foreach (ListViewItem item in lstVrHeadsets.Items)
            {
                item.Checked = ac.IncludedVrSupportFlags.Headsets.Contains(item.Text);
            }

            foreach (ListViewItem item in lstVrInput.Items)
            {
                item.Checked = ac.IncludedVrSupportFlags.Input.Contains(item.Text);
            }

            foreach (ListViewItem item in lstVrPlayArea.Items)
            {
                item.Checked = ac.IncludedVrSupportFlags.PlayArea.Contains(item.Text);
            }
        }
コード例 #3
0
        public static AutoCat LoadACFromXmlElement(XmlElement xElement)
        {
            string type = xElement.Name;

            switch (type)
            {
            case AutoCatGenre.TypeIdString:
                return(AutoCatGenre.LoadFromXmlElement(xElement));

            case AutoCatFlags.TypeIdString:
                return(AutoCatFlags.LoadFromXmlElement(xElement));

            case AutoCatTags.TypeIdString:
                return(AutoCatTags.LoadFromXmlElement(xElement));

            case AutoCatYear.TypeIdString:
                return(AutoCatYear.LoadFromXmlElement(xElement));

            case AutoCatUserScore.TypeIdString:
                return(AutoCatUserScore.LoadFromXmlElement(xElement));

            case AutoCatHltb.TypeIdString:
                return(AutoCatHltb.LoadFromXmlElement(xElement));

            case AutoCatManual.TypeIdString:
                return(AutoCatManual.LoadFromXmlElement(xElement));

            case AutoCatDevPub.TypeIdString:
                return(AutoCatDevPub.LoadFromXmlElement(xElement));

            case AutoCatGroup.TypeIdString:
                return(AutoCatGroup.LoadFromXmlElement(xElement));

            case AutoCatName.TypeIdString:
                return(AutoCatName.LoadFromXmlElement(xElement));

            case AutoCatVrSupport.TypeIdString:
                return(AutoCatVrSupport.LoadFromXmlElement(xElement));

            case AutoCatLanguage.TypeIdString:
                return(AutoCatLanguage.LoadFromXmlElement(xElement));

            case AutoCatCurator.TypeIdString:
                return(LoadFromXmlElement(xElement, typeof(AutoCatCurator)));

            case AutoCatPlatform.TypeIdString:
                return(LoadFromXmlElement(xElement, typeof(AutoCatPlatform)));

            case AutoCatHoursPlayed.TypeIdString:
                return(AutoCatHoursPlayed.LoadFromXmlElement(xElement));

            default:
                return(null);
            }
        }
コード例 #4
0
        public override void SaveToAutoCat(AutoCat autocat)
        {
            AutoCatVrSupport ac = autocat as AutoCatVrSupport;

            if (ac == null)
            {
                return;
            }

            ac.Prefix = txtPrefix.Text;

            ac.IncludedVrSupportFlags.Headsets.Clear();
            ac.IncludedVrSupportFlags.Input.Clear();
            ac.IncludedVrSupportFlags.PlayArea.Clear();

            foreach (ListViewItem i in lstVrHeadsets.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedVrSupportFlags.Headsets.Add(i.Text);
                }
            }

            foreach (ListViewItem i in lstVrInput.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedVrSupportFlags.Input.Add(i.Text);
                }
            }

            foreach (ListViewItem i in lstVrPlayArea.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedVrSupportFlags.PlayArea.Add(i.Text);
                }
            }
        }