RobotViewModel.cs 632 B

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