Because of C # not familiar, so ask the classmate (thank Deng Classmate ~), asked Baidu, asked Google, finally succeeded.
1.char
First of all, C # 's char is encoded in Unicode. 2 bytes. At first I always thought it was an ASCII code, checking the ASCII table. Depressed...
Byte is 1 bytes.
Char ch= ' a ';
2. Identify what form to store.
BMP is a bitmap, which is stored in pixels.
3.c# What classes are able to import BMP graphs.
Bitmap
System.Drawing
Bitmap map=new Bitmap ("filename");
Bitmap map1=new Bitmap (map,width,height);
Map.save ("filename"); Store in original format
If you want to paint on the bitmap, you should Graphics g=graphics.fromimage (map);
There is another problem, bitmap is an abstract concept, we need to draw in which entity place.
PictureBox has an image attribute that is bitmap, so it can be drawn based on this.
PictureBox attributes have a change in the background color, changed to white.
4. Matching issues
In fact, the matching problem is very simple, because bitmap has a getpixel (x,y) can return color we only do a monochrome map, so it is enough.
2 layers of iteration can be done.
5. Clear
Clear in fact as long as bitmap.dispose ();
6. Message passing between forms
Try one of the easiest ways, because C # has no global variables, so you can use static to solve them.
7. Toggle between forms
Form2 form=new Form2 ();
Form.ShowDialog ();