public static string GetTempByFormat(TempFormat tempFormat) { string strTemp = ""; switch (tempFormat) { case TempFormat.Celsius: strTemp = "TTT"; break; case TempFormat.Celsius_w_degree: strTemp = "TTT°"; break; case TempFormat.Celsius_w_degree_and_C: strTemp = "TTT°C"; break; case TempFormat.Farenheit: strTemp = "TTT"; break; case TempFormat.Farenheit_w_degree: strTemp = "TTT°"; break; case TempFormat.Farenheit_w_degree_and_F: strTemp = "TTT°F"; break; } return(strTemp); }
private void txtTemp_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { switch (temp_format) { case TempFormat.Celsius: temp_format = TempFormat.Fahrenheit; break; case TempFormat.Fahrenheit: temp_format = TempFormat.Celsius; break; } }
public override void FromTo(ShapeBase shape) { base.FromTo(shape); ShapeTemp other = shape as ShapeTemp; if (other != null) { _displayFormat = other.DisplayFormat; if (_displayFormat == 0) { _displayFormat = TempFormat.Farenheit; } Text = other.Text; } }
public DynamicLayerFormatSelectionForm(bool isTime, string strFormat, TempFormat format) { InitializeComponent(); IsTime = isTime; _oldStrFormat = strFormat; _oldSelectTempFormat = format; if (IsTime) { this.Text = "Time Date Format"; } else { this.Text = "Temperature Format"; } Init(); }
private void txtADCRead_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { switch(temp_format) { case TempFormat.Celsius: temp_format = TempFormat.Fahrenheit; break; case TempFormat.Fahrenheit: temp_format = TempFormat.Celsius; break; } if(comboADCChan.SelectedIndex == 4) btnADCRead_Click(this, EventArgs.Empty); }
private void txtTemp_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { switch(temp_format) { case TempFormat.Celsius: temp_format = TempFormat.Fahrenheit; break; case TempFormat.Fahrenheit: temp_format = TempFormat.Celsius; break; } }