Example #1
0
 private void ButtonRemoveAll_Click(object sender, RoutedEventArgs e)
 {
     foreach (var ddc in StateControl.Instance.AvailableDataHolders)
     {
         CheckedItemHelper.SetIsChecked(ddc, false);
     }
 }
Example #2
0
        private void ButtonRemoveSelected_Click(object sender, RoutedEventArgs e)
        {
            var copy = SelectedColumnOrderListBox.SelectedItems.Cast <DataColumn>().ToList();

            foreach (var column in copy)
            {
                CheckedItemHelper.SetIsChecked(column, false);
            }
        }
Example #3
0
 private void AddRemoveCheckedItems()
 {
     foreach (var ddc in StateControl.Instance.AvailableDataHolders)
     {
         foreach (var column in ddc.Columns)
         {
             var chkd = (bool)CheckedItemHelper.GetIsChecked(column);
             if (chkd && !StateControl.Instance.Columns.Contains(column))
             {
                 StateControl.Instance.Columns.Add(column);
             }
             else if (!chkd && StateControl.Instance.Columns.Contains(column))
             {
                 StateControl.Instance.Columns.Remove(column);
             }
         }
     }
 }