public void RespondWithError(String str)
        {
            MyEventArgs args = new MyEventArgs { Error = str };
            //args.Message = str;

            EventHandler<MyEventArgs> handler = MyEvent;
            if (handler != null)
            {
                handler(this, args);
            }
        }
        public void RespondWithRecordNumbers(int num)
        {
            MyEventArgs args;
            if (totalRecords == 0)
            {
                totalRecords = num;
                args = new MyEventArgs { Message = string.Format(" --- Number of records read: {0}", num.ToString()), Error = "" };
            }
            else
            {
                runningSum += num;
                args = new MyEventArgs { Message = string.Format(" --- {0:0.00}%", runningSum / totalRecords * 100), Error = "" };
            }
            //args.Message = str;

            EventHandler<MyEventArgs> handler = MyEvent;
            if (handler != null)
            {
                handler(this, args);
            }
        }