Exemplo n.º 1
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     label1.Text = String.Format("{0}", count--);
     if (!UdpEvent.Instance.IsHost)
     {
         return;
     }
     if (count <= 0)
     {
         //START
         var data = new StartProtocol();
         data.ip = UdpEvent.Instance.Ip;
         UdpEvent.Instance.Notify(data);
     }
 }
Exemplo n.º 2
0
        private void OnStart(StartProtocol p, bool self, int from)
        {
            if (start)
            {
                return;
            }

            start = true;
            Invoke2(() =>
            {
                label1.Text = "0";
                label2.Text = "Start " + self;
                timer2.Stop();
                timer1.Stop();
            });
        }
Exemplo n.º 3
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     label1.Text = String.Format("{0}", count--);
     if (!UdpEvent.Instance.IsHost)
         return;
     if (count <= 0)
     {
         //START
         var data = new StartProtocol();
         data.ip = UdpEvent.Instance.Ip;
         UdpEvent.Instance.Notify(data);
     }
 }
Exemplo n.º 4
0
        private void OnStart(StartProtocol p, bool self, int from)
        {
            if (start)
                return;

            start = true;
            Invoke2(() =>
            {
                label1.Text = "0";
                label2.Text = "Start " + self;
                timer2.Stop();
                timer1.Stop();
            });
        }