Files
Partsource/PartSource.Backoffice/Components/TaskSetup.xaml.cs
2020-11-04 18:44:14 -05:00

51 lines
972 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace PartSource.Backoffice.Components
{
/// <summary>
/// Interaction logic for TaskSetup.xaml
/// </summary>
public partial class TaskSetup : UserControl
{
public IList<string> SelectedTasks
{
get
{
IList<string> selectedTasks = new List<string>();
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();
}
}
}