MVP_View.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Drawing;
  7. namespace SketchAssistant
  8. {
  9. public interface MVP_View
  10. {
  11. /// <summary>
  12. /// Enables the timer of the View, which will tick the Presenter.
  13. /// </summary>
  14. void EnableTimer();
  15. /// <summary>
  16. /// A function that opens a file dialog and returns the filename.
  17. /// </summary>
  18. /// <param name="Filter">The filter that should be applied to the new Dialog.</param>
  19. /// <returns>Returns the FileName and the SafeFileName if the user correctly selects a file,
  20. /// else returns a tuple with empty strigns</returns>
  21. Tuple<String, String> openNewDialog(String Filter);
  22. /// <summary>
  23. /// Sets the contents of the load status indicator label.
  24. /// </summary>
  25. /// <param name="message">The new contents</param>
  26. void SetToolStripLoadStatus(String message);
  27. /// <summary>
  28. /// Sets the contents of the last action taken indicator label.
  29. /// </summary>
  30. /// <param name="message">The new contents</param>
  31. void SetLastActionTakenText(String message);
  32. /// <summary>
  33. /// Changes the states of a tool strip button.
  34. /// </summary>
  35. /// <param name="buttonName">The name of the button.</param>
  36. /// <param name="state">The new state of the button.</param>
  37. void SetToolStripButtonStatus(String buttonName, Form1.ButtonState state);
  38. /// <summary>
  39. /// Displays an image in the left Picture box.
  40. /// </summary>
  41. /// <param name="img">The new image.</param>
  42. void DisplayInLeftPictureBox(Image img);
  43. /// <summary>
  44. /// Displays an image in the right Picture box.
  45. /// </summary>
  46. /// <param name="img">The new image.</param>
  47. void DisplayInRightPictureBox(Image img);
  48. /// <summary>
  49. /// shows the given info message in a popup and asks the user to aknowledge it
  50. /// </summary>
  51. /// <param name="message">the message to show</param>
  52. void ShowInfoMessage(String message);
  53. /// <summary>
  54. /// Shows a warning box with the given message (Yes/No Buttons)and returns true if the user aknowledges it.
  55. /// </summary>
  56. /// <param name="message">The message of the warning.</param>
  57. /// <returns>True if the user confirms (Yes), negative if he doesn't (No)</returns>
  58. bool ShowWarning(String message);
  59. }
  60. }