コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Get or create the current GameBits Repository and load the xml file
            XmlProvider provider = new XmlProvider(Repository.GetCurrentRepository(), filePath);

            Repository.Connect(provider);

            // Bind tables to UI components
            Monsters1.SetDataSource("Monsters Table 1");
            Monsters2.SetDataSource("Monsters Table 2");
            Villagers1.SetDataSource("Villagers Table 1");
            DataBind();
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Establish a GameBitsSession by calling the static Connect method;
            // In the future this will involve some kind of user authentication
            bits = GameBitsSession.Connect(filePath);                   //"c:\\temp\\TestSave.xml");

            // Bind tables to UI components
            Monsters1.SetDataSource(bits, "Monsters Table 1");
            Monsters2.SetDataSource(bits, "Monsters Table 2");
            Villagers1.SetDataSource(bits, "Villagers Table 1");
            Treasures1.SetDataSource(bits, "Treasure Table 1");
            Gems0.SetDataSource(bits, "Gems and Jewels Table");
            Gems1.SetDataSource(bits, "Ornamental Stones");
            Gems2.SetDataSource(bits, "Semi-Precious Stones");
            Gems3.SetDataSource(bits, "Fancy Stones");
            Gems4.SetDataSource(bits, "Precious Stones");
            Gems5.SetDataSource(bits, "Gems");
            Gems6.SetDataSource(bits, "Jewels");
            DataBind();
        }