UserOutingLoginViewModel.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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;
  7. using PDF_Master.CustomControl;
  8. using PDF_Master.Helper;
  9. using PDF_Master.Properties;
  10. using PDF_Master.Views.Dialog.ServiceDialog;
  11. using Prism.Commands;
  12. using Prism.Mvvm;
  13. using Prism.Regions;
  14. using Prism.Services.Dialogs;
  15. namespace PDF_Master.ViewModels.Dialog.ServiceDialog
  16. {
  17. public class UserOutingLoginViewModel : BindableBase, IDialogAware
  18. {
  19. public string Title => "";
  20. public event Action<IDialogResult> RequestClose;
  21. public void Close()
  22. {
  23. RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
  24. }
  25. public bool CanCloseDialog()
  26. {
  27. return true;
  28. }
  29. public void OnDialogClosed()
  30. {
  31. }
  32. public void OnDialogOpened(IDialogParameters parameters)
  33. {
  34. }
  35. #region 文案
  36. private string _Text_useroutinglogin = "";
  37. public string Text_useroutinglogin
  38. {
  39. get { return _Text_useroutinglogin; }
  40. set
  41. {
  42. SetProperty(ref _Text_useroutinglogin, value);
  43. }
  44. }
  45. private string _Text_useroutingloginmsg1 = "";
  46. public string Text_useroutingloginmsg1
  47. {
  48. get { return _Text_useroutingloginmsg1; }
  49. set
  50. {
  51. SetProperty(ref _Text_useroutingloginmsg1, value);
  52. }
  53. }
  54. private string _Text_useroutingloginmsg2 = "";
  55. public string Text_useroutingloginmsg2
  56. {
  57. get { return _Text_useroutingloginmsg2; }
  58. set
  59. {
  60. SetProperty(ref _Text_useroutingloginmsg2, value);
  61. }
  62. }
  63. private string _Text_ok = "";
  64. public string Text_ok
  65. {
  66. get { return _Text_ok; }
  67. set
  68. {
  69. SetProperty(ref _Text_ok, value);
  70. }
  71. }
  72. private void InitString()
  73. {
  74. Text_useroutinglogin = App.ServiceLoader.GetString("Text_useroutinglogin");
  75. Text_useroutingloginmsg1 = App.ServiceLoader.GetString("Text_useroutingloginmsg1");
  76. Text_useroutingloginmsg2 = App.ServiceLoader.GetString("Text_useroutingloginmsg2");
  77. Text_ok = App.ServiceLoader.GetString("Text_ok");
  78. }
  79. #endregion
  80. public UserOutingLoginViewModel(IRegionManager regionManager, IDialogService dialogService)
  81. {
  82. InitString();
  83. }
  84. }
  85. }