Beispiel #1
0
 public static StaticBitmap GetInstance()
 {
     if (instance == null)
     {
         instance = new StaticBitmap();
     }
     return(instance);
 }
Beispiel #2
0
 public Painter()
 {
     InitializeComponent();
     bitmap            = StaticBitmap.GetInstance();
     _currentColor     = Color.Black;
     _currentThickness = 1;
     _fillColor        = Color.Transparent;
     bitmap.Bitmap     = new Bitmap(pictureBox.Width, pictureBox.Height);
     bitmap.tmpBitmap  = new Bitmap(pictureBox.Width, pictureBox.Height);
     Change_location.Hide();
     DeleteFigure.Hide();
     Reversal.Hide();
     textBox1.Hide();
     mode = "Рисуем";
     //saveFile.Click += saveFile_Click;
     //openFile.Click += openFile_Click;
     openFileDialog1.Filter = "Winx files(*.winx)|*.winx|All files(*.*)|*.*";
     saveFileDialog1.Filter = "Winx files(*.winx)|*.winx|All files(*.*)|*.*";
     //ActiveFigure = null;
 }