Browse Source

Userstory13 (#16)

* Added functionality to display an overlay

* Added support for multiple debug lines
m-edlund 5 years ago
parent
commit
f4674b5efd

+ 8 - 8
Finished Userstories/userstory13.md

@@ -1,13 +1,13 @@
-# Userstory 13 
+# Userstory 13 
  
 |**ID**|13|  
 |-|-|
-|**Name**|Start und Endpunkt anzeigen|
-|**Beschreibung**|Beim Nachzeichnen kann der Start- & Endpunkt einer nachzuzeichnenden Linie angzeigt werden.|
-|**Akzeptanzkriterium**|Sofern auf der linken Seite eine nachzeichenbare Grafik dargestellt wird, kann der Start- und Endpunkt der ersten Linie der linken Grafik an der richtigen Stelle auf der rechten Seite angezeigt werden.|
+|**Name**|Overlay Unterstützung|
+|**Beschreibung**|Als Nutzer möchte ich, dass beim Nachzeichnen, der Start- & Endpunkt einer nachzuzeichnenden Linie angzeigt werden kann, sowie bei Verwendung des Optitrack Systems ein Cursor angezeigt werden kann.|
+|**Akzeptanzkriterium**|Es ist möglich Overlay Elemente anzuzeigen und frei zu positionieren.|
 |Geschätzter Aufwand (Story Points)|2|
-|Entwickler|Martin|
-|Umgesetzt in Iteration|4|
-|Tatsächlicher Aufwand (Std.)|1|
-|Velocity (Std./Story Point)|0.5|
+|Entwickler|Martin Edlund|
+|Umgesetzt in Iteration|15|
+|Tatsächlicher Aufwand (Std.)|8|
+|Velocity (Std./Story Point)|4|
 |Bemerkungen|Keine|

+ 2 - 2
SketchAssistant/SketchAssistantWPF/MVP_Model.cs

@@ -97,8 +97,6 @@ namespace SketchAssistantWPF
 
         List<Point> currentLine = new List<Point>();
 
-
-
         public MVP_Model(MVP_Presenter presenter)
         {
             programPresenter = presenter;
@@ -312,6 +310,8 @@ namespace SketchAssistantWPF
         public void SetCurrentCursorPosition(Point p)
         {
             currentCursorPosition = p;
+            //Temporary position of the optipoint change, change this when merging with optitrack branch
+            programPresenter.MoveOptiPoint(currentCursorPosition);
             mouseDown = programPresenter.IsMousePressed();
         }
 

+ 96 - 11
SketchAssistant/SketchAssistantWPF/MVP_Presenter.cs

@@ -27,7 +27,7 @@ namespace SketchAssistantWPF
         /// </summary>
         Dictionary<int, Shape> rightPolyLines;
 
-        ImageDimension CanvasSizeLeft = new ImageDimension(0,0);
+        ImageDimension CanvasSizeLeft = new ImageDimension(0, 0);
 
         ImageDimension CanvasSizeRight = new ImageDimension(0, 0);
 
@@ -213,11 +213,11 @@ namespace SketchAssistantWPF
                     programModel.MouseDown();
                     break;
                 case MouseAction.Up:
-                    if(strokes.Count > 0)
+                    if (strokes.Count > 0)
                     {
                         StylusPointCollection sPoints = strokes.First().StylusPoints;
                         List<Point> points = new List<Point>();
-                        foreach(StylusPoint p in sPoints)
+                        foreach (StylusPoint p in sPoints)
                             points.Add(new Point(p.X, p.Y));
                         programModel.MouseUp(points);
                     }
@@ -263,7 +263,7 @@ namespace SketchAssistantWPF
         /// </summary>
         public void UpdateRightLines(List<Tuple<bool, InternalLine>> lines)
         {
-            foreach(Tuple<bool, InternalLine> tup in lines)
+            foreach (Tuple<bool, InternalLine> tup in lines)
             {
                 var status = tup.Item1;
                 var line = tup.Item2;
@@ -287,21 +287,20 @@ namespace SketchAssistantWPF
             }
             //Calculate similarity scores 
             UpdateSimilarityScore(Double.NaN); var templist = lines.Where(tup => tup.Item1).ToList();
-            if(LeftLines.Count > 0)
+            if (LeftLines.Count > 0)
             {
-                for(int i = 0; i < LeftLines.Count; i++)
+                for (int i = 0; i < LeftLines.Count; i++)
                 {
                     if (templist.Count == i) break;
                     UpdateSimilarityScore(GeometryCalculator.CalculateSimilarity(templist[i].Item2, LeftLines[i]));
                 }
             }
-            else if(templist.Count > 1)
+            else if (templist.Count > 1)
             {
-                UpdateSimilarityScore(GeometryCalculator.CalculateSimilarity(templist[templist.Count-2].Item2, templist[templist.Count-1].Item2));
+                UpdateSimilarityScore(GeometryCalculator.CalculateSimilarity(templist[templist.Count - 2].Item2, templist[templist.Count - 1].Item2));
             }
         }
 
-        /*
         /// <summary>
         /// Updates the currentline
         /// </summary>
@@ -313,7 +312,7 @@ namespace SketchAssistantWPF
             currentLine.Points = new PointCollection(linepoints);
             programView.DisplayCurrLine(currentLine);
         }
-        */
+
         /// <summary>
         /// A function to update the displayed lines in the left canvas.
         /// </summary>
@@ -400,7 +399,7 @@ namespace SketchAssistantWPF
         }
 
         /// <summary>
-        /// 
+        /// Update the similarity score displayed in the UI.
         /// </summary>
         /// <param name="score">Score will be reset if NaN is passed, 
         /// will be ignored if the score is not between 0 and 1</param>
@@ -418,10 +417,96 @@ namespace SketchAssistantWPF
             }
         }
 
+        /// <summary>
+        /// Change the properties of an overlay item.
+        /// </summary>
+        /// <param name="name">The name of the item in the overlay dictionary</param>
+        /// <param name="visible">If the element should be visible</param>
+        /// <param name="position">The new position of the element</param>
+        public void SetOverlayStatus(String name, bool visible, Point position)
+        {
+            Shape shape = new Ellipse(); double visibility = 1; double xDif = 0; double yDif = 0;
+            switch (name)
+            {
+                case "optipoint":
+                    shape = ((MainWindow)programView).OverlayDictionary["optipoint"];
+                    visibility = 0.5; xDif = 2.5; yDif = 2.5;
+                    break;
+                case "startpoint":
+                    shape = ((MainWindow)programView).OverlayDictionary["startpoint"];
+                    xDif = ((MainWindow)programView).markerRadius; yDif = xDif;
+                    break;
+                case "endpoint":
+                    shape = ((MainWindow)programView).OverlayDictionary["endpoint"];
+                    xDif = ((MainWindow)programView).markerRadius; yDif = xDif;
+                    break;
+                default:
+                    Console.WriteLine("Unknown Overlay Item. Please check in MVP_Presenter if this item exists.");
+                    return;
+            }
+            if (visible) shape.Opacity = visibility;
+            else shape.Opacity = 0.00001;
+            Point point = ConvertRightCanvasCoordinateToOverlay(position);
+            shape.Margin = new Thickness(point.X - xDif, point.Y - yDif, 0, 0);
+        }
+
+        /// <summary>
+        /// Change the properties of an overlay item.
+        /// </summary>
+        /// <param name="name">The name of the item in the overlay dictionary</param>
+        /// <param name="visible">If the element should be visible</param>
+        /// <param name="pos1">The new position of the element</param>
+        /// <param name="pos2">The new position of the element</param>
+        public void SetOverlayStatus(String name, bool visible, Point pos1, Point pos2)
+        {
+            Shape shape = new Ellipse();
+            switch (name.Substring(0, 7))
+            {
+                case "dotLine":
+                    if (((MainWindow)programView).OverlayDictionary.ContainsKey(name))
+                    {
+                        shape = ((MainWindow)programView).OverlayDictionary[name];
+                        break;
+                    }
+                    goto default;
+                default:
+                    SetOverlayStatus(name, visible, pos1);
+                    return;
+            }
+            if (visible) shape.Opacity = 1;
+            else shape.Opacity = 0.00001;
+            Point p1 = ConvertRightCanvasCoordinateToOverlay(pos1); Point p2 = ConvertRightCanvasCoordinateToOverlay(pos2);
+            ((Line)shape).X1 = p1.X; ((Line)shape).X2 = p2.X; ((Line)shape).Y1 = p1.Y; ((Line)shape).Y2 = p2.Y;
+        }
+
+        /// <summary>
+        /// Move the optitrack pointer to a new position.
+        /// </summary>
+        /// <param name="position">Position relative to the Rightcanvas</param>
+        public void MoveOptiPoint(Point position)
+        {
+            Point point = ConvertRightCanvasCoordinateToOverlay(position);
+            Shape shape = ((MainWindow)programView).OverlayDictionary["optipoint"];
+            shape.Margin = new Thickness(point.X - 2.5, point.Y - 2.5, 0, 0);
+        }
+
         /*************************/
         /*** HELPING FUNCTIONS ***/
         /*************************/
 
+        /// <summary>
+        /// Convert point relative to the right canvas to a point relative to the overlay canvas.
+        /// </summary>
+        /// <param name="p">The point to convert.</param>
+        /// <returns>The respective overlay canvas.</returns>
+        private Point ConvertRightCanvasCoordinateToOverlay(Point p)
+        {
+            MainWindow main = (MainWindow)programView;
+            double xDif = (main.CanvasLeftEdge.ActualWidth + main.LeftCanvas.ActualWidth + main.CanvasSeperator.ActualWidth);
+            double yDif = (main.ButtonToolbar.ActualHeight);
+            return new Point(p.X + xDif, p.Y + yDif);
+        }
+
         /// <summary>
         /// Sets the visibility of a polyline.
         /// </summary>

+ 14 - 17
SketchAssistant/SketchAssistantWPF/MainWindow.xaml

@@ -1,12 +1,10 @@
-<Window x:Class="SketchAssistantWPF.MainWindow"
-        xmlns:local="clr-namespace:SketchAssistantWPF"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        mc:Ignorable="d"
-        Title="Sketch Assistant" Height="612" Width="914" SizeChanged="Window_SizeChanged">
-    <Grid>
+<Window x:Class="SketchAssistantWPF.MainWindow" 
+    xmlns:local="clr-namespace:SketchAssistantWPF" 
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Title="Sketch Assistant" Height="612" Width="914" SizeChanged="Window_SizeChanged">
+    <Grid x:Name="RootGrid">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="5"/>
             <ColumnDefinition Width="*"/>
@@ -19,8 +17,8 @@
             <RowDefinition Height="*"/>
             <RowDefinition Height="auto"/>
         </Grid.RowDefinitions>
-        <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Background="LightGray">
-            <Menu Background="LightGray"   VerticalAlignment="Center" Padding="5,0,0,0">
+        <StackPanel x:Name="MenuToolbar" Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Background="LightGray">
+            <Menu Background="LightGray" VerticalAlignment="Center" Padding="5,0,0,0">
                 <MenuItem x:Name="LoadMenuButton" Header="Load">
                     <MenuItem x:Name="SVGMenuButton" Header="Import SVG File" Click="SVGMenuItem_Click"/>
                 </MenuItem>
@@ -37,7 +35,7 @@
                 </MenuItem>
             </Menu>
         </StackPanel>
-        <StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="3" Background="LightGray">
+        <StackPanel x:Name="ButtonToolbar" Orientation="Horizontal" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="3" Background="LightGray">
             <Canvas Name="ToolbarSpacer" Width="5" Background="LightGray" />
             <!-- All Icons in the StackPanel taken from openclipart.org -->
             <Button x:Name="CanvasButton" ToolTip="Create a new Canvas" Click="CanvasButton_Click" BorderThickness="0">
@@ -176,14 +174,11 @@
         <Canvas Name="CanvasLeftEdge" Grid.Column="0" Grid.Row="1" Background="LightGray" />
         <Canvas x:Name="LeftCanvas" Background="SlateGray" Grid.Column="1" Grid.Row="1" Height="auto" Grid.ColumnSpan="1"/>
         <Canvas Name="CanvasSeperator" Grid.Column="2" Grid.Row="1" Background="LightGray" />
-        <InkCanvas x:Name="RightCanvas" Background="SlateGray" Grid.Column="3" Grid.Row="1" Height="auto"
-            PreviewMouseDown="RightCanvas_MouseDown" MouseUp="RightCanvas_MouseUp" MouseMove="RightCanvas_MouseMove" Grid.ColumnSpan="2" 
-                    StrokeCollected="RightCanvas_StrokeCollection" EditingMode="None" IsStylusCapturedChanged="RightCanvas_IsStylusCapturedChanged"/>
-
+        <InkCanvas x:Name="RightCanvas" Background="SlateGray" Grid.Column="3" Grid.Row="1" Height="auto" PreviewMouseDown="RightCanvas_MouseDown" MouseUp="RightCanvas_MouseUp" MouseMove="RightCanvas_MouseMove" Grid.ColumnSpan="2" StrokeCollected="RightCanvas_StrokeCollection" EditingMode="None" IsStylusCapturedChanged="RightCanvas_IsStylusCapturedChanged"/>
         <Canvas Name="CanvasRightEdge" Grid.Column="4" Grid.Row="1" Background="LightGray" />
 
         <DockPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="8">
-            <StatusBar DockPanel.Dock="Bottom" Name="StatusBar"  Background="LightGray">
+            <StatusBar DockPanel.Dock="Bottom" Name="StatusBar" Background="LightGray">
                 <TextBox Name="LoadStatusBox" Text="nothing loaded" Background="LightGray"/>
                 <Separator/>
                 <TextBox Name="LastActionBox" Text="none" Background="LightGray"/>
@@ -191,5 +186,7 @@
                 <TextBox Name="LineSimilarityBox" Text="-" Background="LightGray"/>
             </StatusBar>
         </DockPanel>
+        <Ellipse x:Name="optipoint" Opacity="0.00001" Height="5" Width="5" Fill="Black"/>
+        <Canvas x:Name="OverlayCanvas" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Grid.RowSpan="3"/>
     </Grid>
 </Window>

+ 68 - 25
SketchAssistant/SketchAssistantWPF/MainWindow.xaml.cs

@@ -19,6 +19,7 @@ using System.Windows.Navigation;
 using System.Windows.Shapes;
 using System.Windows.Threading;
 using System.Windows.Ink;
+using System.Windows.Media.Effects;
 
 namespace SketchAssistantWPF
 {
@@ -39,7 +40,7 @@ namespace SketchAssistantWPF
                     InDebugMode = true;
                 }
             }
-            if(!InDebugMode)
+            if (!InDebugMode)
             {
                 DebugMode.Visibility = Visibility.Collapsed;
             }
@@ -50,6 +51,8 @@ namespace SketchAssistantWPF
             dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 10);
             ProgramPresenter.Resize(new Tuple<int, int>((int)LeftCanvas.Width, (int)LeftCanvas.Height),
                 new Tuple<int, int>((int)RightCanvas.Width, (int)RightCanvas.Height));
+            //Setup overlay items
+            SetupOverlay();
         }
 
         public enum ButtonState
@@ -95,7 +98,11 @@ namespace SketchAssistantWPF
         /// <summary>
         /// Size of areas marking endpoints of lines in the redraw mode.
         /// </summary>
-        int markerRadius = 10;
+        public int markerRadius = 5;
+        /// <summary>
+        /// Dictionary containing the overlay elements
+        /// </summary>
+        public Dictionary<String, Shape> OverlayDictionary = new Dictionary<string, Shape>();
 
         /********************************************/
         /*** WINDOW SPECIFIC FUNCTIONS START HERE ***/
@@ -131,7 +138,7 @@ namespace SketchAssistantWPF
         /// </summary>
         private void UndoButton_Click(object sender, RoutedEventArgs e)
         {
-            if(!IsMousePressed()) ProgramPresenter.Undo();
+            if (!IsMousePressed()) ProgramPresenter.Undo();
         }
 
         /// <summary>
@@ -165,7 +172,7 @@ namespace SketchAssistantWPF
         /// </summary>
         private void RightCanvas_MouseUp(object sender, MouseButtonEventArgs e)
         {
-            if(strokeCollection.Count == 0)
+            if (strokeCollection.Count == 0)
             {
                 ProgramPresenter.MouseEvent(MVP_Presenter.MouseAction.Up_Invalid, strokeCollection);
             }
@@ -188,7 +195,7 @@ namespace SketchAssistantWPF
             {
                 if (strokeCollection.Count == 0)
                 {
-                    ProgramPresenter.MouseEvent(MVP_Presenter.MouseAction.Up_Invalid,strokeCollection);
+                    ProgramPresenter.MouseEvent(MVP_Presenter.MouseAction.Up_Invalid, strokeCollection);
                 }
                 else
                 {
@@ -232,7 +239,7 @@ namespace SketchAssistantWPF
         /// </summary>
         private void SVGMenuItem_Click(object sender, RoutedEventArgs e)
         {
-            if(ProgramPresenter.SVGToolStripMenuItemClick())
+            if (ProgramPresenter.SVGToolStripMenuItemClick())
                 RightCanvas.EditingMode = InkCanvasEditingMode.Ink;
         }
 
@@ -255,8 +262,10 @@ namespace SketchAssistantWPF
         /// <returns>Whether or not the mouse is pressed.</returns>
         public bool IsMousePressed()
         {
-            if (!debugRunning) {
-                return (Mouse.LeftButton.Equals(MouseButtonState.Pressed) || Mouse.RightButton.Equals(MouseButtonState.Pressed)); }
+            if (!debugRunning)
+            {
+                return (Mouse.LeftButton.Equals(MouseButtonState.Pressed) || Mouse.RightButton.Equals(MouseButtonState.Pressed));
+            }
             else return true;
         }
 
@@ -329,7 +338,7 @@ namespace SketchAssistantWPF
             newPoint.Height = 3; newPoint.Width = 3;
             newPoint.Fill = Brushes.Black;
             RightCanvas.Children.Add(newPoint);
-            newPoint.Margin = new Thickness(line.point.X - 1.5, line.point.Y - 1.5, 0,0);
+            newPoint.Margin = new Thickness(line.point.X - 1.5, line.point.Y - 1.5, 0, 0);
         }
 
         /// <summary>
@@ -502,24 +511,12 @@ namespace SketchAssistantWPF
             switch (canvasName)
             {
                 case ("LeftCanvas"):
-                    if (active)
-                    {
-                        LeftCanvas.Background = Brushes.White;
-                    }
-                    else
-                    {
-                        LeftCanvas.Background = Brushes.SlateGray;
-                    }
+                    if (active) LeftCanvas.Background = Brushes.White;
+                    else LeftCanvas.Background = Brushes.SlateGray;
                     break;
                 case ("RightCanvas"):
-                    if (active)
-                    {
-                        RightCanvas.Background = Brushes.White;
-                    }
-                    else
-                    {
-                        RightCanvas.Background = Brushes.SlateGray;
-                    }
+                    if (active) RightCanvas.Background = Brushes.White;
+                    else RightCanvas.Background = Brushes.SlateGray;
                     break;
                 default:
                     throw new InvalidOperationException("Unknown canvas name, Check that the canvas passed is either LeftCanvas or RightCanvas");
@@ -530,7 +527,51 @@ namespace SketchAssistantWPF
         /*** HELPING FUNCTION ***/
         /************************/
 
+        /// <summary>
+        /// A function that generates the overlay elements and sets all their values.
+        /// </summary>
+        private void SetupOverlay()
+        {
+            DropShadowEffect effect = new DropShadowEffect(); effect.ShadowDepth = 0;
+            OverlayCanvas.Background = null;
+            //Startpoint of a line to be redrawn
+            Ellipse StartPointOverlay = new Ellipse();
+            StartPointOverlay.Height = markerRadius * 2; StartPointOverlay.Width = markerRadius * 2;
+            StartPointOverlay.Fill = Brushes.Green;
+            StartPointOverlay.Effect = effect;
+            OverlayDictionary.Add("startpoint", StartPointOverlay);
+            //Endpoint of a line to be redrawn
+            Ellipse EndPointOverlay = new Ellipse();
+            EndPointOverlay.Height = markerRadius * 2; EndPointOverlay.Width = markerRadius * 2;
+            EndPointOverlay.Fill = Brushes.Green;
+            EndPointOverlay.Effect = effect;
+            OverlayDictionary.Add("endpoint", EndPointOverlay);
+            //Pointer of the optitrack system
+            Ellipse OptitrackMarker = new Ellipse(); OptitrackMarker.Height = 5; OptitrackMarker.Width = 5;
+            OptitrackMarker.Fill = Brushes.LightGray;
+            OptitrackMarker.Effect = effect;
+            OverlayDictionary.Add("optipoint", OptitrackMarker);
+            //10 Dotted Lines for debugging (if more are needed simply extend the for-loop
+            for (int x = 0; x < 10; x++)
+            {
+                Line dotLine = new Line();
+                dotLine.Stroke = Brushes.Red;
+                dotLine.StrokeDashArray = new DoubleCollection { 2 + x, 2 + x };
+                dotLine.StrokeThickness = 1;
+                OverlayDictionary.Add("dotLine" + x.ToString(), dotLine);
+            }
 
+            //Common features of all overlay items
+            foreach (KeyValuePair<String, Shape> s in OverlayDictionary)
+            {
+                OverlayCanvas.Children.Add(s.Value);
+                s.Value.Opacity = 0.00001;
+                s.Value.IsHitTestVisible = false;
+            }
+
+            //Enable optipoint initially
+            ProgramPresenter.SetOverlayStatus("optipoint", true, GetCursorPosition());
+        }
 
         /// <summary>
         /// Sends inputs to the presenter simulating drawing, used for testing and debugging.
@@ -568,6 +609,8 @@ namespace SketchAssistantWPF
             Debug(4);
         }
 
+
+
         /// <summary>
         /// A function which simulates canvas input for debugging.
         /// </summary>

+ 174 - 174
SketchAssistant/WhiteTests/UITest.cs

@@ -102,11 +102,11 @@ namespace WhiteTests
         {
             Window mainWindow = setupapp();
             InputSimulator inputSimulator = new InputSimulator();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             string[] files = Directory.GetFiles(getSketchAssistantDirectory() + @"\whitelisted", "*.svg", SearchOption.AllDirectories);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("LoadMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("SVGMenuButton")).Click();
             Thread.Sleep(1000);
             inputSimulator.Keyboard.TextEntry(getSketchAssistantDirectory() + @"whitelisted\" + filename + ".svg");
@@ -122,21 +122,21 @@ namespace WhiteTests
         public void DrawLineOnCanvasTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(100,100);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(100, 100);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -146,23 +146,23 @@ namespace WhiteTests
         public void UndoLineOnCanvasTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(0, 200);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(500, 300);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
             Thread.Sleep(100);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -174,31 +174,31 @@ namespace WhiteTests
         public void InvalidLineTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DrawButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonDown();
             inputSimulator.Mouse.MoveMouseBy(0, 200);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(500, 300);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(-1000, 0);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonDown();
             inputSimulator.Mouse.MoveMouseBy(1000, 0);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -208,7 +208,7 @@ namespace WhiteTests
         public void PointsOnCanvasSimilarityTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -216,24 +216,24 @@ namespace WhiteTests
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
             inputSimulator.Mouse.MoveMouseBy(0, 200);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("-", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("1", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("-", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("1", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
             mainWindow.Close();
@@ -244,10 +244,10 @@ namespace WhiteTests
         public void CreateCanvasTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -257,15 +257,15 @@ namespace WhiteTests
         public void DrawLineTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -277,27 +277,27 @@ namespace WhiteTests
         public void DeleteLineTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DrawButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -309,21 +309,21 @@ namespace WhiteTests
         public void UndoTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -333,25 +333,25 @@ namespace WhiteTests
         public void RedoTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -361,27 +361,27 @@ namespace WhiteTests
         public void DrawSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(30000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -390,35 +390,35 @@ namespace WhiteTests
         public void DeleteSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(24000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugThree")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Thread.Sleep(10000);
             Assert.AreEqual("Last Action: Line number 0 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -430,35 +430,35 @@ namespace WhiteTests
         public void UndoSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(30000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -467,43 +467,43 @@ namespace WhiteTests
         public void RedoSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(24000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -512,57 +512,57 @@ namespace WhiteTests
         public void UndoAndRedoTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(24000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugThree")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -571,31 +571,31 @@ namespace WhiteTests
         public void UndoAndDrawTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -604,37 +604,37 @@ namespace WhiteTests
         public void DeleteSeveralLinesAtOnceTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Several Lines were deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -643,19 +643,19 @@ namespace WhiteTests
         public void PointDrawTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(4000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -664,43 +664,43 @@ namespace WhiteTests
         public void NewCanvasAfterDrawTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugThree")).Click();
             Thread.Sleep(4000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             // Click on No button in warning
             Window messageBox0 = mainWindow.MessageBox("Warning");
             messageBox0.Get<Button>(SearchCriteria.ByText("No")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             // close warning
             Window messageBox1 = mainWindow.MessageBox("Warning");
             messageBox1.Close();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             // click yes button on warning
             Window messageBox2 = mainWindow.MessageBox("Warning");
             messageBox2.Get<Button>(SearchCriteria.ByText("Yes")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
     }