コード例 #1
0
 protected void ibtnMonk_Click(object sender, ImageClickEventArgs e)
 {
     Class Monk = new Class("5");
     SetToolTips(Monk.PossibleSpecs);
     ibtnDruid.ToolTip = Monk.Tooltip;
     myBuild.AddClass(Monk.Name);
     Session.Add("Build", myBuild.UpdateBuild());
     FillPage();
 }
コード例 #2
0
 // 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();
 }
コード例 #3
0
 protected void ibtnHunter_Click(object sender, ImageClickEventArgs e)
 {
     Class Hunter = new Class("3");
     SetToolTips(Hunter.PossibleSpecs);
     ibtnDruid.ToolTip = Hunter.Tooltip;
     myBuild.AddClass(Hunter.Name);
     Session.Add("Build", myBuild.UpdateBuild());
     FillPage();
 }
コード例 #4
0
 protected void ibtnPaladin_Click(object sender, ImageClickEventArgs e)
 {
     Class Paladin = new Class("6");
     SetToolTips(Paladin.PossibleSpecs);
     ibtnDruid.ToolTip = Paladin.Tooltip;
     myBuild.AddClass(Paladin.Name);
     Session.Add("Build", myBuild.UpdateBuild());
     FillPage();
 }
コード例 #5
0
 protected void ibtnWarrior_Click(object sender, ImageClickEventArgs e)
 {
     Class Warrior = new Class("11");
     SetToolTips(Warrior.PossibleSpecs);
     ibtnWarrior.ToolTip = Warrior.Tooltip;
     myBuild.AddClass(Warrior.Name);
     Session.Add("Build", myBuild.UpdateBuild());
     FillPage();
 }
コード例 #6
0
 protected void ibtnRogue_Click(object sender, ImageClickEventArgs e)
 {
     Class Rogue = new Class("8");
     SetToolTips(Rogue.PossibleSpecs);
     ibtnDruid.ToolTip = Rogue.Tooltip;
     myBuild.AddClass(Rogue.Name);
     Session.Add("Build", myBuild.UpdateBuild());
     FillPage();
 }
コード例 #7
0
        // A method that gets the Specialization tooltips of the given class and returns them to a List<string> -------------------
        public List<string> GetToolTips(Class Class)
        {
            Open();

            string sql = "SELECT TOOLTIP FROM SPECIALIZATION WHERE CLASSNAME = " + Class.Name;
            OleDbCommand Command = new OleDbCommand(sql, connection);
            List<string> mytooltips = new List<string>();

            try
            {
                OleDbDataReader Reader = Command.ExecuteReader();

                while (Reader.Read())
                {
                    mytooltips.Add(Convert.ToString(Reader["TOOLTIP"]));
                }
            }
            catch
            {

            }
            Close();
            return mytooltips;
        }
コード例 #8
0
        // A method that gets the Class Tooltip of given Class  and returns it as a string -------------------------------------
        public string GetToolTip(Class Class)
        {
            Open();
            string sql = "SELECT TOOLTIP FROM CLASS WHERE CLASSNAME = " + Class.Name;
            OleDbCommand Command = new OleDbCommand(sql, connection);
            string Tooltip = "";

            try
            {
                OleDbDataReader Reader = Command.ExecuteReader();

                while (Reader.Read())
                {
                    Tooltip = Reader["TOOLTIP"].ToString();
                }
            }
            catch
            {

            }
            return Tooltip;
        }
コード例 #9
0
        // A method that gets the 3 tooltips of the specialization of the given class and returns it as a string[] -------------
        public string[] GetSpecialization(Class Class)
        {
            Open();
            string name = Class.Name;
            string sql = "SELECT TOOLTIP FROM SPECIALIZATION WHERE CLASSNAME = " + name;
            OleDbCommand Command = new OleDbCommand(sql, connection);
            string[] mySpecs = new string[3];

            try
            {
                OleDbDataReader Reader = Command.ExecuteReader();

                while (Reader.Read())
                {
                    if (mySpecs[0] == null)
                    {
                        mySpecs[0] = (Convert.ToString(Reader["TOOLTIP"]));
                    }
                    else if (mySpecs[1] == null)
                    {
                        mySpecs[1] = (Convert.ToString(Reader["TOOLTIP"]));
                    }
                    else if (mySpecs[2] == null)
                    {
                        mySpecs[2] = (Convert.ToString(Reader["TOOLTIP"]));
                    }
                }
            }
            catch
            {

            }
            Close();
            return mySpecs;
        }