AskPasswordForm.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.Windows.Forms;
  8. using FastReport.Utils;
  9. namespace FastReport.Forms
  10. {
  11. internal partial class AskPasswordForm : BaseDialogForm
  12. {
  13. public string Password
  14. {
  15. get { return tbPassword.Text; }
  16. }
  17. private void AskPasswordForm_Shown(object sender, EventArgs e)
  18. {
  19. tbPassword.Focus();
  20. }
  21. private void AskPasswordForm_FormClosed(object sender, FormClosedEventArgs e)
  22. {
  23. if (DialogResult != DialogResult.OK)
  24. tbPassword.Text = "";
  25. }
  26. public override void Localize()
  27. {
  28. base.Localize();
  29. MyRes res = new MyRes("Forms,AskPassword");
  30. Text = res.Get("");
  31. lblPassword.Text = res.Get("Password");
  32. }
  33. public override void UpdateDpiDependencies()
  34. {
  35. base.UpdateDpiDependencies();
  36. pbPicture.Image = GetImage("Images.Password.png");
  37. }
  38. public AskPasswordForm()
  39. {
  40. InitializeComponent();
  41. Localize();
  42. UIUtils.CheckRTL(this);
  43. UpdateDpiDependencies();
  44. }
  45. }
  46. }