Commit fcbe8534 authored by Tim Falken's avatar Tim Falken
Browse files

Fix race condition on instant execution, change HI.bmp, fix file in use error

parent 0b89863b
Examples/HI.bmp

241 Bytes | W: | H:

Examples/HI.bmp

259 Bytes | W: | H:

Examples/HI.bmp
Examples/HI.bmp
Examples/HI.bmp
Examples/HI.bmp
  • 2-up
  • Swipe
  • Onion skin
......@@ -45,6 +45,7 @@
this.colorExplainer = new System.Windows.Forms.TextBox();
this.selectedColorDisplay = new System.Windows.Forms.TextBox();
this.turnLeft = new System.Windows.Forms.Button();
this.eraserblack = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// PaintRedBtn
......@@ -214,11 +215,22 @@
this.turnLeft.UseVisualStyleBackColor = true;
this.turnLeft.Click += new System.EventHandler(this.turnLeft_Click);
//
// eraserblack
//
this.eraserblack.Location = new System.Drawing.Point(12, 382);
this.eraserblack.Name = "eraserblack";
this.eraserblack.Size = new System.Drawing.Size(162, 50);
this.eraserblack.TabIndex = 17;
this.eraserblack.Text = "Eraser2";
this.eraserblack.UseVisualStyleBackColor = true;
this.eraserblack.Click += new System.EventHandler(this.eraserblack_Click);
//
// ColorPicker
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(186, 391);
this.ClientSize = new System.Drawing.Size(186, 442);
this.Controls.Add(this.eraserblack);
this.Controls.Add(this.turnLeft);
this.Controls.Add(this.selectedColorDisplay);
this.Controls.Add(this.colorExplainer);
......@@ -265,5 +277,6 @@
private System.Windows.Forms.TextBox colorExplainer;
private System.Windows.Forms.TextBox selectedColorDisplay;
private System.Windows.Forms.Button turnLeft;
private System.Windows.Forms.Button eraserblack;
}
}
\ No newline at end of file
using System;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
......@@ -27,12 +28,14 @@ namespace PaintLang
public Color TurnR = Color.FromArgb(128, 000, 255);
public Color TurnL = Color.FromArgb(000, 128, 255);
public Color Eraser = Color.FromArgb(255, 255, 255);
public Color Eraser2 = Color.FromArgb(000, 000, 000);
public Color SelectedColor = Color.FromArgb(255, 000, 000);
public ColorPicker()
{
InitializeComponent();
LoadSavedPositionAndSize();
selectedColorDisplay.BackColor = SelectedColor;
PaintRedBtn.BackColor = RedPaint;
......@@ -50,6 +53,42 @@ namespace PaintLang
TurnButton.BackColor = TurnR;
turnLeft.BackColor = TurnL;
EraserBtn.BackColor = Eraser;
eraserblack.BackColor = Eraser2;
PaintRedBtn.Text = "";
PaintGreenBtn.Text = "";
PaintBlueBtn.Text = "";
ReadBtn.Text = "";
MemoryUpBtn.Text = "";
MemoryDownBtn.Text = "";
MemoryPlusBtn.Text = "";
MemoryMinusBtn.Text = "";
BrushLeftBtn.Text = "";
BrushRightBtn.Text = "";
BrushUpBtn.Text = "";
BrushDownBtn.Text = "";
TurnButton.Text = "";
turnLeft.Text = "";
EraserBtn.Text = "";
eraserblack.Text = "";
}
public void SavePositionAndSize()
{
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "ColorFormX", Left);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "ColorFormY", Top);
}
private void LoadSavedPositionAndSize()
{
try
{
StartPosition = FormStartPosition.Manual;
Left = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "ColorFormX", Left);
Top = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "ColorFormY", Top);
}
catch(Exception e)
{ } //Key probably doesn't exist yet, no real issue
}
private void PaintRedBtn_Click(object sender, EventArgs e)
......@@ -161,5 +200,12 @@ namespace PaintLang
selectedColorDisplay.BackColor = SelectedColor;
colorExplainer.Text = "Rotates the direction of the cursor to the left if the byte at the pointer is not 0x00.";
}
private void eraserblack_Click(object sender, EventArgs e)
{
SelectedColor = Eraser2;
selectedColorDisplay.BackColor = SelectedColor;
colorExplainer.Text = "Like the eraser, but black. Does nothing.";
}
}
}
......@@ -33,20 +33,20 @@
this.executionCursor = new System.Windows.Forms.PictureBox();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.executionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.executeQuickToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.debugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.canvasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startQuickestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.abortToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startNormalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startSlowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startQuickestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.abortToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.canvasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
......@@ -101,26 +101,26 @@
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// openToolStripMenuItem
// newToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.openToolStripMenuItem.Text = "Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.newToolStripMenuItem.Text = "New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// newToolStripMenuItem
// openToolStripMenuItem
//
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.newToolStripMenuItem.Text = "New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.openToolStripMenuItem.Text = "Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// executionToolStripMenuItem
//
......@@ -134,7 +134,7 @@
// executeQuickToolStripMenuItem
//
this.executeQuickToolStripMenuItem.Name = "executeQuickToolStripMenuItem";
this.executeQuickToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.executeQuickToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.executeQuickToolStripMenuItem.Text = "Execute Quick";
this.executeQuickToolStripMenuItem.Click += new System.EventHandler(this.executeQuickToolStripMenuItem_Click);
//
......@@ -147,67 +147,67 @@
this.startSlowToolStripMenuItem,
this.abortToolStripMenuItem});
this.debugToolStripMenuItem.Name = "debugToolStripMenuItem";
this.debugToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.debugToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.debugToolStripMenuItem.Text = "Debug";
this.debugToolStripMenuItem.Click += new System.EventHandler(this.debugToolStripMenuItem_Click);
//
// canvasToolStripMenuItem
//
this.canvasToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearToolStripMenuItem,
this.resizeToolStripMenuItem});
this.canvasToolStripMenuItem.Name = "canvasToolStripMenuItem";
this.canvasToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
this.canvasToolStripMenuItem.Text = "Canvas";
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//
// resizeToolStripMenuItem
// startQuickestToolStripMenuItem
//
this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem";
this.resizeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.resizeToolStripMenuItem.Text = "Resize";
this.resizeToolStripMenuItem.Click += new System.EventHandler(this.resizeToolStripMenuItem_Click);
this.startQuickestToolStripMenuItem.Name = "startQuickestToolStripMenuItem";
this.startQuickestToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
this.startQuickestToolStripMenuItem.Text = "Start Quickest";
this.startQuickestToolStripMenuItem.Click += new System.EventHandler(this.startQuickestToolStripMenuItem_Click);
//
// startToolStripMenuItem
//
this.startToolStripMenuItem.Name = "startToolStripMenuItem";
this.startToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.startToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
this.startToolStripMenuItem.Text = "Start Quick";
this.startToolStripMenuItem.Click += new System.EventHandler(this.startToolStripMenuItem_Click);
//
// abortToolStripMenuItem
//
this.abortToolStripMenuItem.Name = "abortToolStripMenuItem";
this.abortToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.abortToolStripMenuItem.Text = "Abort";
this.abortToolStripMenuItem.Click += new System.EventHandler(this.abortToolStripMenuItem_Click);
//
// startNormalToolStripMenuItem
//
this.startNormalToolStripMenuItem.Name = "startNormalToolStripMenuItem";
this.startNormalToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.startNormalToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
this.startNormalToolStripMenuItem.Text = "Start Normal";
this.startNormalToolStripMenuItem.Click += new System.EventHandler(this.startNormalToolStripMenuItem_Click);
//
// startSlowToolStripMenuItem
//
this.startSlowToolStripMenuItem.Name = "startSlowToolStripMenuItem";
this.startSlowToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.startSlowToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
this.startSlowToolStripMenuItem.Text = "Start Slow";
this.startSlowToolStripMenuItem.Click += new System.EventHandler(this.startSlowToolStripMenuItem_Click);
//
// startQuickestToolStripMenuItem
// abortToolStripMenuItem
//
this.startQuickestToolStripMenuItem.Name = "startQuickestToolStripMenuItem";
this.startQuickestToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.startQuickestToolStripMenuItem.Text = "Start Quickest";
this.startQuickestToolStripMenuItem.Click += new System.EventHandler(this.startQuickestToolStripMenuItem_Click);
this.abortToolStripMenuItem.Name = "abortToolStripMenuItem";
this.abortToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
this.abortToolStripMenuItem.Text = "Abort";
this.abortToolStripMenuItem.Click += new System.EventHandler(this.abortToolStripMenuItem_Click);
//
// canvasToolStripMenuItem
//
this.canvasToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearToolStripMenuItem,
this.resizeToolStripMenuItem});
this.canvasToolStripMenuItem.Name = "canvasToolStripMenuItem";
this.canvasToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
this.canvasToolStripMenuItem.Text = "Canvas";
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(106, 22);
this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//
// resizeToolStripMenuItem
//
this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem";
this.resizeToolStripMenuItem.Size = new System.Drawing.Size(106, 22);
this.resizeToolStripMenuItem.Text = "Resize";
this.resizeToolStripMenuItem.Click += new System.EventHandler(this.resizeToolStripMenuItem_Click);
//
// openFileDialog1
//
......@@ -221,6 +221,7 @@
this.Controls.Add(this.executionCursor);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1";
this.Text = "Logic Canvas";
......
using System;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
......@@ -34,21 +35,54 @@ namespace PaintLang
public Form1()
{
InitializeComponent();
LoadSavedPositionAndSize();
originalCursor = (Bitmap)executionCursor.Image;
MouseWheel += new System.Windows.Forms.MouseEventHandler(OnMouseWheel);
LogicMap = new Bitmap(5, 5);
string[] args = Environment.GetCommandLineArgs();
bool didLoad = false;
for(int x = 0; x < LogicMap.Width; x++)
if (args.Length > 1)
{
for(int y = 0; y < LogicMap.Height; y++)
try
{
LogicMap.SetPixel(x, y, Color.White);
for (int i = 0; i < args.Length; i++)
{
Console.WriteLine("args[{0}] == {1}", i, args[i]);
}
Console.WriteLine("USING: [" + (args.Length - 1) + "]" + args[args.Length - 1]);
string filePath = args[args.Length - 1];
string lastBit = Regex.Split(filePath, "\\\\").Last();
name = Regex.Split(lastBit, "\\.")[0];
Bitmap loaded = (Bitmap)Bitmap.FromFile(filePath);
LogicMap = new Bitmap(loaded);
loaded.Dispose();
didLoad = true;
}
catch(Exception e)
{
MessageBox.Show("Could not open file");
}
}
//pictureBox1.SizeMode = PictureBoxSizeMode.CenterImage;
if (!didLoad)
{
LogicMap = new Bitmap(5, 5);
for (int x = 0; x < LogicMap.Width; x++)
{
for (int y = 0; y < LogicMap.Height; y++)
{
LogicMap.SetPixel(x, y, Color.White);
}
}
}
RefreshLogicImage();
......@@ -58,6 +92,30 @@ namespace PaintLang
outputWindow.SetName(name);
}
private void SavePositionAndSize()
{
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormX", Left);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormY", Top);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormW", Width);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormH", Height);
}
private void LoadSavedPositionAndSize()
{
try
{
StartPosition = FormStartPosition.Manual;
Left = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormX", Left);
Top = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormY", Top);
Width = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormW", Width);
Height = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MainFormH", Height);
}
catch (Exception e)
{ } //Key probably doesn't exist yet, no real issue
}
private void SetCursorVisible(bool visible)
{
......@@ -182,6 +240,11 @@ namespace PaintLang
if(executionThread != null)
executionThread.Abort();
outputWindow.SavePositionAndSize();
memoryDisplayer.SavePositionAndSize();
colorPicker.SavePositionAndSize();
SavePositionAndSize();
Application.Exit();
}
......@@ -199,8 +262,7 @@ namespace PaintLang
{
if (!executing)
{
executionThread = new Thread(() => { ExecuteCanvas(0); });
executionThread.Start();
ExecuteCanvas(0);
}
}
......@@ -227,6 +289,7 @@ namespace PaintLang
invokeDelegate del = () =>
{
outputWindow.Reset();
outputWindow.ShowBrush = true;
memoryDisplayer.Reset();
if (interval > 0)
......@@ -284,7 +347,12 @@ namespace PaintLang
cursorX = 0;
cursorY = 0;
del = () => { SetCursorVisible(false); };
del = () =>
{
SetCursorVisible(false);
outputWindow.ShowBrush = false;
};
Invoke(del);
if (interval == 0)
......@@ -564,7 +632,10 @@ namespace PaintLang
string lastBit = Regex.Split(openFileDialog1.FileName, "\\\\").Last();
name = Regex.Split(lastBit, "\\.")[0];
LogicMap = (Bitmap)Bitmap.FromFile(openFileDialog1.FileName);
Bitmap loaded = (Bitmap)Bitmap.FromFile(openFileDialog1.FileName);
LogicMap = new Bitmap(loaded);
loaded.Dispose();
RefreshLogicImage();
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
using System;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
......@@ -26,11 +27,34 @@ namespace PaintLang
public MemoryDisplayer()
{
InitializeComponent();
LoadSavedPositionAndSize();
memory.Add(0x00);
RefreshWindows();
}
public void SavePositionAndSize()
{
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MemoryFormX", Left);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MemoryFormY", Top);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormH", Height);
}
private void LoadSavedPositionAndSize()
{
try
{
StartPosition = FormStartPosition.Manual;
Left = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MemoryFormX", Left);
Top = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "MemoryFormY", Top);
Height = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormH", Height);
}
catch (Exception e)
{ } //Key probably doesn't exist yet, no real issue
}
private void RefreshWindows()
{
string pointerStr = "";
......
......@@ -42,7 +42,6 @@
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(198, 163);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
......@@ -66,9 +65,11 @@
this.ClientSize = new System.Drawing.Size(198, 163);
this.Controls.Add(this.brushBox);
this.Controls.Add(this.pictureBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Output";
this.Text = "Output";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Output_FormClosing);
this.ResizeEnd += new System.EventHandler(this.Output_ResizeEnd);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.brushBox)).EndInit();
this.ResumeLayout(false);
......
using System;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
......@@ -34,6 +35,19 @@ namespace PaintLang
}
}
public bool ShowBrush
{
get
{
return brushBox.Visible;
}
set
{
brushBox.Visible = value;
}
}
private string oName = "";
public void SetName(string name)
......@@ -44,6 +58,31 @@ namespace PaintLang
public Output()
{
InitializeComponent();
LoadSavedPositionAndSize();
}
public void SavePositionAndSize()
{
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormX", Left);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormY", Top);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormW", Width);
Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormH", Height);
}
private void LoadSavedPositionAndSize()
{
try
{
StartPosition = FormStartPosition.Manual;
Left = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormX", Left);
Top = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormY", Top);
Width = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormW", Width);
Height = (int)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\BytePaint", "OutputFormH", Height);
}
catch (Exception e)
{ } //Key probably doesn't exist yet, no real issue
}
public void Reset()
......@@ -64,7 +103,10 @@ namespace PaintLang
bmp.SetPixel(brushX, brushY, pixel);
if (draw)