Exemple #1
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <ODF_Char> Characters = new List <ODF_Char>();
            List <OCC_Char> Colors     = new List <OCC_Char>();
            List <OCO_Char> Costumes   = new List <OCO_Char>();
            List <OCS_Char> Skills     = new List <OCS_Char>();
            List <OCP_Char> Parameters = new List <OCP_Char>();
            List <OCT_Char> Talismans  = new List <OCT_Char>();

            for (int i = 0; i < partners.Count; i++)
            {
                ODF_Char n1 = new ODF_Char();
                n1.id   = partners[i].id;
                n1.data = partners[i].character;
                Characters.Add(n1);

                OCC_Char n2 = new OCC_Char();
                n2.id   = partners[i].id;
                n2.data = partners[i].color;
                Colors.Add(n2);

                OCO_Char n3 = new OCO_Char();
                n3.id      = partners[i].id;
                n3.data    = partners[i].costume;
                n3.enabled = partners[i].CostumeEnabled;
                Costumes.Add(n3);

                OCS_Char n4 = new OCS_Char();
                n4.id    = partners[i].id;
                n4.type0 = partners[i].type0;
                n4.type1 = partners[i].type1;
                n4.type2 = partners[i].type2;
                n4.type3 = partners[i].type3;
                Skills.Add(n4);

                OCP_Char n5 = new OCP_Char();
                n5.id   = partners[i].id;
                n5.data = partners[i].parameters;
                Parameters.Add(n5);

                OCT_Char n6 = new OCT_Char();
                n6.id   = partners[i].id;
                n6.data = partners[i].talisman;
                Talismans.Add(n6);
            }

            ODF.Write(PartnerFolder + "OriginalCharacterDefaultTable.odf", Characters);
            OCC.Write(PartnerFolder + "MenuColorPartsCustomList.occ", Colors);
            OCO.Write(PartnerFolder + "MenuCostumeCustomList.oco", Costumes);
            OCS.Write(PartnerFolder + "MenuSkillCustomList.ocs", Skills);
            OCP.Write(PartnerFolder + "MenuParamaterCustomList.ocp", Parameters);
            OCT.Write(PartnerFolder + "MenuTalismanCustomList.oct", Talismans);
        }
Exemple #2
0
        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog browseFolder = new FolderBrowserDialog();

            browseFolder.Description = "Find chara_custom Folder";
            if (browseFolder.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            partners      = new List <Partner_Data>();
            PartnerFolder = browseFolder.SelectedPath + "\\";
            List <ODF_Char> Characters = ODF.Read(PartnerFolder + "OriginalCharacterDefaultTable.odf");
            List <OCC_Char> Colors     = OCC.Read(PartnerFolder + "MenuColorPartsCustomList.occ");
            List <OCO_Char> Costumes   = OCO.Read(PartnerFolder + "MenuCostumeCustomList.oco");
            List <OCS_Char> Skills     = OCS.Read(PartnerFolder + "MenuSkillCustomList.ocs");
            List <OCP_Char> Parameters = OCP.Read(PartnerFolder + "MenuParamaterCustomList.ocp");
            List <OCT_Char> Talismans  = OCT.Read(PartnerFolder + "MenuTalismanCustomList.oct");

            for (int i = 0; i < Characters.Count; i++)
            {
                Partner_Data p = new Partner_Data();
                p.id             = Characters[i].id;
                p.character      = Characters[i].data;
                p.color          = Colors[i].data;
                p.CostumeEnabled = Costumes[i].enabled;
                p.costume        = Costumes[i].data;
                p.type0          = Skills[i].type0;
                p.type1          = Skills[i].type1;
                p.type2          = Skills[i].type2;
                p.type3          = Skills[i].type3;
                p.parameters     = Parameters[i].data;
                p.talisman       = Talismans[i].data;
                partners.Add(p);
            }

            cbPartners.Items.Clear();
            for (int i = 0; i < partners.Count; i++)
            {
                cbPartners.Items.Add(partners[i].id);
            }
        }
Exemple #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            s.Read();
            if (Directory.Exists(s.XENOFolder + "data\\system\\chara_custom"))
            {
                partners      = new List <Partner_Data>();
                PartnerFolder = s.XENOFolder + "data\\system\\chara_custom\\";
                List <ODF_Char> Characters = ODF.Read(PartnerFolder + "OriginalCharacterDefaultTable.odf");
                List <OCC_Char> Colors     = OCC.Read(PartnerFolder + "MenuColorPartsCustomList.occ");
                List <OCO_Char> Costumes   = OCO.Read(PartnerFolder + "MenuCostumeCustomList.oco");
                List <OCS_Char> Skills     = OCS.Read(PartnerFolder + "MenuSkillCustomList.ocs");
                List <OCP_Char> Parameters = OCP.Read(PartnerFolder + "MenuParamaterCustomList.ocp");
                List <OCT_Char> Talismans  = OCT.Read(PartnerFolder + "MenuTalismanCustomList.oct");

                for (int i = 0; i < Characters.Count; i++)
                {
                    Partner_Data p = new Partner_Data();
                    p.id             = Characters[i].id;
                    p.character      = Characters[i].data;
                    p.color          = Colors[i].data;
                    p.CostumeEnabled = Costumes[i].enabled;
                    p.costume        = Costumes[i].data;
                    p.type0          = Skills[i].type0;
                    p.type1          = Skills[i].type1;
                    p.type2          = Skills[i].type2;
                    p.type3          = Skills[i].type3;
                    p.parameters     = Parameters[i].data;
                    p.talisman       = Talismans[i].data;
                    partners.Add(p);
                }

                cbPartners.Items.Clear();
                for (int i = 0; i < partners.Count; i++)
                {
                    cbPartners.Items.Add(partners[i].id);
                }
            }
        }
Exemple #4
0
        public override XmlElement Export(XmlDocument doc, XmlElement parent)
        {
            XmlElement current = base.Export(doc, parent);

            if (ActiveFrom != null)
            {
                current.SetAttribute("ACTIVE_FROM", ActiveFrom.ToString());
            }
            if (ActiveTill != null)
            {
                current.SetAttribute("ACTIVE_TILL", ActiveTill.ToString());
            }
            if (Confcal != null)
            {
                current.SetAttribute("CONFCAL", Confcal.ToString());
            }
            if (Date != null)
            {
                current.SetAttribute("DATE", Date.ToString());
            }
            if (Days != null)
            {
                current.SetAttribute("DAYS", Days.ToString());
            }
            if (DaysAndOr != null)
            {
                current.SetAttribute("DAYS_AND_OR", DaysAndOr.ToString());
            }
            if (DaysCal != null)
            {
                current.SetAttribute("DAYSCAL", DaysCal.ToString());
            }
            if (Level != null)
            {
                current.SetAttribute("LEVEL", Level.ToString());
            }
            if (MaxWait != null)
            {
                current.SetAttribute("MAXWAIT", MaxWait.ToString());
            }
            if (Retro != null)
            {
                current.SetAttribute("RETRO", Retro.ToString());
            }
            if (Shift != null)
            {
                current.SetAttribute("SHIFT", Shift.ToString());
            }
            if (ShiftNum != null)
            {
                current.SetAttribute("SHIFTNUM", ShiftNum.ToString());
            }
            if (TagsActiveFrom != null)
            {
                current.SetAttribute("TAGS_ACTIVE_FROM", TagsActiveFrom.ToString());
            }
            if (TagsActiveTill != null)
            {
                current.SetAttribute("TAGS_ACTIVE_TILL", TagsActiveTill.ToString());
            }
            if (WeekDays != null)
            {
                current.SetAttribute("WEEKDAYS", WeekDays.ToString());
            }
            if (Weekscal != null)
            {
                current.SetAttribute("WEEKSCAL", Weekscal.ToString());
            }
            if (JAN != null)
            {
                current.SetAttribute("JAN", JAN.ToString());
            }
            if (FEB != null)
            {
                current.SetAttribute("FEB", FEB.ToString());
            }
            if (MAR != null)
            {
                current.SetAttribute("MAR", MAR.ToString());
            }
            if (APR != null)
            {
                current.SetAttribute("APR", APR.ToString());
            }
            if (MAY != null)
            {
                current.SetAttribute("MAY", MAY.ToString());
            }
            if (JUN != null)
            {
                current.SetAttribute("JUN", JUN.ToString());
            }
            if (JUL != null)
            {
                current.SetAttribute("JUL", JUL.ToString());
            }
            if (AUG != null)
            {
                current.SetAttribute("AUG", AUG.ToString());
            }
            if (SEP != null)
            {
                current.SetAttribute("SEP", SEP.ToString());
            }
            if (OCT != null)
            {
                current.SetAttribute("OCT", OCT.ToString());
            }
            if (NOV != null)
            {
                current.SetAttribute("NOV", NOV.ToString());
            }
            if (DEC != null)
            {
                current.SetAttribute("DEC", DEC.ToString());
            }
            return(current);
        }