Ejemplo n.º 1
0
        private void removeReport_Click(object sender, RoutedEventArgs e)
        {
            reports = (ClashReports)reportsListBox.DataContext;
            System.Collections.IList selectedReports = reportsListBox.SelectedItems;

            if (selectedReports.Count != 0)
            {
                reports.RemoveItems(selectedReports);
            }
        }
Ejemplo n.º 2
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);
            }
        }
Ejemplo n.º 3
0
        private void addReport_Click(object sender, RoutedEventArgs e)
        {
            reports = (ClashReports)reportsListBox.DataContext;

            if (reports == null)
            {
                return;
            }

            reports.Add();

            availableParameters = (AvailableParameters)LeftParamListBox.DataContext;

            if (reports.Parameters.Count != 0)
            {
                foreach (Parameter param in reports.Parameters)
                {
                    if (!selectedParameters.Contains(param) && !availableParameters.Contains(param))
                    {
                        availableParameters.Add(param);
                    }
                }
            }
        }