Beispiel #1
0
        // A method that rebuilds the page from the data gotten out of the session, it resets the colors of the borders to  ----
        // black, then goes through the list<string> and changes the color of the bordercolor to lime for each item in the  ----
        // list. ---------------------------------------------------------------------------------------------------------------
        private void Check()
        {
            int counter = 0;

            foreach (string item in Build)
            {
                if (myBuild.SelectedClass == null)
                {
                    myBuild.AddClass(item);
                }
                else if (myBuild.SelectedSpec == null)
                {
                    myBuild.AddSpec(item);
                }
                else if (myBuild.SelectedSpells.Count < 7)
                {
                    myBuild.AddSpell(item, counter);
                    counter++;
                }
            }
        }
        // All buttons named ibtnName create an instance of the class Class, get the tooltips from the database, adds the -
        // selection to the instance of Build, adds it in the session and as last point triggers the method for rebuilding-
        // the page with the new changes made -----------------------------------------------------------------------------

        protected void ibtnDeathKnight_Click(object sender, ImageClickEventArgs e)
        {
            Class DeathKnight = new Class("1");

            SetToolTips(DeathKnight.PossibleSpecs);
            ibtnDeathKnight.ToolTip = DeathKnight.Tooltip;
            myBuild.AddClass(DeathKnight.Name);
            Session.Add("Build", myBuild.UpdateBuild());
            FillPage();
        }