Example #1
0
 public void GenerateItems(int left, int top, int width, int height, int imageWidth)
 {
     this.itemCollection.Clear();
     for (int i = 0; i < count; i++)
     {
         MemorizeImageItem item = new MemorizeImageItem();
         item.Url   = this.Url;
         item.Width = imageWidth;
         this.itemCollection.Add(item);
     }
 }
Example #2
0
        public void RandomGenerateItems(int left, int top, int width, int height, int imageWidth)
        {
            Random rand = new Random(Environment.TickCount);

            this.itemCollection.Clear();
            for (int i = 0; i < count; i++)
            {
                MemorizeImageItem item = new MemorizeImageItem();
                item.X     = rand.Next(left, width);
                item.Y     = rand.Next(top, height);
                item.Url   = this.Url;
                item.Width = imageWidth;
                this.itemCollection.Add(item);
            }
        }