示例#1
0
        public void run()
        {
            stream = client.GetStream();
            reader = new StreamReader(stream);
            writer = new StreamWriter(stream);

            sendMessage("1");

            String[] parts;
            while (true)
            {
                String str = reader.ReadLine();
                if (str != null)
                {
                    parts = str.Split(new char[] { (char)29 });

                    if(parts.Length == 1)
                    {
                        int value = int.Parse(parts[0]);
                        DataEventArgs args = new DataEventArgs();
                        args.setDataType("fox");
                        args.setDivision(value-1);
                        Listener(this, args);
                    }
                }
            }
        }
示例#2
0
        public void run()
        {
            stream = client.GetStream();
            reader = new StreamReader(stream);
            writer = new StreamWriter(stream);

            sendMessage("1");

            String[] parts;
            while (true)
            {
                String str = reader.ReadLine();
                if (str != null)
                {
                    parts = str.Split(new char[] { (char)29 });

                    if (parts.Length == 1)
                    {
                        int           value = int.Parse(parts[0]);
                        DataEventArgs args  = new DataEventArgs();
                        args.setDataType("fox");
                        args.setDivision(value - 1);
                        Listener(this, args);
                    }
                }
            }
        }
示例#3
0
 private void FireEvent(String type, int division = -1)
 {
     if (Listeners != null)
     {
         DataEventArgs args = new DataEventArgs();
         args.setDataType(type);
         args.setDivision(division);
         Listeners(this, args);
     }
 }
示例#4
0
 private void FireEvent(String type, int division = -1)
 {
     if (Listeners != null)
     {
         DataEventArgs args = new DataEventArgs();
         args.setDataType(type);
         args.setDivision(division);
         Listeners(this, args);
     }
 }