MVP_View.cs 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows.Controls;
  7. using System.Windows.Shapes;
  8. namespace SketchAssistantWPF
  9. {
  10. public interface MVP_View
  11. {
  12. /// <summary>
  13. /// Updates the colour of a canvas.
  14. /// </summary>
  15. /// <param name="canvasName">The name of the canvas to be updated.</param>
  16. /// <param name="active">Whether or not the canvas is active.</param>
  17. void SetCanvasState(string canvasName, bool active);
  18. /// <summary>
  19. /// Remove the current line.
  20. /// </summary>
  21. void RemoveCurrLine();
  22. /// <summary>
  23. /// Display the current line.
  24. /// </summary>
  25. /// <param name="line">The current line to display</param>
  26. void DisplayCurrLine(Polyline line);
  27. /// <summary>
  28. /// Removes all Lines from the left canvas.
  29. /// </summary>
  30. void RemoveAllLeftLines();
  31. /// <summary>
  32. /// Removes all lines in the right canvas.
  33. /// </summary>
  34. void RemoveAllRightLines();
  35. /// <summary>
  36. /// Adds another Line that will be displayed in the left display.
  37. /// </summary>
  38. /// <param name="newLine">The new Polyline to be added displayed.</param>
  39. void AddNewLineLeft(Polyline newLine);
  40. /// <summary>
  41. /// Adds another Line that will be displayed in the right display.
  42. /// </summary>
  43. /// <param name="newLine">The new Polyline to be added displayed.</param>
  44. void AddNewLineRight(Polyline newLine);
  45. /// <summary>
  46. /// Enables the timer of the View, which will tick the Presenter.
  47. /// </summary>
  48. void EnableTimer();
  49. /// <summary>
  50. /// A function that opens a file dialog and returns the filename.
  51. /// </summary>
  52. /// <param name="Filter">The filter that should be applied to the new Dialog.</param>
  53. /// <returns>Returns the FileName and the SafeFileName if the user correctly selects a file,
  54. /// else returns a tuple with empty strigns</returns>
  55. Tuple<String, String> openNewDialog(String Filter);
  56. /// <summary>
  57. /// Sets the contents of the load status indicator label.
  58. /// </summary>
  59. /// <param name="message">The new contents</param>
  60. void SetToolStripLoadStatus(String message);
  61. /// <summary>
  62. /// Sets the contents of the last action taken indicator label.
  63. /// </summary>
  64. /// <param name="message">The new contents</param>
  65. void SetLastActionTakenText(String message);
  66. /// <summary>
  67. /// Changes the states of a tool strip button.
  68. /// </summary>
  69. /// <param name="buttonName">The name of the button.</param>
  70. /// <param name="state">The new state of the button.</param>
  71. void SetToolStripButtonStatus(String buttonName, MainWindow.ButtonState state);
  72. /// <summary>
  73. /// shows the given info message in a popup and asks the user to aknowledge it
  74. /// </summary>
  75. /// <param name="message">the message to show</param>
  76. void ShowInfoMessage(String message);
  77. /// <summary>
  78. /// Shows a warning box with the given message (Yes/No Buttons)and returns true if the user aknowledges it.
  79. /// </summary>
  80. /// <param name="message">The message of the warning.</param>
  81. /// <returns>True if the user confirms (Yes), negative if he doesn't (No)</returns>
  82. bool ShowWarning(String message);
  83. }
  84. }