Example #1
0
        public void ShowResult(Core.Reading.Results.FileValue file)
        {
            this.lblFileName.Text = file.FileName;

            ShowHeaders(file);
            ShowRecords(file);
            ShowFooters(file);
        }
Example #2
0
        private void ShowRecords(Core.Reading.Results.FileValue file)
        {
            this.livRecords.Items.Clear();

            for (int c = 0; c < file.Records.Count; c++)
            {
                this.livRecords.Items.Add(CreateLine(this.livRecords, file.Records[c]));
            }
        }
Example #3
0
        private void ShowFooters(Core.Reading.Results.FileValue file)
        {
            this.livFooter.Items.Clear();

            for (int c = 0; c < file.Footers.Count; c++)
            {
                this.livFooter.Items.Add(CreateLine(this.livFooter, file.Footers[c]));
            }
        }
Example #4
0
        private void mnuLoadFile_Click(object sender, EventArgs e)
        {
            if (this.pfdFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Core.Configuration.ConfigurationReader configReader = new Core.Configuration.ConfigurationReader();
                Core.Configuration.FileConfiguration   config       = configReader.Load("outgoing.xml");


                Core.Reading.FileReader        reader = new Core.Reading.FileReader();
                Core.Reading.Results.FileValue file   = reader.Execute(this.pfdFile.FileName, config);


                _currentFile = file;
                ShowResult(file);
            }
        }
Example #5
0
        private void frmFile_Load(object sender, EventArgs e)
        {
            try
            {
                Core.Configuration.ConfigurationReader configReader = new Core.Configuration.ConfigurationReader();
                //Core.Configuration.FileConfiguration config = configReader.Load("Configuration.xml");
                Core.Configuration.FileConfiguration config = configReader.Load("outgoing.xml");


                Core.Reading.FileReader reader = new Core.Reading.FileReader();
                //Core.Reading.Results.FileValue file = reader.Execute("sample.txt", config);
                //Core.Reading.Results.FileValue file = reader.Execute("OUTGOING.CTF", config);
                Core.Reading.Results.FileValue file = reader.Execute("OUTGOING_old.TXT", config);


                _currentFile = file;
                ShowResult(file);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }