Exemplo n.º 1
0
        /// <summary>
        /// Executes generationg file with information about calls.
        /// 
        /// </summary>
        /// <param name="countriesTable"></param>
        public void execute(CountryDataTable countriesTable)
        {
            Enabled = false;
            Update();
            Form frm = FindForm();
            if (frm != null){
                frm.Cursor = Cursors.WaitCursor;
            }
            Application.DoEvents();
            //
            string inFileName = FilePath;
            string outFileName = inFileName.Substring(0, inFileName.LastIndexOf(".")) + "-bills.txt";
            bool success = false;

            try{
                DataProcessor.ProcessCalls(countriesTable, CallTable, outFileName, IterationsCount);
                success = true;
            }
            finally{
                Enabled = true;
                frm = FindForm();

                if (frm != null){
                    frm.Cursor = Cursors.Default;
                }
                Application.DoEvents();

                if (success){
                    MessageBox.Show(this, "You can observ results in file '" + Path.GetFileName(outFileName) + "'", "Execution finished",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Exemplo n.º 2
0
 internal CountryRow(DataRowBuilder rb)
     : base(rb)
 {
     tableCountry = ((CountryDataTable) (Table));
 }