Солуянова Семестровая Марио. Введение в ии
Скачать 0.58 Mb.
|
p.Dispose(); | | | | |||
| xGraph.Dispose(); | | | | ||
| | | | | ||
| Invalidate(); | | | | ||
| | | | | ||
| | | | | ||
| | | | | ||
| } | | | | ||
| | | | | ||
| private void MainForm_Paint(object sender, PaintEventArgs e) | | | | ||
| { | | | | ||
| Graphics xGraph = e.Graphics; | | | | ||
| xGraph.DrawImage(MainImage, 0, 0); | | | | ||
| xGraph.Dispose(); | | | | ||
| | | | | ||
| | | | | ||
| } | | | | ||
| | | | | ||
| private void bClear_Click(object sender, EventArgs e) | | | | ||
| { | | | | ||
| Graphics xGraph = Graphics.FromImage(MainImage); | | | | ||
| | | | | ||
| SolidBrush b = new SolidBrush(Color.Silver); | | | | ||
| xGraph.FillRectangle(b, new Rectangle(0, 0, Width, Height)); | | | | ||
| | | | | ||
| b.Dispose(); | | | | ||
| xGraph.Dispose(); | | | | ||
| | | | | ||
| Invalidate(); | | | | ||
| | | | | ||
| | | | | ||
| } | | | | ||
| } | | | | ||
| } | | | | ||
using System; | | | | | | |
| using System.Collections.Generic; | | | |||
| using System.ComponentModel; | | | |||
| using System.Data; | | | |||
| using System.Drawing; | | | |||
| using System.Text; | | | |||
| using System.Windows.Forms; | | | |||
| using MarioObjects.Objects.Utils; | | | |||
| | | | |||
| namespace MarioObjects | | | |||
| { | | | |||
| public partial class Form1 : Form | | | |||
| { | | | |||
| public List | | | |||
| public Bitmap MainImage; | | | |||
| public Graphics MainGraphic; | | | |||
| public Form1() | | | |||
| { | | | |||
| InitializeComponent(); | | | |||
| | | | |||
| } | | | |||