public void Init() { RefreshReceiver(); Log("Connecting to " + RECEIVERPIPENAME); messageSender = new NamedPipeSender(RECEIVERPIPENAME); Log("Created Sender"); string request = "REGISTER " + Process.GetCurrentProcess().Id; var response = messageSender.SendRequest(request); Log("Response: " + response); }
public float GetEventValue(string Event) { string request = "EVENT " + Event; var response = messageSender.SendRequest(request); float res = 0.0f; if (float.TryParse(response, out res)) { return(res); } else { return(0.0f); } }