ProcessTabPageCtrl6 localized via Strings.xy

This commit is contained in:
Milan Hanajik
2016-05-19 09:53:56 +02:00
parent b5b15b2988
commit 78bcf73f13
6 changed files with 2326 additions and 1860 deletions
@@ -112,11 +112,57 @@ namespace TBF.Screens
private void ProcessTabPageCtrl_Load(object sender, EventArgs e)
{
Localize();
Once();
ResetLabelsAndTargetVals();
ResetReadings();
}
void Localize()
{
airTempCapLabel.Text = Strings.Ambient_temp_C_;
airPressCapLabel.Text = Strings.Ambient_press_bar_;
airHumiCapLabel.Text = Strings.Ambient_humi_pct_;
targetFlowLowCapLabel.Text = Strings.Target_flow_lo_m3h_;
targetFlowHighCapLabel.Text = Strings.Target_flow_hi_m3h_;
targetVolumeCapLabel.Text = Strings.Target_volume_l_;
targetRefCountCapLabel.Text = Strings.Target_ref_pulses_;
estmtdTimeCapLabel.Text = Strings.Estimated_time_s_;
prUpCapLabel.Text = Strings.Pr_up_mbar_;
prDownCapLabel.Text = Strings.Pr_down_mbar_;
tInCapLabel.Text = Strings.T_in_C_;
tOutCapLabel.Text = Strings.T_out_C_;
tDivCapLabel.Text = Strings.T_div_C_;
regValvePosCapLabel.Text = Strings.Reg_valve_pos_;
refPulsesCapLabel.Text = Strings.Ref_pulses_;
refFreqCapLabel.Text = Strings.Ref_freq_Hz_;
refFlowCapLabel.Text = Strings.Ref_flow_m3h_;
refVolumeCapLabel.Text = Strings.Ref_volume_l_;
massCapLabel.Text = Strings.Mass_kg_;
massDiffCapLabel.Text = Strings.Mass_diff_kg_;
volumeCtvCapLabel.Text = Strings.Volume_l_;
refErrorCapLabel.Text = Strings.Ref_error_pct_;
GroupBox[] groupBoxes = new GroupBox[] { groupBox1, groupBox2, groupBox3, groupBox4, groupBox5, groupBox6 };
for (int i = 0; i < groupBoxes.Length; i++) groupBoxes[i].Text = string.Format(Strings.Meter_nr, i + 1);
sensor1CapLabel.Text = sensor2CapLabel.Text = sensor3CapLabel.Text = sensor4CapLabel.Text = sensor5CapLabel.Text = sensor6CapLabel.Text = Strings.Sensor_;
pulses1CapLabel.Text = pulses2CapLabel.Text = pulses3CapLabel.Text = pulses4CapLabel.Text = pulses5CapLabel.Text = pulses6CapLabel.Text = Strings.Pulses_;
refPulses1CapLabel.Text = refPulses2CapLabel.Text = refPulses3CapLabel.Text = refPulses4CapLabel.Text = refPulses5CapLabel.Text = refPulses6CapLabel.Text = Strings.Ref_pulses_;
volume1CapLabel.Text = volume2CapLabel.Text = volume3CapLabel.Text = volume4CapLabel.Text = volume5CapLabel.Text = volume6CapLabel.Text = Strings.Volume_;
error1CapLabel.Text = error2CapLabel.Text = error3CapLabel.Text = error4CapLabel.Text = error5CapLabel.Text = error6CapLabel.Text = Strings.Error_;
GroupBox[] groupBoxesZ = new GroupBox[] { groupBox1z, groupBox2z, groupBox3z };
for (int i = 0; i < groupBoxesZ.Length; i++) groupBoxesZ[i].Text = string.Format(Strings.Compound_meter_nr, i + 1);
volume1zCapLabel.Text = volume2zCapLabel.Text = volume3zCapLabel.Text = Strings.Volume_;
error1zCapLabel.Text = error2zCapLabel.Text = error3zCapLabel.Text = Strings.Error_;
}
void Once()
{
@@ -247,8 +293,8 @@ namespace TBF.Screens
tInLabel.Text = "---";
tOutLabel.Text = "---";
prInLabel.Text = "---";
prOutLabel.Text = "---";
prUpLabel.Text = "---";
prDownLabel.Text = "---";
massLabel.Text = "---";
massDiffLabel.Text = "---";
@@ -407,8 +453,8 @@ namespace TBF.Screens
tOutLabel.Text = ProcessData.TempOut.ToString();
tDivLabel.Text = ProcessData.TempDiv.ToString();
prInLabel.Text = ProcessData.PressureUp.ToString();
prOutLabel.Text = ProcessData.PressureDown.ToString();
prUpLabel.Text = ProcessData.PressureUp.ToString();
prDownLabel.Text = ProcessData.PressureDown.ToString();
massLabel.Text = ProcessData.Mass.ToString();
@@ -503,8 +549,8 @@ namespace TBF.Screens
tOutLabel.Text = tRes.TempOutAvrg.ToString("F2");
tDivLabel.Text = tRes.TempDivAvrg.ToString("F2");
prInLabel.Text = tRes.PressUpAvrg.ToString("F1");
prOutLabel.Text = tRes.PressDownAvrg.ToString("F1");
prUpLabel.Text = tRes.PressUpAvrg.ToString("F1");
prDownLabel.Text = tRes.PressDownAvrg.ToString("F1");
massLabel.Text = ProcessData.Mass.ToString();
massDiffLabel.Text = (tRes.MassEnd - tRes.MassStart).ToString("F3");