示例#1
0
 void OnHelpTextReceived(object sender, IHelpDescriptor desc)
 {
     try
     {
         CurrentHelpText = new HelpDescriptorViewModel(desc);
     }
     catch (Exception)
     {
         CurrentHelpText = _defaultViewModel;
         throw;
     }
 }
示例#2
0
 public void UpdateHelpText(string helpText)
 {
     if (string.IsNullOrWhiteSpace(helpText))
     {
         var textToDisplay = Resources.Languages.Core.StandardStyling.Replace("\r\n", "") +
                             Resources.Languages.HelpText.WarewolfDefaultHelpDescription +
                             Resources.Languages.Core.StandardBodyParagraphClosing;
         CurrentHelpText = new HelpDescriptorViewModel(new HelpDescriptor("", textToDisplay, null));
         WebPageVisible  = true;
     }
     else
     {
         WebPageVisible = false;
         var textToDisplay = Resources.Languages.Core.StandardStyling.Replace("\r\n", "") +
                             helpText +
                             Resources.Languages.Core.StandardBodyParagraphClosing;
         CurrentHelpText = new HelpDescriptorViewModel(new HelpDescriptor("", textToDisplay, null));
     }
     OnPropertyChanged(() => WebPageVisible);
 }