Пример #1
0
        private void ProcessLoadEvent(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                ddHeatOfCombustion.Converter = StockConverters.GetConverterByName("SpecificEnergy");
                //_mActiveSpecificEnergyUnit = GetDefaultActiveSpecificEnergyUnit();
                _mActiveSpecificEnergyUnit      = SpecificEnergyUnit.JouleKg;
                ddHeatOfCombustion.SelectedItem = _mActiveSpecificEnergyUnit;

                ddMassOfFlammableVapor.Converter    = StockConverters.GetConverterByName("Mass");
                ddMassOfFlammableVapor.SelectedItem = GetDefaultActiveMassUnit();

                ddMassEquivalent.Converter    = StockConverters.GetConverterByName("Mass");
                ddMassEquivalent.SelectedItem = GetDefaultActiveMassUnit();
            }
        }
Пример #2
0
        private void ProcessLoadEvent(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                ddTemperature.Converter    = StockConverters.GetConverterByName("Temperature");
                _mActiveTempUnit           = UnitParser.ParseTempUnit(Settings.Default.TMTempUnit);
                ddTemperature.SelectedItem = _mActiveTempUnit;

                _mActivePressureUnit    = UnitParser.ParsePressureUnit(Settings.Default.TMPressureUnit);
                ddPressure.Converter    = StockConverters.GetConverterByName("Pressure");
                ddPressure.SelectedItem = _mActivePressureUnit;

                _mActiveVolumeUnit        = UnitParser.ParseVolumeUnit(Settings.Default.TMVolumeUnit);
                ddTankVolume.Converter    = StockConverters.GetConverterByName("Volume");
                ddTankVolume.SelectedItem = _mActiveVolumeUnit;

                ddMass.Converter    = StockConverters.GetConverterByName("Mass");
                ddMass.SelectedItem = UnitParser.ParseMassUnit(Settings.Default.TMMassUnit);
            }
        }
Пример #3
0
        private void ProcessLoadEvent(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                SetRadiobuttonSavedSettings();

                dd_Temperature.Converter    = StockConverters.GetConverterByName("Temperature");
                _mActiveTempUnit            = GetDefaultActiveTempUnit();
                dd_Temperature.SelectedItem = _mActiveTempUnit;

                _mActivePressureUnit     = GetDefaultActivePressureUnit();
                dd_Pressure.Converter    = StockConverters.GetConverterByName("Pressure");
                dd_Pressure.SelectedItem = _mActivePressureUnit;

                _mActiveDensityUnit = GetDefaultActiveDensityUnit();

                dd_Density.Converter    = StockConverters.GetConverterByName("Density");
                dd_Density.SelectedItem = _mActiveDensityUnit;

                SetTextboxEnabled();
            }
        }