コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }