예제 #1
0
        public async void ExecuteSerialRead_Click(object sender, EventArgs e)
        {
            OperationsPanel.Enabled  = false;
            CredentialsPanel.Enabled = false;
            Response.Text            = "Waiting for response..";
            Status.Text = "Executing..";

            Bolt myBolt = new Bolt(ApiKey.Text.Trim(), DeviceId.Text.Trim());

            string till = SerialReadTill.Value.ToString();

            RequestURL.Text = BuildRequestUrl("serialRead", new List <string> {
                "till"
            }, new List <string> {
                till
            });

            Response response = await myBolt.SerialRead(till);

            Response.Text            = response.ResponseString;
            Status.Text              = "Ready";
            OperationsPanel.Enabled  = true;
            CredentialsPanel.Enabled = true;
        }