DataSeriesEditViewModel.cs 895 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Input;
  6. using Aitex.UI.Charting.Command;
  7. using System.Windows.Controls;
  8. namespace Aitex.UI.Charting.ViewModel
  9. {
  10. public class DataSeriesEditViewModel : ChartingBaseViewModel
  11. {
  12. public DataSeriesEditViewModel()
  13. {
  14. CommonViewModel = CommonViewModel.Instance;
  15. }
  16. public CommonViewModel CommonViewModel { get; private set; }
  17. public System.Windows.Media.Color ? ChangeLineColorCommand()
  18. {
  19. var dlg = new System.Windows.Forms.ColorDialog();
  20. if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  21. {
  22. return new System.Windows.Media.Color() { A = dlg.Color.A, B = dlg.Color.B, G = dlg.Color.G, R = dlg.Color.R };
  23. }
  24. return null;
  25. }
  26. }
  27. }