/// <summary> /// Contructor with simultaneous copy from another BoltwoodClass object /// </summary> /// <param name="objCopied"></param> public BoltwoodFields(BoltwoodClass objCopied) { Bolt_date = objCopied.Bolt_date; Bolt_time = objCopied.Bolt_time; TempUnits = objCopied.TempUnits; WindSpeedUnits = objCopied.WindSpeedUnits; Bolt_SkyTemp = objCopied.Bolt_SkyTemp; Bolt_Temp = objCopied.Bolt_Temp; Bolt_SensorTemp = objCopied.Bolt_SensorTemp; Bolt_WindSpeed = objCopied.Bolt_WindSpeed; Bolt_Hum = objCopied.Bolt_Hum; Bolt_Heater = objCopied.Bolt_Heater; Bolt_RainFlag = objCopied.Bolt_RainFlag; Bolt_WetFlag = objCopied.Bolt_WetFlag; Bolt_SinceLastMeasure = objCopied.Bolt_SinceLastMeasure; Bolt_now = objCopied.Bolt_now; Bolt_CloudCond = objCopied.Bolt_CloudCond; Bolt_WindCond = objCopied.Bolt_WindCond; Bolt_RainCond = objCopied.Bolt_RainCond; Bolt_DaylighCond = objCopied.Bolt_DaylighCond; Bolt_RoofCloseFlag = objCopied.Bolt_RoofCloseFlag; Bolt_AlertFlag = objCopied.Bolt_AlertFlag; }
private void FormWeatherFileControl_Load(object sender, EventArgs e) { // Create BoltwoodObject BoltwoodObj = new BoltwoodClass(); BoltwoodObj_GoodState = new BoltwoodFields(); BoltwoodObj_BadState = new BoltwoodFields(); //Init form fields txtLastWritten.Text = LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss"); ignoreEvents = true; comboBoxRainFlag.DataSource = Enum.GetNames(typeof(Enum_RainFlag)); comboBoxWetFlag.DataSource = Enum.GetNames(typeof(Enum_WetFlag)); comboBoxCloudCond.DataSource = Enum.GetNames(typeof(Enum_CloudCond)); comboBoxWindCond.DataSource = Enum.GetNames(typeof(Enum_WindCond)); comboBoxRainCond.DataSource = Enum.GetNames(typeof(Enum_RainCond)); comboBoxDaylightCond.DataSource = Enum.GetNames(typeof(Enum_DayCond)); comboBoxRoofCloseFlag.DataSource = Enum.GetNames(typeof(Enum_RoofFlag)); comboBoxAlertFlag.DataSource = Enum.GetNames(typeof(Enum_AlertFlag)); comboBoxDecimalSeparator.DataSource = Enum.GetNames(typeof(decimalSeparatorType)); //Загрузит настройки LoadSettings(); //Update BotlwoodObj from FormFields EventArgs evnt = new EventArgs(); OnFieldUpdate(this, evnt); chkUseSmartLogic_CheckedChanged(this, evnt); ignoreEvents = false; //Saved txtFilePath.Text = (BoltwoodFileClass.BoltwoodFilePath == "" ? BoltwoodFileClass.DefaultFilePath : BoltwoodFileClass.BoltwoodFilePath) + BoltwoodFileClass.BoltwoodFileName; }