Esempio n. 1
0
 protected virtual void RaiseNewItem(NewItemEventArgs args)
 {
     if (NewItem != null)
         NewItem(this, args);
 }
Esempio n. 2
0
        void _scraper_NewItem(object sender, NewItemEventArgs e)
        {
            if (!_started)
            {
                //labelStatus.BeginInvoke((Action)(() =>
                //{
                //    labelStatus.Text = "Cancelled";
                //}));
                return;
            };
            try
            {
                _totalItems++;
                dataGridViewItems.BeginInvoke((Action) (() =>
                {
                    AddGridItem(e.Item);
                }));
                labelTotal.BeginInvoke((Action)(() =>
                {
                    labelTotal.Text = string.Format("Total: {0}", _totalItems);
                }));
            }
            catch
            {

            }
        }