Пример #1
0
        public FileTypeWindowViewModel(ChildWindow aChildWindow, FileTypeWindowType aFileTypeWindowType, FileTypeEntity aFileTypeEntity)
        {
            childWindow        = aChildWindow;
            fileTypeWindowType = aFileTypeWindowType;
            FileTypeEntity     = aFileTypeEntity;

            if (aFileTypeWindowType == FileTypeWindowType.ADD)
            {
                Title = "添加档案类型";
            }
            else
            {
                Title = "修改档案类型";
            }

            OnOK     = new DelegateCommand(onOK);
            OnCancel = new DelegateCommand(onCancel);
        }
        public FileTypeWindowViewModel(ChildWindow aChildWindow, FileTypeWindowType aFileTypeWindowType, FileTypeEntity aFileTypeEntity)
        {
            childWindow = aChildWindow;
            fileTypeWindowType = aFileTypeWindowType;
            FileTypeEntity = aFileTypeEntity;

            if (aFileTypeWindowType == FileTypeWindowType.ADD)
            {
                Title = "添加档案类型";
            }
            else
            {
                Title = "修改档案类型";
            }

            OnOK = new DelegateCommand(onOK);
            OnCancel = new DelegateCommand(onCancel);
        }
Пример #3
0
 public FileTypeWindow(FileTypeWindowType aFileTypeWindowType, FileTypeEntity aFileTypeEntity)
 {
     InitializeComponent();
     this.DataContext = new FileTypeWindowViewModel(this, aFileTypeWindowType, aFileTypeEntity);
 }