RecipesTableCompareDialogViewModel.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using FurnaceUI.Views.Recipes;
  2. using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
  3. using MECF.Framework.UI.Client.ClientBase;
  4. using System.Collections.ObjectModel;
  5. using System.Linq;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. namespace FurnaceUI.Client.Dialog
  9. {
  10. public class ItemsSelectDialogViewModel : ModuleUiViewModelBase
  11. {
  12. #region properties
  13. public int ColumnsCount { get; set; } = 1;
  14. public ObservableCollection<TwoTableDataItem> Items { get; set; } = new ObservableCollection<TwoTableDataItem>();
  15. public int ButtonHeight { get; set; } = 50;
  16. public int ButtonWidth { get; set; } = 200;
  17. public int ButtonMargin { get; set; } = 5;
  18. public TwoTableDataItem SelectedItem { get; set; }
  19. public bool IsSingleModule { get; set; } = false;
  20. public string Result
  21. {
  22. get
  23. {
  24. string strRet = string.Empty;
  25. return strRet.Trim(',');
  26. }
  27. }
  28. #endregion
  29. #region Function
  30. public void OK()
  31. {
  32. (this.GetView() as Window).DialogResult = true;
  33. }
  34. public void Cancel()
  35. {
  36. (this.GetView() as Window).DialogResult = false;
  37. }
  38. #endregion
  39. }
  40. }