Пример #1
0
 public Person(string _login, string _password, string _country, string _age)
 {
     login = _login;
     password = _password;
     age = _age;
     country = _country;
     glib = new GameLibrary();
 }
Пример #2
0
 public Person()
 {
     glib = new GameLibrary();
     login = "";
     password = "";
     age = "";
     country = "";
 }
Пример #3
0
 public Person(string _login, string _password, string _country, string _age)
 {
     login = _login;
     password = _password;
     age = _age;
     country = _country;
     iGlib = new List<Indie>();
     glib = new GameLibrary();
     security = "user";
 }
Пример #4
0
 public Person()
 {
     glib = new GameLibrary();
     iGlib = new List<Indie>();
     login = "";
     password = "";
     age = "";
     country = "";
     security = "user";
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Person"/> class.
 /// </summary>
 public Person()
 {
     this.glib = new GameLibrary();
     this.indieGlib = new List<Indie>();
     this.login = string.Empty;
     this.password = string.Empty;
     this.age = string.Empty;
     this.country = string.Empty;
     this.security = "user";
     this.time = new DateTime();
     this.avatar = string.Empty;
 }
Пример #6
0
        public ShopForm(ShopControl _sControl, Person _user, Library _libr)
        {
            icons       = new List <PictureBox>();
            indies      = new List <Indie>();
            newgameList = new List <Label>();
            glibr       = new GameLibrary();
            glibr.Add(new Game("Team Fortress 2"));
            glibr.Add(new Game("Star Craft 2"));
            glibr.Add(new Game("Half life 2"));
            glibr.Add(new Game("Portal"));
            glibr.Add(new Game("World of Warcraft"));
            glibr.Add(new Game("Heroes 6"));
            glibr.Add(new Game("Dark Sides 2"));
            glibr.Add(new Game("Black Mesa"));
            glibr.Add(new Game("Dota2"));
            glibr.Add(new Game("Witcher"));
            glibr.Add(new Game("Battle Field 3"));
            glibr.Add(new Game("Diablo 3"));
            libr     = _libr;
            user     = _user;
            sControl = _sControl;
            InitializeComponent();
            tabControl1.DrawItem += new DrawItemEventHandler(tabControl1_DrawItem);
            t1           = new List <string>();
            t2           = new List <string>();
            t3           = new List <string>();
            label1.Text  = "Hello,";
            label1.Text += sControl.onLoadShop();
            pblist       = new List <PictureBox>();
            pblist1      = new List <PictureBox>();
            llist        = new List <Label>();
            n            = 0;
            pblist.Add(pictureBox6);
            pblist.Add(pictureBox7);
            pblist.Add(pictureBox8);
            pblist.Add(pictureBox9);
            pblist.Add(pictureBox10);
            pblist.Add(pictureBox11);
            pblist.Add(pictureBox12);
            pblist.Add(pictureBox13);
            pblist.Add(pictureBox14);
            pblist.Add(pictureBox15);
            pblist.Add(pictureBox16);
            pblist.Add(pictureBox17);
            koeficient = (int)(SystemInformation.PrimaryMonitorSize.Height / 1024);
            List <string> text = new List <string>();

            text.Add("Team Fortress 2 - innovating roleplay shooter.\n In game you can choose one of 8 roles. \n medic,heavy,scout,demoman,soldair,engineer,spy, and sniper.\n Each of them has own changeble weapons and history. \n There are lots of different types and game modes,maps and missions.\n You will be defending castles, deathmatching, storming and capturing flags!\n\n\n So if you want to have fun in Team fortress 2 order it now.");
            text.Add("StarCraft 2 - Chalenging RTS, next chapter of SC\n Nowadays SC2 is the most popular eSport game\n Most exciting game tournaments, epic battles and mindgames are here\n\n For people who came to see next chapter of Raynor's story Starcraft2 \n has a lot to see nad play in new campaign. \n There are still 3 different sides in space war: Zergs,Protoss,Terran\n You will be excited by comanding space marines \n or invading worlds with your swarm \n\n\n So if you want to have fun in Starcraft 2 order it now.");
            text.Add("Half-Life 2: Episode Two is a first-person shooter video game \n the second episode in a series of sequels to the 2004 Half-Life 2. \n It was developed by Valve Corporation in tandem with Episode One, \n the first game in the series, and released in 2007 \n via Valve's Steam content distribution platform. \n The episode was released both separately and as a part of a bundled package \n The Orange Box. \n\n\n So if you want to play Half life,order it now.");
            text.Add("Portal is a 2007 single-player first-person puzzle-platform video game \n developed by Valve Corporation. \n The game was released in a bundle package called The Orange Box \n for Microsoft Windows and Xbox 360 on October 9, 2007,\n and for the PlayStation 3 on December 11, 2007. \n The Windows version of the game is available for download \n separately through Valve's content delivery system Steam \n and was released as a standalone retail product on April 9, 2008.\n A standalone version called Portal: Still Alive \n was released on the Xbox Live Arcade service on October 22, 2008;\n this version includes an additional 14 puzzles. \n A Mac OS X version was released as part of the Mac-compatible Steam \n\n\n So if you want to play Portal, order it now!");
            text.Add("World of Warcraft (often abbreviated as WoW)\n is a massively multiplayer online role-playing game \n It is the fourth released game set in the fantasy Warcraft universe,\n which was first introduced by Warcraft:\n Orcs & Humans in 1994.\n World of Warcraft takes place within the Warcraft world of Azeroth,\n approximately four years after the events at the conclusion \n of Blizzard's previous Warcraft release, Warcraft III: The Frozen Throne \n\n\n  So if you want to have fun in WoW order it now.");
            text.Add("Might & Magic Heroes VI is a turn-based strategy video game \n for Microsoft Windows developed by Black Hole Entertainment \n and published by Ubisoft. \n It is the sixth installment in the Heroes of Might and Magic series,\n and was released on October 13, 2011, \n coinciding with the 25th anniversary of the Might and Magic franchise. \n Heroes VI acts as a prequel to Heroes of Might and Magic V,\n occurring almost five centuries earlier, \n and is set in the fictional world of Ashan. \n The story follows the five heirs to the Griffin dynasty \n in their quests to repel a demon invasion and assist  \n or impede Michael, a legendary Archangel general plotting \n to revive an ancient war.\n\n\n So if you want to play Heroes6 , order it now!");
            text.Add("Darksiders II is an action-adventure and action role-playing game \n developed by Vigil Games and published by THQ. \n It is the sequel to Darksiders\n and was released in August 2012 for PlayStation 3,\n Xbox 360, Microsoft Windows, with a Wii U port scheduled \n later in the year.\n\n\nSo if you want to play Darksides2 , order it now!");
            text.Add("Black Mesa (previously known as Black Mesa: Source) \n is a third-party total conversion modification  \n for Valve Corporation's Source engine. \n The stated goal of the project is to recreate Valve's critically acclaimed \n 1998 video game Half-Life using the more advanced capabilities \n of the Source engine. The 40-person volunteer development team says they \n hope to create a more engrossing in-game world with more varied, \n complex environments and more challenging, realistic gameplay. \n\n\n So if you want to play BlackMesa, order it now!");
            text.Add("Dota 2 is an upcoming multiplayer online battle arena video game \n being developed by Valve Corporation and the stand-alone sequel to popular \n Defense of the Ancients mod for Warcraft III: Reign of Chaos \n and its expansion pack, The Frozen Throne. \n Formally announced on October 13, 2010, via Game Informer, \n the game is currently available for early test access purchase \n and is scheduled for a full release in 2012, \n with a free-to-play business model.\n\n\n So if you want to play Dota2 ,order it now!");
            text.Add("The Witcher is an action role-playing video game  \n developed by CD Projekt RED and published by Atari. \n The game is based on the book series by Polish author Andrzej Sapkowski.\n The Witcher takes place in a medieval fantasy world and follows the story of Geralt, \n one of a few remaining witchers – traveling monster hunter for hire,\n gifted with unnatural powers. The game's system of 'moral choices' \n as part of the storyline was noted for its time-delayed \n consequences and lack of black-and-white morality.\n\n\n So if you want ot play Witcher, order it now!");
            text.Add("Battlefield 3 (commonly abbreviated BF3) is a first-person shooter video game \n developed by EA Digital Illusions CE and published by Electronic Arts.\n It is a direct sequel to 2005's Battlefield 2, \n and the twelfth installment in the Battlefield franchise. \n\n\n So if you want to play Battle field 3 - order it now!");
            text.Add("Diablo III is an action role-playing hack and slash video game \n developed and published by Blizzard Entertainment. \n It is the third installment in the Diablo franchise.\n The game, which features elements of the hack and slash genre, \n was released in North America, Latin America, Europe, South Korea, and Taiwan\n  on May 15, 2012, and in Russia on June 7, 2012.\n Before its release, the game broke several presale records \n and became the most pre-ordered PC game to date on Amazon.com.\n Diablo III subsequently set the new all-time record \n for fastest-selling PC game by selling over 3.5 million copies  \n in the first 24 hours of its release. \n\n\n So by it immidiately !!!");
            if (user.Security != "developer")
            {
                this.label18.Hide();
            }

            this.label1.Location      = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 200), 100);
            this.label2.Location      = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 200), 120);
            this.label16.Location     = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 20), 10);
            this.label15.Location     = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 40), 10);
            this.tabControl1.Location = new System.Drawing.Point((int)((SystemInformation.PrimaryMonitorSize.Width - (SystemInformation.PrimaryMonitorSize.Height * 1.25 * 0.728)) / 2), (int)(SystemInformation.PrimaryMonitorSize.Height * 0.205));
            this.tabControl1.Size     = new System.Drawing.Size((int)(SystemInformation.PrimaryMonitorSize.Height * 1.25 * 0.728), (int)(SystemInformation.PrimaryMonitorSize.Height * 0.72));
            this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;

            for (int i = 0; i < pblist.Count; i++)
            {
                int k = i;
                int j = 0;
                if (i >= 6)
                {
                    k = i - 6;
                    j = 152 * koeficient;
                }
                string path = "..\\..\\pictures\\";
                pblist[i].BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
                pblist[i].Location    = new System.Drawing.Point(10 + k * 150 * koeficient, 400 * koeficient + j);
                pblist[i].Name        = (i).ToString();
                pblist[i].Size        = new System.Drawing.Size(150, 150);
                pblist[i].SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
                pblist[i].TabIndex    = 10;
                pblist[i].TabStop     = false;
                string src   = path + i.ToString() + ".jpg";
                Image  image = Image.FromFile(src);
                pblist[i].Image       = image;
                pblist[i].MouseEnter += new System.EventHandler(this.pictureBoxi_MouseEnter);
                pblist[i].MouseLeave += new System.EventHandler(this.pictureBoxi_MouseLeave);
                pblist[i].Click      += new System.EventHandler(this.pictureBoxi_Click);
                src = path + i.ToString() + i.ToString() + ".png";
                string src3 = path + i.ToString() + i.ToString() + i.ToString() + ".png";
                t1.Add(src);
                t2.Add(text[i]);
                t3.Add(src3);
                //initializeTabPage2();
            }
            initializeTabPage2();
        }
Пример #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShopForm"/> class.
        /// </summary>
        /// <param name="newControl">Control to set.</param>
        /// <param name="newUser">User to set.</param>
        /// <param name="newLibr">Library to set.</param>
        public ShopForm(ShopControl newControl, Person newUser, Library newLibr)
        {
            this.icons = new List<PictureBox>();
            this.indies = new List<Indie>();
            this.newgameList = new List<Label>();
            this.glibr = new GameLibrary();
            this.glibr.Add(new Game("Team Fortress 2"));
            this.glibr.Add(new Game("Star Craft 2"));
            this.glibr.Add(new Game("Half life 2"));
            this.glibr.Add(new Game("Portal"));
            this.glibr.Add(new Game("World of Warcraft"));
            this.glibr.Add(new Game("Heroes 6"));
            this.glibr.Add(new Game("Dark Sides 2"));
            this.glibr.Add(new Game("Black Mesa"));
            this.glibr.Add(new Game("Dota2"));
            this.glibr.Add(new Game("Witcher"));
            this.glibr.Add(new Game("Battle Field 3"));
            this.glibr.Add(new Game("Diablo 3"));
            this.libr = newLibr;
            this.user = newUser;
            this.control = newControl;
            this.InitializeComponent();
            this.tabControl1.DrawItem += new DrawItemEventHandler(this.TabControl1_DrawItem);
            this.t1 = new List<string>();
            this.t2 = new List<string>();
            this.t3 = new List<string>();
            this.label1.Text = "Hello,";
            this.label1.Text += this.control.OnLoadShop();
            this.pblist = new List<PictureBox>();
            this.pblist1 = new List<PictureBox>();
            this.llist = new List<Label>();
            this.n = 0;
            this.pblist.Add(this.pictureBox6);
            this.pblist.Add(this.pictureBox7);
            this.pblist.Add(this.pictureBox8);
            this.pblist.Add(this.pictureBox9);
            this.pblist.Add(this.pictureBox10);
            this.pblist.Add(this.pictureBox11);
            this.pblist.Add(this.pictureBox12);
            this.pblist.Add(this.pictureBox13);
            this.pblist.Add(this.pictureBox14);
            this.pblist.Add(this.pictureBox15);
            this.pblist.Add(this.pictureBox16);
            this.pblist.Add(this.pictureBox17);
            this.koeficient = (int)(SystemInformation.PrimaryMonitorSize.Height / 1024);
            List<string> text = new List<string>();
            text.Add("Team Fortress 2 - innovating roleplay shooter.\n In game you can choose one of 8 roles. \n medic,heavy,scout,demoman,soldair,engineer,spy, and sniper.\n Each of them has own changeble weapons and history. \n There are lots of different types and game modes,maps and missions.\n You will be defending castles, deathmatching, storming and capturing flags!\n\n\n So if you want to have fun in Team fortress 2 order it now.");
            text.Add("StarCraft 2 - Chalenging RTS, next chapter of SC\n Nowadays SC2 is the most popular eSport game\n Most exciting game tournaments, epic battles and mindgames are here\n\n For people who came to see next chapter of Raynor's story Starcraft2 \n has a lot to see nad play in new campaign. \n There are still 3 different sides in space war: Zergs,Protoss,Terran\n You will be excited by comanding space marines \n or invading worlds with your swarm \n\n\n So if you want to have fun in Starcraft 2 order it now.");
            text.Add("Half-Life 2: Episode Two is a first-person shooter video game \n the second episode in a series of sequels to the 2004 Half-Life 2. \n It was developed by Valve Corporation in tandem with Episode One, \n the first game in the series, and released in 2007 \n via Valve's Steam content distribution platform. \n The episode was released both separately and as a part of a bundled package \n The Orange Box. \n\n\n So if you want to play Half life,order it now.");
            text.Add("Portal is a 2007 single-player first-person puzzle-platform video game \n developed by Valve Corporation. \n The game was released in a bundle package called The Orange Box \n for Microsoft Windows and Xbox 360 on October 9, 2007,\n and for the PlayStation 3 on December 11, 2007. \n The Windows version of the game is available for download \n separately through Valve's content delivery system Steam \n and was released as a standalone retail product on April 9, 2008.\n A standalone version called Portal: Still Alive \n was released on the Xbox Live Arcade service on October 22, 2008;\n this version includes an additional 14 puzzles. \n A Mac OS X version was released as part of the Mac-compatible Steam \n\n\n So if you want to play Portal, order it now!");
            text.Add("World of Warcraft (often abbreviated as WoW)\n is a massively multiplayer online role-playing game \n It is the fourth released game set in the fantasy Warcraft universe,\n which was first introduced by Warcraft:\n Orcs & Humans in 1994.\n World of Warcraft takes place within the Warcraft world of Azeroth,\n approximately four years after the events at the conclusion \n of Blizzard's previous Warcraft release, Warcraft III: The Frozen Throne \n\n\n  So if you want to have fun in WoW order it now.");
            text.Add("Might & Magic Heroes VI is a turn-based strategy video game \n for Microsoft Windows developed by Black Hole Entertainment \n and published by Ubisoft. \n It is the sixth installment in the Heroes of Might and Magic series,\n and was released on October 13, 2011, \n coinciding with the 25th anniversary of the Might and Magic franchise. \n Heroes VI acts as a prequel to Heroes of Might and Magic V,\n occurring almost five centuries earlier, \n and is set in the fictional world of Ashan. \n The story follows the five heirs to the Griffin dynasty \n in their quests to repel a demon invasion and assist  \n or impede Michael, a legendary Archangel general plotting \n to revive an ancient war.\n\n\n So if you want to play Heroes6 , order it now!");
            text.Add("Darksiders II is an action-adventure and action role-playing game \n developed by Vigil Games and published by THQ. \n It is the sequel to Darksiders\n and was released in August 2012 for PlayStation 3,\n Xbox 360, Microsoft Windows, with a Wii U port scheduled \n later in the year.\n\n\nSo if you want to play Darksides2 , order it now!");
            text.Add("Black Mesa (previously known as Black Mesa: Source) \n is a third-party total conversion modification  \n for Valve Corporation's Source engine. \n The stated goal of the project is to recreate Valve's critically acclaimed \n 1998 video game Half-Life using the more advanced capabilities \n of the Source engine. The 40-person volunteer development team says they \n hope to create a more engrossing in-game world with more varied, \n complex environments and more challenging, realistic gameplay. \n\n\n So if you want to play BlackMesa, order it now!");
            text.Add("Dota 2 is an upcoming multiplayer online battle arena video game \n being developed by Valve Corporation and the stand-alone sequel to popular \n Defense of the Ancients mod for Warcraft III: Reign of Chaos \n and its expansion pack, The Frozen Throne. \n Formally announced on October 13, 2010, via Game Informer, \n the game is currently available for early test access purchase \n and is scheduled for a full release in 2012, \n with a free-to-play business model.\n\n\n So if you want to play Dota2 ,order it now!");
            text.Add("The Witcher is an action role-playing video game  \n developed by CD Projekt RED and published by Atari. \n The game is based on the book series by Polish author Andrzej Sapkowski.\n The Witcher takes place in a medieval fantasy world and follows the story of Geralt, \n one of a few remaining witchers – traveling monster hunter for hire,\n gifted with unnatural powers. The game's system of 'moral choices' \n as part of the storyline was noted for its time-delayed \n consequences and lack of black-and-white morality.\n\n\n So if you want ot play Witcher, order it now!");
            text.Add("Battlefield 3 (commonly abbreviated BF3) is a first-person shooter video game \n developed by EA Digital Illusions CE and published by Electronic Arts.\n It is a direct sequel to 2005's Battlefield 2, \n and the twelfth installment in the Battlefield franchise. \n\n\n So if you want to play Battle field 3 - order it now!");
            text.Add("Diablo III is an action role-playing hack and slash video game \n developed and published by Blizzard Entertainment. \n It is the third installment in the Diablo franchise.\n The game, which features elements of the hack and slash genre, \n was released in North America, Latin America, Europe, South Korea, and Taiwan\n  on May 15, 2012, and in Russia on June 7, 2012.\n Before its release, the game broke several presale records \n and became the most pre-ordered PC game to date on Amazon.com.\n Diablo III subsequently set the new all-time record \n for fastest-selling PC game by selling over 3.5 million copies  \n in the first 24 hours of its release. \n\n\n So by it immidiately !!!");
            if (this.user.Security != "developer")
            {
                this.label18.Hide();
            }

            ////this.label1.Location = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 200), 100);
            ////this.label2.Location = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 200), 120);
            ////this.label16.Location = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 20), 10);
            ////this.label15.Location = new System.Drawing.Point((SystemInformation.PrimaryMonitorSize.Width - 40), 10);
            ////this.tabControl1.Location = new System.Drawing.Point((int)((SystemInformation.PrimaryMonitorSize.Width - (SystemInformation.PrimaryMonitorSize.Height * 1.25*0.728)) / 2), (int)(SystemInformation.PrimaryMonitorSize.Height * 0.205));
            this.tabControl1.Location = new System.Drawing.Point((int)((SystemInformation.PrimaryMonitorSize.Width - (1280 * 0.728)) / 2), (int)((SystemInformation.PrimaryMonitorSize.Height - (1024 * 0.72)) / 2 /** 0.205*/));
            this.tabControl1.Size = new System.Drawing.Size((int)(1280 * 0.728), (int)(1024 * 0.72));
            this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;

            for (int i = 0; i < this.pblist.Count; i++)
            {
                int k = i;
                int j = 0;
                if (i >= 6)
                {
                    k = i - 6;
                    j = 152;
                    //// *this.koeficient;
                }

                string path = "..\\..\\pictures\\";
                this.pblist[i].BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
                this.pblist[i].Location = new System.Drawing.Point(10 + (k * 150), 400 + j);
                this.pblist[i].Name = i.ToString();
                this.pblist[i].Size = new System.Drawing.Size(150, 150);
                this.pblist[i].SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
                this.pblist[i].TabIndex = 10;
                this.pblist[i].TabStop = false;
                string src = path + i.ToString() + ".jpg";
                Image image = Image.FromFile(src);
                this.pblist[i].Image = image;
                this.pblist[i].MouseEnter += new System.EventHandler(this.PictureBoxi_MouseEnter);
                this.pblist[i].MouseLeave += new System.EventHandler(this.PictureBoxi_MouseLeave);
                this.pblist[i].Click += new System.EventHandler(this.PictureBoxi_Click);
                src = path + i.ToString() + i.ToString() + ".png";
                string src3 = path + i.ToString() + i.ToString() + i.ToString() + ".png";
                this.t1.Add(src);
                this.t2.Add(text[i]);
                this.t3.Add(src3);
                ////initializeTabPage2();
            }

            this.InitializeTabPage2();
        }
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Person"/> class.
 /// </summary>
 /// <param name="newLogin">Login to set</param>
 /// <param name="newPassword">Password to set</param>
 /// <param name="newCountry">Country to set</param>
 /// <param name="newAge">Age to set</param>
 public Person(string newLogin, string newPassword, string newCountry, string newAge)
 {
     this.login = newLogin;
     this.password = newPassword;
     this.age = newAge;
     this.country = newCountry;
     this.indieGlib = new List<Indie>();
     this.glib = new GameLibrary();
     this.security = "user";
     this.security = "user";
     this.avatar = string.Empty;
 }
Пример #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Person"/> class.
 /// </summary>
 /// <param name="newLogin">Login to set</param>
 /// <param name="newPassword">Password to set</param>
 /// <param name="newCountry">Country to set</param>
 /// <param name="newAge">Age to set</param>
 /// <param name="newindieGlib">Indie library to set</param>
 /// <param name="newglib">Game library to set</param>
 /// <param name="newTime">Time to set</param>
 /// <param name="newAvatar">Avatar to set</param>
 public Person(string newLogin, string newPassword, string newCountry, string newAge, List<Indie> newindieGlib, GameLibrary newglib, DateTime newTime, string newAvatar)
 {
     this.login = newLogin;
     this.password = newPassword;
     this.age = newAge;
     this.country = newCountry;
     this.indieGlib = newindieGlib;
     this.glib = newglib;
     this.security = "user";
     this.time = newTime;
     this.avatar = newAvatar;
 }
Пример #10
0
 public void personTest2GetNumberOfGames()
 {
     Person p;
     string newLogin = "******";
     string newPassword = "******";
     string newCountry = "3";
     string newAge = "4";
     List<Indie> newindieGlib = new List<Indie>();
     newindieGlib.Add(new Indie());
     newindieGlib.Add(new Indie());
     GameLibrary newglib = new GameLibrary();
     newglib.Add(new Game());
     newglib.Add(new Game());
     newglib.Add(new Game());
     DateTime newTime = new DateTime();
     string newAvatar = "5";
     p = new Person(newLogin, newPassword, newCountry, newAge, newindieGlib, newglib, newTime, newAvatar);
     if (p.GetNumberOfGames() != 3)
     {
         Assert.Fail();
     }
 }
Пример #11
0
 public void libraryTestAdd()
 {
     GameLibrary l = new GameLibrary();
     l.Add(new Game("BF3"));
     if (l.Find("BF3") != true)
     {
         Assert.Fail();
     }
 }
Пример #12
0
 public void libraryTestSize()
 {
     GameLibrary l = new GameLibrary();
     l.Add(new Game("BF3"));
     if (l.Size() != 1)
     {
         Assert.Fail();
     }
 }
Пример #13
0
 public void personTest2GlibGetSet()
 {
     Person p = new Person();
     List<Game> lst = new List<Game>();
     lst.Add(new Game("1"));
     GameLibrary glib = new GameLibrary(lst);
     p.Glib = glib;
     if (p.Glib.Size() != 1)
     {
         Assert.Fail();
     }
 }
Пример #14
0
 public void libraryTestGetSetBracket()
 {
     GameLibrary l;
     List<Game> lst = new List<Game>();
     lst.Add(new Game("BF3"));
     lst.Add(new Game("Touhou"));
     lst.Add(new Game("SC2"));
     l = new GameLibrary();
     l.Copy(lst);
     l.Bracket = l.Bracket;
     if (l.Find("Touhou") != true)
     {
         Assert.Fail();
     }
 }
Пример #15
0
 public void libraryTestGetName()
 {
     GameLibrary l = new GameLibrary();
     l.Add(new Game("BF3"));
     if (l.GetName(0) != "BF3")
     {
         Assert.Fail();
     }
 }
Пример #16
0
 public void libraryTestFind()
 {
     List<Game> lst = new List<Game>();
     lst.Add(new Game("BF3"));
     GameLibrary l = new GameLibrary(lst);
     if (l.Find("BF3") != true)
     {
         Assert.Fail();
     }
 }
Пример #17
0
 public void libraryTestEmptyTest()
 {
     GameLibrary l = new GameLibrary();
     if (l.Empty() != true)
     {
         Assert.Fail();
     }
     List<Game> lst = new List<Game>();
     lst.Add(new Game("BF3"));
     lst.Add(new Game("Touhou"));
     lst.Add(new Game("SC2"));
     l = new GameLibrary(lst);
     if (l.Empty() != false)
     {
         Assert.Fail();
     }
 }
Пример #18
0
 public void libraryTestDelete()
 {
     GameLibrary l = new GameLibrary();
     l.Add(new Game("BF3"));
     l.Delete("BF3");
     if (l.Find("BF3") != false)
     {
         Assert.Fail();
     }
 }
Пример #19
0
 public void personTest2ConstructorParametrs()
 {
     Person p;
     string newLogin = "******";
     string newPassword = "******";
     string newCountry = "3";
     string newAge = "4";
     List<Indie> newindieGlib = new List<Indie>();
     GameLibrary newglib = new GameLibrary();
     DateTime newTime = new DateTime();
     string newAvatar = "5";
     p = new Person(newLogin, newPassword, newCountry, newAge, newindieGlib, newglib, newTime, newAvatar);
     if (p.GetAge() != "4")
     {
         Assert.Fail();
     }
     if (p.GetAvatar() != "5")
     {
         Assert.Fail();
     }
     if (p.GetCountry() != "3")
     {
         Assert.Fail();
     }
     if (p.GetLogin() != "1")
     {
         Assert.Fail();
     }
     if (p.GetPassword() != "2")
     {
         Assert.Fail();
     }
 }
Пример #20
0
 public void libraryTestParametrConstructor()
 {
     GameLibrary l;
     List<Game> lst = new List<Game>();
     lst.Add(new Game("BF3"));
     lst.Add(new Game("Touhou"));
     lst.Add(new Game("SC2"));
     l = new GameLibrary(lst);
     if (l.Find("BF3") != true)
     {
         Assert.Fail();
     }
 }
Пример #21
0
 public void personTest2Sets()
 {
     Person p = new Person();
     string newLogin = "******";
     string newPassword = "******";
     string newCountry = "3";
     string newAge = "4";
     List<Indie> newindieGlib = new List<Indie>();
     GameLibrary newglib = new GameLibrary();
     DateTime newTime = new DateTime(22);
     string newAvatar = "5";
     p.Login = newLogin;
     p.Avatar = newAvatar;
     p.Password = newPassword;
     p.Glib = newglib;
     p.IndieGlib = newindieGlib;
     p.Country = newCountry;
     p.Age = newAge;
     p.Time = newTime.ToString();
     p.Security = "user";
     if (p.GetAge() != "4")
     {
         Assert.Fail();
     }
     if (p.GetAvatar() != "5")
     {
         Assert.Fail();
     }
     if (p.GetCountry() != "3")
     {
         Assert.Fail();
     }
     if (p.GetLogin() != "1")
     {
         Assert.Fail();
     }
     if (p.GetPassword() != "2")
     {
         Assert.Fail();
     }
 }