|
@@ -26,21 +26,27 @@ namespace SketchAssistant
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public enum ProgramState
|
|
|
{
|
|
|
Idle,
|
|
|
Draw,
|
|
|
Delete
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
private ProgramState currentState;
|
|
|
|
|
|
|
|
|
|
|
|
private FileImporter fileImporter;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
OpenFileDialog openFileDialogLeft = new OpenFileDialog();
|
|
|
|
|
|
|
|
@@ -50,28 +56,50 @@ namespace SketchAssistant
|
|
|
|
|
|
|
|
|
private List<Line> templatePicture;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Image rightImage = null;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
List<Point> currentLine;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
List<Tuple<bool,Line>> lineList = new List<Tuple<bool, Line>>();
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
bool mousePressed = false;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Point currentCursorPosition;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Point previousCursorPosition;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Queue<Point> cursorPositions = new Queue<Point>();
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Graphics graph = null;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
bool[,] isFilledMatrix;
|
|
|
HashSet<int>[,] linesMatrix;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
uint deletionSize = 2;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
ActionHistory historyOfActions;
|
|
|
|
|
|
|