Пример #1
0
        private void Ok_Button_Click(object sender, RoutedEventArgs e)
        {
            selectedParameters = (SelectedParameters)RightParamListBox.DataContext;
            reports            = (ClashReports)reportsListBox.DataContext;

            if (selectedParameters.Count != 0)
            {
                reports.WriteToFile(selectedParameters);
            }
        }
Пример #2
0
        private void removeParam_Click(object sender, RoutedEventArgs e)
        {
            availableParameters = (AvailableParameters)LeftParamListBox.DataContext;
            selectedParameters  = (SelectedParameters)RightParamListBox.DataContext;

            System.Collections.IList parametersSelection = RightParamListBox.SelectedItems;

            if (parametersSelection.Count != 0)
            {
                //Add Param back to the available parameters list
                availableParameters.AddItems(parametersSelection);
                //remove Param from the selected parameters list
                selectedParameters.RemoveItems(parametersSelection);
            }
        }