123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using Aitex.Core.RT.ConfigCenter;
- using Aitex.Core.RT.SCCore;
- namespace Aitex.Core.Backend
- {
- public partial class DeviceConfigBackendView : UserControl
- {
- public DeviceConfigBackendView()
- {
- InitializeComponent();
-
- }
- private void DeviceConfigBackendView_Load(object sender, EventArgs e)
- {
- btnSetHasBoostPump.Enabled = false;
- btnSetHasThrottleValve.Enabled = false;
- btnGasLine1Enable.Enabled = false;
- btnGasLine2Enable.Enabled = false;
- btnGasLine3Enable.Enabled = false;
- btnGasLine4Enable.Enabled = false;
- btnGasLine5Enable.Enabled = false;
- btnRfPulsingFunctionEnable.Enabled = false;
- ckHasBoostPump.Checked = SC.GetValue<bool>(SCName.PressureControlConfig_EnableBoosterPump);
- ckHasThrottleValve.Checked = SC.GetValue<bool>(SCName.PressureControlConfig_EnableThrottleValve);
- ckGasLine1Enable.Checked = SC.GetValue<bool>(SCName.GasLineConfig_Gas1Enable);
- ckGasLine2Enable.Checked = SC.GetValue<bool>(SCName.GasLineConfig_Gas2Enable);
- ckGasLine3Enable.Checked = SC.GetValue<bool>(SCName.GasLineConfig_Gas3Enable);
- ckGasLine4Enable.Checked = SC.GetValue<bool>(SCName.GasLineConfig_Gas4Enable);
- ckGasLine5Enable.Checked = SC.GetValue<bool>(SCName.GasLineConfig_Gas5Enable);
- ckRfPulsingFunctionEnable.Checked = SC.GetValue<bool>(SCName.RfConfig_EnablePulsingFunction);
- txtRfPowerRange.Text = SC.GetValue<double>(SCName.RfConfig_PowerRange).ToString("F1");
- txtRfFactor.Text = SC.GetValue<double>(SCName.RfConfig_PowerRegulationFactor).ToString("F2");
- txtGas1Factor.Text = SC.GetValue<double>(SCName.GasLineConfig_Gas1MfcFlowRegulationFactor).ToString("F2");
- txtGas2Factor.Text = SC.GetValue<double>(SCName.GasLineConfig_Gas2MfcFlowRegulationFactor).ToString("F2");
- txtGas3Factor.Text = SC.GetValue<double>(SCName.GasLineConfig_Gas3MfcFlowRegulationFactor).ToString("F2");
- txtGas4Factor.Text = SC.GetValue<double>(SCName.GasLineConfig_Gas4MfcFlowRegulationFactor).ToString("F2");
- txtGas5Factor.Text = SC.GetValue<double>(SCName.GasLineConfig_Gas5MfcFlowRegulationFactor).ToString("F2");
- }
- private void ckHasBoostPump_CheckedChanged(object sender, EventArgs e)
- {
- btnSetHasBoostPump.Enabled = (ckHasBoostPump.Checked != SC.GetValue<bool>(SCName.PressureControlConfig_EnableBoosterPump));
- }
- private void ckHasThrottleValve_CheckedChanged(object sender, EventArgs e)
- {
- btnSetHasThrottleValve.Enabled = (ckHasThrottleValve.Checked !=
- SC.GetValue<bool>(SCName.PressureControlConfig_EnableThrottleValve));
- }
- private void btnSetHasBoostPump_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.PressureControlConfig_EnableBoosterPump, ckHasBoostPump.Checked ? "true" : "false");
- btnSetHasBoostPump.Enabled = false;
- }
- private void btnSetHasThrottleValve_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.PressureControlConfig_EnableThrottleValve, ckHasThrottleValve.Checked ? "true" : "false");
- btnSetHasThrottleValve.Enabled = false;
- }
- private void btnGasLine1Enable_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.GasLineConfig_Gas1Enable, ckGasLine1Enable.Checked ? "true" : "false");
- btnGasLine1Enable.Enabled = false;
- }
- private void ckGasLine1Enable_CheckedChanged(object sender, EventArgs e)
- {
- btnGasLine1Enable.Enabled = (ckGasLine1Enable.Checked != SC.GetValue<bool>(SCName.GasLineConfig_Gas1Enable));
- }
- private void ckGasLine2Enable_CheckedChanged(object sender, EventArgs e)
- {
- btnGasLine2Enable.Enabled = (ckGasLine2Enable.Checked != SC.GetValue<bool>(SCName.GasLineConfig_Gas2Enable));
- }
- private void ckGasLine3Enable_CheckedChanged(object sender, EventArgs e)
- {
- btnGasLine3Enable.Enabled = (ckGasLine3Enable.Checked != SC.GetValue<bool>(SCName.GasLineConfig_Gas3Enable));
- }
- private void ckGasLine4Enable_CheckedChanged(object sender, EventArgs e)
- {
- btnGasLine4Enable.Enabled = (ckGasLine4Enable.Checked != SC.GetValue<bool>(SCName.GasLineConfig_Gas4Enable));
- }
- private void ckGasLine5Enable_CheckedChanged(object sender, EventArgs e)
- {
- btnGasLine5Enable.Enabled = (ckGasLine5Enable.Checked != SC.GetValue<bool>(SCName.GasLineConfig_Gas5Enable));
- }
- private void ckRfPulsingFunctionEnable_CheckedChanged(object sender, EventArgs e)
- {
- btnRfPulsingFunctionEnable.Enabled = (ckRfPulsingFunctionEnable.Checked != SC.GetValue<bool>(SCName.RfConfig_EnablePulsingFunction));
- }
- private void txtRfPowerRange_TextChanged(object sender, EventArgs e)
- {
- btnRfPowerRange.Enabled = true;
- }
- private void btnRfPowerRange_Click(object sender, EventArgs e)
- {
- double value = 0.0;
- if (!double.TryParse(txtRfPowerRange.Text.Trim(), out value))
- {
- MessageBox.Show("Error Input value in RF power range");
- return;
- }
- SC.SetItemValue(SCName.RfConfig_PowerRange, value);
- btnRfPowerRange.Enabled = false;
- }
- private void btnGasLine2Enable_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.GasLineConfig_Gas2Enable, ckGasLine2Enable.Checked ? "true" : "false");
- btnGasLine2Enable.Enabled = false;
- }
- private void btnGasLine3Enable_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.GasLineConfig_Gas3Enable, ckGasLine3Enable.Checked ? "true" : "false");
- btnGasLine3Enable.Enabled = false;
- }
- private void btnGasLine4Enable_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.GasLineConfig_Gas4Enable, ckGasLine4Enable.Checked ? "true" : "false");
- btnGasLine4Enable.Enabled = false;
- }
- private void btnGasLine5Enable_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.GasLineConfig_Gas5Enable, ckGasLine5Enable.Checked ? "true" : "false");
- btnGasLine5Enable.Enabled = false;
- }
- private void btnRfPulsingFunctionEnable_Click(object sender, EventArgs e)
- {
- SC.SetItemValue(SCName.RfConfig_EnablePulsingFunction, ckRfPulsingFunctionEnable.Checked ? "true" : "false");
- btnRfPulsingFunctionEnable.Enabled = false;
- }
- private void btnRfFactor_Click(object sender, EventArgs e)
- {
- double value = 0.0;
- if (!double.TryParse(txtRfFactor.Text.Trim(), out value))
- {
- MessageBox.Show("Error Input value in RF regulation factor");
- return;
- }
- SC.SetItemValue(SCName.RfConfig_PowerRegulationFactor, value);
- }
- private void btnGas1Factor_Click(object sender, EventArgs e)
- {
- double value = 0.0;
- if (!double.TryParse(txtGas1Factor.Text.Trim(), out value))
- {
- MessageBox.Show("Error Input value in mfc 1 flow regulation factor");
- return;
- }
- SC.SetItemValue(SCName.GasLineConfig_Gas1MfcFlowRegulationFactor, value);
- }
- private void btnGas2Factor_Click(object sender, EventArgs e)
- {
- double value = 0.0;
- if (!double.TryParse(txtGas2Factor.Text.Trim(), out value))
- {
- MessageBox.Show("Error Input value in mfc 2 flow regulation factor");
- return;
- }
- SC.SetItemValue(SCName.GasLineConfig_Gas2MfcFlowRegulationFactor, value);
- }
- private void btnGas3Factor_Click(object sender, EventArgs e)
- {
- double value = 0.0;
- if (!double.TryParse(txtGas3Factor.Text.Trim(), out value))
- {
- MessageBox.Show("Error Input value in mfc 3 flow regulation factor");
- return;
- }
- SC.SetItemValue(SCName.GasLineConfig_Gas3MfcFlowRegulationFactor, value);
- }
- private void btnGas4Factor_Click(object sender, EventArgs e)
- {
- double value = 0.0;
- if (!double.TryParse(txtGas4Factor.Text.Trim(), out value))
- {
- MessageBox.Show("Error Input value in mfc 4 flow regulation factor");
- return;
- }
- SC.SetItemValue(SCName.GasLineConfig_Gas4MfcFlowRegulationFactor, value);
- }
- private void btnGas5Factor_Click(object sender, EventArgs e)
- {
- double value = 0.0;
- if (!double.TryParse(txtGas5Factor.Text.Trim(), out value))
- {
- MessageBox.Show("Error Input value in mfc 5 flow regulation factor");
- return;
- }
- SC.SetItemValue(SCName.GasLineConfig_Gas5MfcFlowRegulationFactor, value);
- }
- private void txtRfFactor_TextChanged(object sender, EventArgs e)
- {
-
- }
- private void txtGas1Factor_TextChanged(object sender, EventArgs e)
- {
- }
- private void txtGas2Factor_TextChanged(object sender, EventArgs e)
- {
- }
- private void txtGas3Factor_TextChanged(object sender, EventArgs e)
- {
- }
- private void txtGas4Factor_TextChanged(object sender, EventArgs e)
- {
- }
- private void txtGas5Factor_TextChanged(object sender, EventArgs e)
- {
- }
- }
- }
|