//private AdditionalTechnologyAreasPicker picker;

        #endregion

        public ContributionDetailViewModel()
        {
            if (DesignMode.DesignModeEnabled || DesignMode.DesignMode2Enabled)
            {
                Visibilities         = DesignTimeHelpers.GenerateVisibilities();
                SelectedContribution = DesignTimeHelpers.GenerateContributions().FirstOrDefault();
            }

            RemoveAdditionalTechAreaCommand = new DelegateCommand <ContributionTechnologyModel>(RemoveAdditionalArea);
        }
Exemplo n.º 2
0
        public ContributionDetailViewModel(ContributionsModel contribution)
        {
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                Visibilities         = DesignTimeHelpers.GenerateVisibilities();
                SelectedContribution = DesignTimeHelpers.GenerateContributions().FirstOrDefault();
            }

            SelectedContribution = contribution;

            RemoveAdditionalTechAreaCommand = new DelegateCommand <ContributionTechnologyModel>(RemoveAdditionalArea);
        }
Exemplo n.º 3
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;
        }