示例#1
0
        public void Save(XElement e)
        {
            XElement elemGameSetting = new XElement("GameSetting");

            e.Add(elemGameSetting);

            XElement   elem  = new XElement("OurTeamOffensive");
            XAttribute attri = new XAttribute("Value", OurTeamOffensive.ToString());

            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("Scaling");
            attri = new XAttribute("Value", Scaling.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            // 11-09-2010 Scott
            elem  = new XElement("ScalingAnimation");
            attri = new XAttribute("Value", ScalingAnimation.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            // 10-08-2010 Scott
            elem  = new XElement("OffensiveMainField");
            attri = new XAttribute("Value", OffensiveMainField.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("OffensiveSubField");
            attri = new XAttribute("Value", OffensiveSubField.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("DefensiveMainField");
            attri = new XAttribute("Value", DefensiveMainField.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("DefensiveSubField");
            attri = new XAttribute("Value", DefensiveSubField.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            // 10-26-2011 Scott
            elem  = new XElement("KickMainField");
            attri = new XAttribute("Value", KickMainField.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("KickSubField");
            attri = new XAttribute("Value", KickSubField.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);
            // end

            elem  = new XElement("UserFolder");
            attri = new XAttribute("Value", UserFolder);
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("UserType");
            attri = new XAttribute("Value", UserType.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("ProductType");
            attri = new XAttribute("Value", ProductType.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("PlaygroundType");
            attri = new XAttribute("Value", PlaygroundType.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("CurrentTheme");
            attri = new XAttribute("Value", CurrentTheme);
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("GridLine");
            attri = new XAttribute("Value", GridLine.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("SnapValue");
            attri = new XAttribute("Value", SnapValue.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("SnapToGrid");
            attri = new XAttribute("Value", SnapToGrid.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("ShowBall");
            attri = new XAttribute("Value", ShowBall.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("BallSize");
            attri = new XAttribute("Value", BallSize.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("Landscape");
            attri = new XAttribute("Value", Landscape.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("ShowPlayground");
            attri = new XAttribute("Value", ShowPlayground.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("EnableColor");
            attri = new XAttribute("Value", EnableColor.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("EnableSymbolColor");
            attri = new XAttribute("Value", EnableSymbolColor.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("EnableTitle");
            attri = new XAttribute("Value", EnableTitle.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("PlayerAngle");
            attri = new XAttribute("Value", PlayerAngle.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("PlayerAppearance");
            attri = new XAttribute("Value", PlayerAppearance.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("PlayerDash");
            attri = new XAttribute("Value", PlayerDash.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("PlayerSzie");
            attri = new XAttribute("Value", PlayerSize.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("PlayerTextVisibility");
            attri = new XAttribute("Value", PlayerTextVisibility.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("PlayerThickness");
            attri = new XAttribute("Value", PlayerThickness.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("ImageShowPlayground");
            attri = new XAttribute("Value", ImageShowPlayground.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("ImageEnableColor");
            attri = new XAttribute("Value", ImageEnableColor.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);

            elem  = new XElement("ImageEnableSymbolColor");
            attri = new XAttribute("Value", ImageEnableSymbolColor.ToString());
            elem.Add(attri);
            elemGameSetting.Add(elem);
        }