Exemplo n.º 1
0
        public void setDragonPanel(Dragon d)
        {
            Thread x = new Thread(new ThreadStart(thread_startd));

            x.IsBackground = true;
            x.Start();

            if (picBoxListDragon.ContainsKey(d.getId()))
            {
            }
            else
            {
                picBoxListDragon.Add(d.getId(), new PictureBox()
                {
                    BackColor     = System.Drawing.Color.Transparent,
                    Location      = new System.Drawing.Point(0, 0),
                    Name          = "dragonBox",
                    Size          = new System.Drawing.Size(24, 24),
                    TabIndex      = 4,
                    TabStop       = false,
                    ImageLocation = "draqgon2.gif",
                    SizeMode      = PictureBoxSizeMode.Zoom
                });
            }

            Did = d.getId();

            /*
             * picBoxListDragon = new List<PictureBox>();
             * tempDragonBox = new PictureBox()
             * {
             *  BackColor = System.Drawing.Color.Transparent,
             *  Location = new System.Drawing.Point(0, 0),
             *  Name = "dragonBox" + d.getX() + d.getY(),
             *  Size = new System.Drawing.Size(24, 24),
             *  TabIndex = 4,
             *  TabStop = false,
             *  ImageLocation = "draqgon2.gif"
             * };*/
            xmap = d.getX();
            ymap = d.getY();
            tempDragonBox.SizeMode = PictureBoxSizeMode.Zoom;
            //picBoxListDragon.Add(tempDragonBox);
        }
Exemplo n.º 2
0
 public Boolean isvalidDragon(Dragon dragon)
 {
     for (int i = 0; i < this.dragon.Count; i++)
     {
         if (this.dragon[i].getId() == dragon.getId())
         {
             return false;
         }
     }
     return true;
 }