Esempio n. 1
0
        public void OnStreamConnected(DataStream stream)
        {
            ThreadHelper.UI_Invoke(this, null, TestConfigTab.UITestDeviceSelect, (data) =>
            {
                TestConfigTab.AddDeviceToList(stream);

                if (stream == Program.serial)
                {
                    if (comSettings != null)
                    {
                        comSettings.Close();
                    }
                }
            }, null);
        }
Esempio n. 2
0
        public void ReceiveInstructionList(object payload, string attribute, string label)
        {
            ThreadHelper.UI_Invoke(this, null, TestConfigTab.UITestConfigInstructionParameterGrid, (Hashtable d) =>
            {
                instruction_list = (JObject)payload;

                foreach (KeyValuePair <string, JToken> instruction in instruction_list)
                {
                    InstructionUIEntry entry = new InstructionUIEntry
                    {
                        label      = instruction.Key,
                        parameters = instruction.Value as JObject
                    };
                    TestConfigTab.AddInstructionUIEntry(entry);
                }
            },
                                   null);
        }
Esempio n. 3
0
        public void OnStreamDisconnected(DataStream stream)
        {
            if (isClosing)
            {
                return;
            }
            ThreadHelper.UI_Invoke(this, null, TestConfigTab.UITestDeviceSelect, (data) =>
            {
                TestConfigTab.RemoveDeviceFromList(stream);

                if (stream == Program.serial)
                {
                    SetCOMConnectionStatus("Serial disconnected");
                }

                if (stream == Program.socketHandler)
                {
                    SetNetworkConnectionStatus("Network disconnected");
                }
            }, null);
        }