Exemple #1
0
 public static void InitFormatterViewModel(IPropertyEditorViewModel propertyEditorViewModel,
                                           IUshortsFormatterViewModel formatterViewModel)
 {
     propertyEditorViewModel.FormatterParametersViewModel = new FormatterParametersViewModel();
     propertyEditorViewModel.FormatterParametersViewModel.RelatedUshortsFormatterViewModel =
         formatterViewModel;
 }
        public IUshortsFormatter CreateUshortsParametersFormatter(IUshortsFormatterViewModel ushortsFormatterViewModel)
        {
            if (ushortsFormatterViewModel is UshortsFormatterViewModelBase ushortsFormatterViewModelBase)
            {
                return(ushortsFormatterViewModelBase.Accept(new SaveFormatterViewModelVisitor()));
            }

            return(null);
        }
 public bool ReturnsString(IUshortsFormatterViewModel formatterViewModel)
 {
     if (formatterViewModel is AsciiStringFormatterViewModel)
     {
         return(true);
     }
     if (formatterViewModel is StringFormatter1251ViewModel)
     {
         return(true);
     }
     return(false);
 }