public MainForm() { InitializeComponent(); _VideoWindow = new VideoWindow(); _Brush = null; shemes = new Shemes(); tscbShemes.Items.Clear(); tscbShemes.Items.Add(shemes.GetCurrentShemeName()); tscbShemes.SelectedIndex = 0; LoadLastShemeName(); if (Program.PauseInsteadOfStop) tsmiPauseInsteadStop.Image = Properties.Resources.ok; else tsmiPauseInsteadStop.Image = null; brush = new SolidBrush(BackColor); this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); this.Resize += new System.EventHandler(this.OnResize); this.Paint += new System.Windows.Forms.PaintEventHandler(this.OnPaint); UpdateRect(); context = BufferedGraphicsManager.Current; context.MaximumBuffer = rect.Size; grafx = context.Allocate(this.CreateGraphics(), rect); DrawToBuffer(grafx.Graphics); _Runner = new Thread(Runner); _Runner.Start(); _Loader = new Thread(new ParameterizedThreadStart(LoadTile)); }
private void NewSheme() { lock (mutex) { shemes.StopAll(); shemes = new Shemes(); tscbShemes.Items.Clear(); tscbShemes.Items.Add(shemes.GetCurrentShemeName()); tscbShemes.SelectedIndex = 0; } }