Exemplo n.º 1
0
 private void ISSchedulesLstVw_ScheduleTriggered(object sender, HScheduleTriggeredEventArgs e)
 {
     if (!e.Packet.IsCorrupted && Game.IsConnected)
     {
         SendTo(e.Packet);
     }
     else
     {
         e.Cancel = true;
     }
 }
Exemplo n.º 2
0
        protected virtual void OnScheduleTriggered(object sender, HScheduleTriggeredEventArgs e)
        {
            EventHandler <HScheduleTriggeredEventArgs> handler = ScheduleTriggered;

            if (handler != null)
            {
                try { handler(sender, e); }
                catch { e.Cancel = true; }
                finally
                {
                    if (e.Cancel)
                    {
                        Invoke(new MethodInvoker(() =>
                        {
                            ListViewItem item     = _items[(HSchedule)sender];
                            item.SubItems[4].Text = STOPPED;
                            item.Checked          = false;
                        }));
                    }
                }
            }
        }