示例#1
0
 public Tile(ImageLoad i)
 {
     tileType       = TileType.Normal;
     image          = i.image;
     imageFilePaths = new List <string>()
     {
         i.path
     };
 }
示例#2
0
        private void btn_smart_el_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Title = "Browse BMP Files";

            openFileDialog1.Filter = "bmp files (*.bmp)|*.bmp";

            openFileDialog1.InitialDirectory = Directory.GetCurrentDirectory();

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string fileName = openFileDialog1.FileName;
                tileImages[15] = new ImageLoad(new Bitmap(fileName), fileName);
            }
            btn_smart_el.Image = tileImages[15].image;
        }
示例#3
0
        public Tile(ImageLoad h, ImageLoad v, ImageLoad i, ImageLoad s, ImageLoad c0, ImageLoad c1, ImageLoad c2, ImageLoad c3, ImageLoad f0, ImageLoad f1, ImageLoad f2, ImageLoad f3, ImageLoad ed, ImageLoad eu, ImageLoad er, ImageLoad el)
        {
            tileType       = TileType.Smart;
            imageFilePaths = new List <string>();

            horizontal = h.image;
            imageFilePaths.Add(h.path);
            vertical = v.image;
            imageFilePaths.Add(v.path);
            island = i.image;
            imageFilePaths.Add(i.path);
            surrounded = s.image;
            imageFilePaths.Add(s.path);
            corner0 = c0.image;
            imageFilePaths.Add(c0.path);
            corner1 = c1.image;
            imageFilePaths.Add(c1.path);
            corner2 = c2.image;
            imageFilePaths.Add(c2.path);
            corner3 = c3.image;
            imageFilePaths.Add(c3.path);
            fork0 = f0.image;
            imageFilePaths.Add(f0.path);
            fork1 = f1.image;
            imageFilePaths.Add(f1.path);
            fork2 = f2.image;
            imageFilePaths.Add(f2.path);
            fork3 = f3.image;
            imageFilePaths.Add(f3.path);
            endDown = ed.image;
            imageFilePaths.Add(ed.path);
            endUp = eu.image;
            imageFilePaths.Add(eu.path);
            endRight = er.image;
            imageFilePaths.Add(er.path);
            endLeft = el.image;
            imageFilePaths.Add(el.path);
        }