WaiGuaViewModel.cs 636 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.ComponentModel.Composition;
  3. using Microsoft.Practices.Prism.ViewModel;
  4. namespace Modules.WaiGua
  5. {
  6. [Export(contractType: typeof (WaiGuaViewModel)),
  7. PartCreationPolicy(creationPolicy: CreationPolicy.NonShared)]
  8. internal class WaiGuaViewModel: NotificationObject
  9. {
  10. private string logText = "";
  11. public string LogText
  12. {
  13. get
  14. {
  15. return this.logText;
  16. }
  17. set
  18. {
  19. if (this.logText == value)
  20. {
  21. return;
  22. }
  23. this.logText = value;
  24. this.RaisePropertyChanged("LogText");
  25. }
  26. }
  27. public void Start()
  28. {
  29. this.LogText += "11111111111" + Environment.NewLine;
  30. }
  31. }
  32. }