Browse Source

Fixed Build error, removed unnecessary code

Martin Edlund 5 years ago
parent
commit
81caee92eb

+ 2 - 2
Finished Userstories/userstory19.md

@@ -8,6 +8,6 @@
 |Geschätzter Aufwand (Story Points)|20|
 |Geschätzter Aufwand (Story Points)|20|
 |Entwickler|Martin Edlund|
 |Entwickler|Martin Edlund|
 |Umgesetzt in Iteration|6|
 |Umgesetzt in Iteration|6|
-|Tatsächlicher Aufwand (Std.)|8|
-|Velocity (Std./Story Point)|0,4|
+|Tatsächlicher Aufwand (Std.)|8,5|
+|Velocity (Std./Story Point)|0,425|
 |Bemerkungen|Keine|
 |Bemerkungen|Keine|

+ 0 - 10
SketchAssistant/SketchAssistant/Form1.Designer.cs

@@ -36,7 +36,6 @@ namespace SketchAssistant
             this.pictureBoxLeft = new System.Windows.Forms.PictureBox();
             this.pictureBoxLeft = new System.Windows.Forms.PictureBox();
             this.menuStrip1 = new System.Windows.Forms.MenuStrip();
             this.menuStrip1 = new System.Windows.Forms.MenuStrip();
             this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.examplePictureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.examplePictureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();
@@ -117,19 +116,11 @@ namespace SketchAssistant
             // fileToolStripMenuItem
             // fileToolStripMenuItem
             // 
             // 
             this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.loadToolStripMenuItem,
             this.importToolStripMenuItem});
             this.importToolStripMenuItem});
             this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
             this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
             this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
             this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
             this.fileToolStripMenuItem.Text = "File";
             this.fileToolStripMenuItem.Text = "File";
             // 
             // 
-            // loadToolStripMenuItem
-            // 
-            this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
-            this.loadToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
-            this.loadToolStripMenuItem.Text = "Load...";
-            this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
-            // 
             // importToolStripMenuItem
             // importToolStripMenuItem
             // 
             // 
             this.importToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.importToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -282,7 +273,6 @@ namespace SketchAssistant
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
         private System.Windows.Forms.MenuStrip menuStrip1;
         private System.Windows.Forms.MenuStrip menuStrip1;
         private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
-        private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
         private System.Windows.Forms.ToolStrip toolStrip1;
         private System.Windows.Forms.ToolStrip toolStrip1;
         private System.Windows.Forms.StatusStrip statusStrip1;
         private System.Windows.Forms.StatusStrip statusStrip1;
         private System.Windows.Forms.ToolStripStatusLabel toolStripLoadStatus;
         private System.Windows.Forms.ToolStripStatusLabel toolStripLoadStatus;

+ 4 - 76
SketchAssistant/SketchAssistant/Form1.cs

@@ -20,7 +20,6 @@ namespace SketchAssistant
         {
         {
             InitializeComponent();
             InitializeComponent();
             ProgramPresenter = new MVP_Presenter(this);
             ProgramPresenter = new MVP_Presenter(this);
-            fileImporter = new FileImporter();
         }
         }
 
 
         /**********************************/
         /**********************************/
@@ -46,86 +45,18 @@ namespace SketchAssistant
             Delete
             Delete
         }
         }
         /// <summary>
         /// <summary>
-        /// Current Program State
-        /// </summary>
-        private ProgramState currentState;
-        /// <summary>
-        /// instance of FileImporter to handle drawing imports
-        /// </summary>
-        private FileImporter fileImporter;
-        /// <summary>
         /// Dialog to select a file.
         /// Dialog to select a file.
         /// </summary>
         /// </summary>
         OpenFileDialog openFileDialog = new OpenFileDialog();
         OpenFileDialog openFileDialog = new OpenFileDialog();
         /// <summary>
         /// <summary>
-        /// Image loaded on the left
-        /// </summary>
-        private Image leftImage = null;
-        /// <summary>
-        /// the graphic shown in the left window, represented as a list of polylines
-        /// </summary>
-        private List<Line> leftLineList;
-        /// <summary>
-        /// Image on the right
-        /// </summary>
-        Image rightImage = null;
-        /// <summary>
-        /// Current Line being Drawn
-        /// </summary>
-        List<Point> currentLine;
-        /// <summary>
         /// All Lines in the current session
         /// All Lines in the current session
         /// </summary>
         /// </summary>
         List<Tuple<bool,Line>> rightLineList = new List<Tuple<bool, Line>>();
         List<Tuple<bool,Line>> rightLineList = new List<Tuple<bool, Line>>();
         /// <summary>
         /// <summary>
-        /// Whether the Mouse is currently pressed in the rightPictureBox
-        /// </summary>
-        bool mousePressed = false;
-        /// <summary>
-        /// The Position of the Cursor in the right picture box
-        /// </summary>
-        Point currentCursorPosition;
-        /// <summary>
-        /// The Previous Cursor Position in the right picture box
-        /// </summary>
-        Point previousCursorPosition;
-        /// <summary>
         /// Queue for the cursorPositions
         /// Queue for the cursorPositions
         /// </summary>
         /// </summary>
         Queue<Point> cursorPositions = new Queue<Point>();
         Queue<Point> cursorPositions = new Queue<Point>();
         /// <summary>
         /// <summary>
-        /// The graphic representation of the right image
-        /// </summary>
-        Graphics rightGraph = null;
-        /// <summary>
-        /// Lookup Matrix for checking postions of lines in the image
-        /// </summary>
-        bool[,] isFilledMatrix;
-        /// <summary>
-        /// Lookup Matrix for getting line ids at a certain postions of the image
-        /// </summary>
-        HashSet<int>[,] linesMatrix;
-        /// <summary>
-        /// Size of deletion area
-        /// </summary>
-        int deletionRadius = 2;
-        /// <summary>
-        /// History of Actions
-        /// </summary>
-        ActionHistory historyOfActions;
-        /// <summary>
-        /// List of items which will be overlayed over the right canvas.
-        /// </summary>
-        List<HashSet<Point>> overlayItems;
-        /// <summary>
-        /// The assistant responsible for the redraw mode
-        /// </summary>
-        RedrawAssistant redrawAss;
-        /// <summary>
-        /// Size of areas marking endpoints of lines in the redraw mode.
-        /// </summary>
-        int markerRadius = 10;
-        /// <summary>
         /// The Presenter Component of the MVP-Model
         /// The Presenter Component of the MVP-Model
         /// </summary>
         /// </summary>
         MVP_Presenter ProgramPresenter;
         MVP_Presenter ProgramPresenter;
@@ -146,12 +77,7 @@ namespace SketchAssistant
         {
         {
             ProgramPresenter.Resize(new Tuple<int, int>(pictureBoxLeft.Width, pictureBoxLeft.Height), 
             ProgramPresenter.Resize(new Tuple<int, int>(pictureBoxLeft.Width, pictureBoxLeft.Height), 
                 new Tuple<int, int>(pictureBoxRight.Width, pictureBoxRight.Height));
                 new Tuple<int, int>(pictureBoxRight.Width, pictureBoxRight.Height));
-        }
-        
-        //Load button, will open an OpenFileDialog
-        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            ProgramPresenter.LoadToolStripMenuItemClick();
+            this.Refresh();
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -389,6 +315,8 @@ namespace SketchAssistant
         /*** TESTING RELATED FUNCTIONS START HERE ***/
         /*** TESTING RELATED FUNCTIONS START HERE ***/
         /********************************************/
         /********************************************/
 
 
+        /*
+
         /// <summary>
         /// <summary>
         /// returns all instance variables in the order of their definition for testing
         /// returns all instance variables in the order of their definition for testing
         /// </summary>
         /// </summary>
@@ -409,7 +337,7 @@ namespace SketchAssistant
             }
             }
             return varArr;
             return varArr;
         }
         }
-        /*
+
         /// <summary>
         /// <summary>
         /// public method wrapper for testing purposes, invoking DrawEmptyCanvas(...) and BindAndDrawLeftImage(...)
         /// public method wrapper for testing purposes, invoking DrawEmptyCanvas(...) and BindAndDrawLeftImage(...)
         /// </summary>
         /// </summary>

+ 0 - 13
SketchAssistant/SketchAssistant/MVP_Presenter.cs

@@ -55,7 +55,6 @@ namespace SketchAssistant
 
 
         public void Resize(Tuple<int, int> leftPBS,Tuple<int, int> rightPBS)
         public void Resize(Tuple<int, int> leftPBS,Tuple<int, int> rightPBS)
         {
         {
-            programView.Refresh();
             programModel.leftImageBoxWidth = leftPBS.Item1;
             programModel.leftImageBoxWidth = leftPBS.Item1;
             programModel.leftImageBoxHeight = leftPBS.Item2;
             programModel.leftImageBoxHeight = leftPBS.Item2;
             programModel.rightImageBoxWidth = rightPBS.Item1;
             programModel.rightImageBoxWidth = rightPBS.Item1;
@@ -63,18 +62,6 @@ namespace SketchAssistant
             programModel.UpdateSizes();
             programModel.UpdateSizes();
         }
         }
 
 
-        /// <summary>
-        /// Display a new FileDialog to load an image of type jpg or png.
-        /// </summary>
-        public void LoadToolStripMenuItemClick()
-        {
-            var fileNameTup = programView.openNewDialog("Image|*.jpg;*.png;*.jpeg");
-            if(!fileNameTup.Item1.Equals("") && !fileNameTup.Item2.Equals(""))
-            {
-
-            }
-        }
-
         /// <summary>
         /// <summary>
         /// Display a new FileDialog to load a collection of lines.
         /// Display a new FileDialog to load a collection of lines.
         /// </summary>
         /// </summary>