终端一体化运控平台
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

35 Zeilen
896 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows.Data;
  7. namespace BeDesignerSCADA.Converters
  8. {
  9. [ValueConversion(typeof(float), typeof(float))]
  10. public class MathAbsConverter : IValueConverter
  11. {
  12. static MathAbsConverter()
  13. {
  14. Instance = new MathAbsConverter();
  15. }
  16. public static MathAbsConverter Instance
  17. {
  18. get;
  19. private set;
  20. }
  21. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  22. {
  23. return Math.Abs((float)value);
  24. }
  25. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  26. {
  27. throw new NotImplementedException();
  28. }
  29. }
  30. }