ClientInfoForm.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using System.Windows.Forms;
  3. using FastReport.Forms;
  4. using FastReport.Utils;
  5. namespace FastReport.Cloud.StorageClient.SkyDrive
  6. {
  7. /// <summary>
  8. /// Represents the Client Info diabolg form.
  9. /// </summary>
  10. public partial class ClientInfoForm : BaseDialogForm
  11. {
  12. #region Fields
  13. #pragma warning disable FR0001 // Field names must be longer than 2 characters.
  14. private string id;
  15. #pragma warning restore FR0001 // Field names must be longer than 2 characters.
  16. private string secret;
  17. #endregion // Fields
  18. #region Properties
  19. /// <summary>
  20. /// Gets the client ID.
  21. /// </summary>
  22. public string Id
  23. {
  24. get { return id; }
  25. }
  26. /// <summary>
  27. /// Gets the client secret.
  28. /// </summary>
  29. public string Secret
  30. {
  31. get { return secret; }
  32. }
  33. #endregion // Properties
  34. #region Constructors
  35. /// <summary>
  36. /// Initializes a new instance of the <see cref="ClientInfoForm"/> class.
  37. /// </summary>
  38. public ClientInfoForm()
  39. {
  40. this.id = "";
  41. this.secret = "";
  42. InitializeComponent();
  43. Localize();
  44. UIUtils.CheckRTL(this);
  45. UpdateDpiDependencies();
  46. }
  47. #endregion // Constructors
  48. #region Public Methods
  49. /// <inheritdoc/>
  50. public override void Localize()
  51. {
  52. base.Localize();
  53. MyRes res = new MyRes("Cloud,SkyDrive");
  54. this.Text = res.Get("ClientInfoDialog");
  55. labelClientId.Text = res.Get("ClientId");
  56. }
  57. #endregion // Public Methods
  58. #region Events Handlers
  59. private void btnOk_Click(object sender, EventArgs e)
  60. {
  61. id = tbClientId.Text;
  62. this.Close();
  63. }
  64. #endregion // Events Handlers
  65. }
  66. }