Esempio n. 1
0
        async private void Button_Click(object sender, RoutedEventArgs e)
        {
            var f1 = new L5XFile(@"f:\users\PLRADSLI\Documents\Work\PROJECTS\ford kentucky\_SW\CT_319102.L5X");
            var f2 = new L5XFile(@"f:\users\PLRADSLI\Documents\Work\PROJECTS\ford kentucky\_SW\CT_319102_spioch.L5X");

            var compare = new L5XComparer(f1, f2);
            List<L5XPair> rungs = await Task.Run<List<L5XPair>>(() => { return compare.GetRungs(); });
            List<L5XPair> tags = await Task.Run<List<L5XPair>>(() => { return compare.GetTags(); });

            System.IO.File.WriteAllLines("runglog.txt", compare.LogRungs.ToArray());
            System.IO.File.WriteAllLines("taglog.txt", compare.LogTags.ToArray());

            await this.ShowMessageAsync("Job done!", "Rung and tags compared!");

            dupa.ItemsSource = tags;

        }
Esempio n. 2
0
        async private void button1_Click(object sender, EventArgs e)
        {
            f1 = new L5XFile(@"f:\users\PLRADSLI\Documents\Work\PROJECTS\ford kentucky\_SW\CT_319102.L5X");
            f2 = new L5XFile(@"f:\users\PLRADSLI\Documents\Work\PROJECTS\ford kentucky\_SW\CT_319102_spioch.L5X");

            var compare = new L5XComparer(f1, f2);
            rungs = await Task.Run<List<L5XPair>>(() => { return compare.GetRungs(); });
            tags = await Task.Run<List<L5XPair>>(() => { return compare.GetTags(); });

            System.IO.File.WriteAllLines("runglog.txt", compare.LogRungs.ToArray());
            System.IO.File.WriteAllLines("taglog.txt", compare.LogTags.ToArray());

            MessageBox.Show("Done!");

            src_rungs = new BindingSource();
            src_rungs.DataSource = rungs;
            dgv_rungs.DataSource = src_rungs;

            src_tags = new BindingSource();
            src_tags.DataSource = tags;
            dgv_tags.DataSource = src_tags;

            //System.Diagnostics.Debugger.Break();
        }