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); } } } }
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); } } } }
private void FireEvent(String type, int division = -1) { if (Listeners != null) { DataEventArgs args = new DataEventArgs(); args.setDataType(type); args.setDivision(division); Listeners(this, args); } }
private void FireEvent(String type, int division = -1) { if (Listeners != null) { DataEventArgs args = new DataEventArgs(); args.setDataType(type); args.setDivision(division); Listeners(this, args); } }