Beispiel #1
0
        public ContributionEditorDialogViewModel()
        {
            if (DesignMode.DesignModeEnabled || DesignMode.DesignMode2Enabled)
            {
                Types                = DesignTimeHelpers.GenerateContributionTypes();
                Visibilities         = DesignTimeHelpers.GenerateVisibilities();
                UploadQueue          = DesignTimeHelpers.GenerateContributions();
                SelectedContribution = UploadQueue.FirstOrDefault();
            }

            RemoveAdditionalTechAreaCommand = new DelegateCommand <ContributionTechnologyModel>(RemoveAdditionalArea);
        }
        public AddContributionsViewModel()
        {
            if (DesignMode.DesignModeEnabled || DesignMode.DesignMode2Enabled)
            {
                Types                = DesignTimeHelpers.GenerateContributionTypes();
                Visibilities         = DesignTimeHelpers.GenerateVisibilities();
                UploadQueue          = DesignTimeHelpers.GenerateContributions();
                SelectedContribution = UploadQueue.FirstOrDefault();

                return;
            }

            EditQueuedContributionCommand   = new DelegateCommand <ContributionsModel>(async cont => await EditContribution(cont));
            RemoveQueuedContributionCommand = new DelegateCommand <ContributionsModel>(async cont => await RemoveContribution(cont));
            RemoveAdditionalTechAreaCommand = new DelegateCommand <ContributionTechnologyModel>(RemoveAdditionalArea);

            UploadQueue.CollectionChanged += UploadQueue_CollectionChanged;
        }