RobotViewModel.cs 722 B

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