From 2dc7a565f52556f334f8426e93c2071578b8b2db Mon Sep 17 00:00:00 2001 From: Tom Raterman Date: Wed, 4 Nov 2020 18:44:14 -0500 Subject: [PATCH] Backoffice fun --- .../Components/TaskSetup.xaml | 8 +++---- .../Components/TaskSetup.xaml.cs | 24 +++++++++++++++++++ PartSource.Backoffice/MainWindow.xaml | 2 +- PartSource.Backoffice/MainWindow.xaml.cs | 8 +++++++ 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/PartSource.Backoffice/Components/TaskSetup.xaml b/PartSource.Backoffice/Components/TaskSetup.xaml index c8a008f..0180e51 100644 --- a/PartSource.Backoffice/Components/TaskSetup.xaml +++ b/PartSource.Backoffice/Components/TaskSetup.xaml @@ -8,9 +8,9 @@ d:DesignHeight="450" d:DesignWidth="800" Padding="10"> - - Metafield Groups: - - + + Metafield Groups: + + diff --git a/PartSource.Backoffice/Components/TaskSetup.xaml.cs b/PartSource.Backoffice/Components/TaskSetup.xaml.cs index f725008..4c3ba81 100644 --- a/PartSource.Backoffice/Components/TaskSetup.xaml.cs +++ b/PartSource.Backoffice/Components/TaskSetup.xaml.cs @@ -18,6 +18,30 @@ namespace PartSource.Backoffice.Components /// public partial class TaskSetup : UserControl { + public IList SelectedTasks + { + get + { + IList selectedTasks = new List(); + + foreach (object control in ContentPanel.Children) + { + switch (control) + { + case CheckBox checkbox: + if (checkbox.IsChecked.GetValueOrDefault()) + { + selectedTasks.Add(checkbox.Name); + } + + break; + } + } + + return selectedTasks; + } + } + public TaskSetup() { InitializeComponent(); diff --git a/PartSource.Backoffice/MainWindow.xaml b/PartSource.Backoffice/MainWindow.xaml index ed63ec2..e93a7a7 100644 --- a/PartSource.Backoffice/MainWindow.xaml +++ b/PartSource.Backoffice/MainWindow.xaml @@ -33,7 +33,7 @@ - +