WebBrowserFormBase.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Text.RegularExpressions;
  8. using System.Windows.Forms;
  9. using FastReport.Forms;
  10. namespace FastReport.Cloud.StorageClient
  11. {
  12. /// <summary>
  13. /// Represents the base form for cloud storage web browsers.
  14. /// </summary>
  15. public partial class WebBrowserFormBase : BaseDialogForm
  16. {
  17. #region Fields
  18. private string url;
  19. #endregion // Fields
  20. #region Properties
  21. /// <summary>
  22. /// Gets or sets the url string.
  23. /// </summary>
  24. public string Url
  25. {
  26. get { return url; }
  27. set { url = value; }
  28. }
  29. #endregion // Properties
  30. #region Constructors
  31. /// <summary>
  32. /// Initizlizes a new instance of the <see cref="WebBrowserFormBase"/> class.
  33. /// </summary>
  34. public WebBrowserFormBase()
  35. {
  36. url = "";
  37. InitializeComponent();
  38. }
  39. /// <summary>
  40. /// Initializes a new instance of the <see cref="WebBrowserFormBase"/> class.
  41. /// </summary>
  42. /// <param name="url">The url string.</param>
  43. public WebBrowserFormBase(string url)
  44. {
  45. this.url = url;
  46. InitializeComponent();
  47. }
  48. #endregion // Constructors
  49. #region Events Handlers
  50. /// <summary>
  51. /// Handle the web browser form shown event.
  52. /// </summary>
  53. /// <param name="sender">The event sender.</param>
  54. /// <param name="e">The event args.</param>
  55. protected void WebBrowserFormBase_Shown(object sender, EventArgs e)
  56. {
  57. wbBrowser.Navigate(url);
  58. }
  59. #endregion // Events Handlers
  60. }
  61. }