Exemple #1
0
        private void OpenCSV(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            if (openFileDialog.ShowDialog() == true)
            {
                string[] affectations = File.ReadAllLines(openFileDialog.FileName);
                var      res          = FHXAffectationChecker.CheckAffectations(affectations, this.root);

                Console.WriteLine("{0} / {1}", affectations.Length, res.Keys.Count);

                results.Clear();
                foreach (var r in res.Keys)
                {
                    if (res.Keys.Contains(r))
                    {
                        if (res[r].Count == 0)
                        {
                            results.Add(new FHXSearchResult(new FHXParameter(r, "NULL")));
                        }
                    }
                }
                this.gridSearch.ItemsSource           = results;
                this.gridSearch.Columns[0].Visibility = Visibility.Hidden; //Hides the Parent field
                this.gridSearch.Columns[1].Visibility = Visibility.Hidden; //Hides the Parent field
            }
        }
Exemple #2
0
        public static void SearchAffectations()
        {
            string[]  affectations = File.ReadAllLines(@"D:\FHX\Affectations.txt");
            FHXObject Root         = FHXXMLConverter.FromXML(@"D:\FHX\Base LLIC3 19-08-14.xml");
            var       res          = FHXAffectationChecker.CheckAffectations(affectations, Root);

            Console.WriteLine("{0} / {1}", affectations.Length, res.Keys.Count);

            foreach (var r in res.Keys)
            {
                if (res.Keys.Contains(r))
                {
                    if (res[r].Count == 0)
                    {
                        Console.WriteLine(r);
                    }
                }
            }
        }