// All buttons named ibtnSpec use the method Check, add the selected spec to the instance of Build,adds it to the-------
        // session, and calls the method that rebuilds the webpage with changes made. ------------------------------------------

        protected void ibtnSpec1_Click(object sender, ImageClickEventArgs e)
        {
            Check();
            myBuild.AddSpec("12");
            Session.Add("Build", myBuild.UpdateBuild());;
            FillPage();
        }
Beispiel #2
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++;
                }
            }
        }