コード例 #1
0
        //private AdditionalTechnologyAreasPicker picker;

        #endregion

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

            RemoveAdditionalTechAreaCommand = new DelegateCommand <ContributionTechnologyModel>(RemoveAdditionalArea);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #4
0
        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;
        }