public CallFromTemperatureAndHumidtyFormForMixNodeFxn ( string nodeID ) : void | ||
nodeID | string | |
리턴 | void |
/// <summary> /// This function will input the device information as well as update the node table /// </summary> public void InputDeviceInfoAndValue() { // if (checkBox1.Checked = true && checkBox2.Checked == true) // { if (CB_param_temp.SelectedIndex >= 0) { //Temp and hum is selected //now param1 will be temperature and param2 wil be humidity //we have id name and present values. string device_instance = copyOfMainControllerList[CB_Device.SelectedIndex].controllerInstanceId.ToString(); string deviceIP = ""; //For device info form device foreach (var device in device_info) { if (device_instance == device.deviceInstance.ToString()) { deviceIP = device.deviceIP; //device_info[CB_Device.SelectedIndex].deviceIP.ToString(); } } // string temp_param_id = parameterValFromBacnet[CB_param_temp.SelectedIndex].indexID.ToString();//Converting to uint string temp_param_id = AfterFilteringFromAlexValueListOfValues[CB_param_temp.SelectedIndex].indexID.ToString();//Converting to uint // string temp_present_value = parameterValFromBacnet[CB_param_temp.SelectedIndex].presentValue.ToString(); string temp_present_value = AfterFilteringFromAlexValueListOfValues[CB_param_temp.SelectedIndex].presentValue.ToString(); // string second_param_id = parameterValFromBacnet[CB_param_hum.SelectedIndex].indexID.ToString(); // string second_present_value = parameterValFromBacnet[CB_param_hum.SelectedIndex].presentValue.ToString(); //--This value used to identify weather the data is pulled from //1 OBJECT_ANALOG_VALUE, OR OBJECT_ANALOG_INPUT OR OBJECT_ANALOG_OUTPUT //string param1_object_identifier_type = parameterValFromBacnet[CB_param_temp.SelectedIndex].object_identifier_type.ToString(); string param1_object_identifier_type = AfterFilteringFromAlexValueListOfValues[CB_param_temp.SelectedIndex].object_identifier_type.ToString(); // string param2_object_identifier_type = parameterValFromBacnet[CB_param_hum.SelectedIndex].object_identifier_type.ToString(); //------------------------------------Working here -------------------------------------------------------// f1.UpdateNodeInfoForTemperatureDeviceSelection(f1.tempNodeID, device_instance, deviceIP, temp_param_id, "temp", temp_present_value, param1_object_identifier_type); //------------------------------------End of working here------------------------------------------------// f1.CallFromTemperatureAndHumidtyFormForMixNodeFxn(f1.tempNodeID); this.Close(); } else { MessageBox.Show("Please select two parameters properly from dropdown box"); } // } //--close of if checkbox }
//--Now lets make the functions required by this OK button //UpdateNodeInfoForHumidityDeviceSelection() public void InputDeviceInfoAndValue() { // if (checkBox1.Checked = true && checkBox2.Checked == true) // { if (CB_param_hum.SelectedIndex >= 0) { //Temp and hum is selected //now param1 will be temperature and param2 wil be humidity //we have id name and present values. string device_instance = copyOfMainControllerList[CB_Device.SelectedIndex].controllerInstanceId.ToString(); string deviceIP = ""; //For device info form device foreach (var device in device_info) { if (device_instance == device.deviceInstance.ToString()) { deviceIP = device.deviceIP;//device_info[CB_Device.SelectedIndex].deviceIP.ToString(); } } // string temp_param_id = parameterValFromBacnet[CB_param_temp.SelectedIndex].indexID.ToString();//Converting to uint string temp_param2_id = AfterFilteringFromAlexValueListOfValues[CB_param_hum.SelectedIndex].indexID.ToString(); //Converting to uint // string temp_present_value = parameterValFromBacnet[CB_param_temp.SelectedIndex].presentValue.ToString(); string temp_param2_present_value = AfterFilteringFromAlexValueListOfValues[CB_param_hum.SelectedIndex].presentValue.ToString(); // string second_param_id = parameterValFromBacnet[CB_param_hum.SelectedIndex].indexID.ToString(); // string second_present_value = parameterValFromBacnet[CB_param_hum.SelectedIndex].presentValue.ToString(); //--This value used to identify weather the data is pulled from //1 OBJECT_ANALOG_VALUE, OR OBJECT_ANALOG_INPUT OR OBJECT_ANALOG_OUTPUT //string param1_object_identifier_type = parameterValFromBacnet[CB_param_temp.SelectedIndex].object_identifier_type.ToString(); string param2_object_identifier_type = AfterFilteringFromAlexValueListOfValues[CB_param_hum.SelectedIndex].object_identifier_type.ToString(); // string param2_object_identifier_type = parameterValFromBacnet[CB_param_hum.SelectedIndex].object_identifier_type.ToString(); //if (cb_enthalpy_or_humidity_input.SelectedIndex == 0) //{ //info has to be temp and hum //uncomment this after this ............BBK //F1.SetNodeForDeviceUsingTempAndHum(source, name, label, btnColor.BackColor, cbItemSelected, 20, device_instance, deviceIP, temp_param_id, second_param_id, "temp", "hum", temp_present_value, second_present_value, param1_object_identifier_type, param2_object_identifier_type); //--Now lets find the node id // MessageBox.Show("id is " + f1.tempNodeID); // f1.UpdateNodeInfoForDeviceSelection(f1.tempNodeID, device_instance, deviceIP, temp_param_id, second_param_id, "temp", "hum", temp_present_value, second_present_value, param1_object_identifier_type, param2_object_identifier_type); //------------------------------------Working here -------------------------------------------------------// // f1.UpdateNodeInfoForTemperatureDeviceSelection(f1.tempNodeID, device_instance, deviceIP, temp_param_id, "temp", temp_present_value, param1_object_identifier_type); f1.UpdateNodeInfoForHumidityDeviceSelection(f1.tempNodeID, device_instance, deviceIP, temp_param2_id, "hum", temp_param2_present_value, param2_object_identifier_type); //------------------------------------End of working here------------------------------------------------// //} //else //{ // //Temperature and enthalpy select bhayeako 6 ....:) :) ;p // ///UNCOMMENT THIS LATERE // // F1.SetNodeForDeviceUsingTempAndHum(source, name, label, btnColor.BackColor, cbItemSelected, 20, device_instance, deviceIP, temp_param_id, second_param_id, "temp", "enthalpy", temp_present_value, second_present_value, param1_object_identifier_type, param2_object_identifier_type); // f1.UpdateNodeInfoForDeviceSelection(f1.tempNodeID, device_instance, deviceIP, temp_param_id, second_param_id, "temp", "enthalpy", temp_present_value, second_present_value, param1_object_identifier_type, param2_object_identifier_type); //} f1.CallFromTemperatureAndHumidtyFormForMixNodeFxn(f1.tempNodeID); this.Close(); } else { MessageBox.Show("Please select two parameters properly from dropdown box"); } // } //--close of if checkbox }