예제 #1
0
        public ReturnPackageMainWindow(ReturnPackage returnPackage)
        {
            InitializeComponent();

            var returnFilesViewModel = new ReturnFilesViewModel(returnPackage, this);

            _returnPackageFiles = new ReturnFiles(returnFilesViewModel);

            _cellViewModel = new CellViewModel();

            var returnPackageMainWindowViewModel = new ReturnPackageMainWindowViewModel(returnFilesViewModel, _cellViewModel, this);

            DataContext = returnPackageMainWindowViewModel;
            if (returnPackageMainWindowViewModel.CloseAction == null)
            {
                returnPackageMainWindowViewModel.CloseAction = Close;
            }
        }
예제 #2
0
        public ReturnPackageMainWindow(ReturnPackage returnPackage)
        {
            InitializeComponent();

            IMessageBoxService messageBoxService = new MessageBoxService();
            var returnFilesViewModel             = new ReturnFilesViewModel(returnPackage, messageBoxService);

            if (returnFilesViewModel?.ProjectFiles == null)
            {
                Close();
                return;
            }

            _returnPackageFiles = new ReturnFiles(returnFilesViewModel);
            _cellViewModel      = new CellViewModel();

            var returnPackageMainWindowViewModel = new ReturnPackageMainWindowViewModel(returnFilesViewModel, _cellViewModel, messageBoxService);

            DataContext = returnPackageMainWindowViewModel;
            if (returnPackageMainWindowViewModel.CloseAction == null)
            {
                returnPackageMainWindowViewModel.CloseAction = Close;
            }
        }
 public ReturnFiles(ReturnFilesViewModel returnFilesViewModel)
 {
     DataContext = returnFilesViewModel;
     InitializeComponent();
 }