终端一体化运控平台
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

57 linhas
1.7 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using BPASmart.Model;
  7. using Microsoft.Toolkit.Mvvm.Input;
  8. using System.Windows;
  9. using BPA.Helper;
  10. using System.Windows.Forms;
  11. namespace BPASmart.ConfigurationSoftware
  12. {
  13. public class NewProjectViewModel : NoticeBase
  14. {
  15. public NewProjectViewModel()
  16. {
  17. OpenBrowserDialogCommand = new RelayCommand(() =>
  18. {
  19. FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
  20. if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
  21. {
  22. NewData.ProjectPath = folderBrowserDialog.SelectedPath;
  23. }
  24. });
  25. CreateCommand = new RelayCommand(() =>
  26. {
  27. ActionManage.GetInstance.Send("CreateCommand", NewData);
  28. });
  29. CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("CancelCommand"); });
  30. }
  31. public NewDataModel NewData { get { return _mNewData; } set { _mNewData = value; OnPropertyChanged(); } }
  32. private NewDataModel _mNewData = new NewDataModel();
  33. //public string ProjectName { get { return _mProjectName; } set { _mProjectName = value; OnPropertyChanged(); } }
  34. //private string _mProjectName;
  35. //public string ProjectPath { get { return _mProjectPath; } set { _mProjectPath = value; OnPropertyChanged(); } }
  36. //private string _mProjectPath;
  37. public RelayCommand CreateCommand { get; set; }
  38. public RelayCommand OpenBrowserDialogCommand { get; set; }
  39. public RelayCommand CancelCommand { get; set; }
  40. }
  41. }