Ejemplo n.º 1
0
 private void FormNewAnalysis_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         // overhang
         Settings.Default.OverhangX = OverhangX;
         Settings.Default.OverhangY = OverhangY;
         // allowed position box
         Settings.Default.AllowVerticalX = AllowVerticalX;
         Settings.Default.AllowVerticalY = AllowVerticalY;
         Settings.Default.AllowVerticalZ = AllowVerticalZ;
         // alternate / aligned layers
         Settings.Default.AllowAlignedLayer   = AllowAlignedLayers;
         Settings.Default.AllowAlternateLayer = AllowAlternateLayers;
         // allowed patterns
         Settings.Default.AllowedPatterns = AllowedPatternsString;
         // Maximum pallet height / weight
         Settings.Default.MaximumPalletHeight = UnitsManager.ConvertLengthTo(MaximumPalletHeight, UnitsManager.UnitSystem.UNIT_METRIC1);
         Settings.Default.MaximumPalletWeight = UnitsManager.ConvertMassTo(MaximumPalletWeight, UnitsManager.UnitSystem.UNIT_METRIC1);
         // window position
         if (null == Settings.Default.FormNewAnalysisPosition)
         {
             Settings.Default.FormNewAnalysisPosition = new WindowSettings();
         }
         Settings.Default.FormNewAnalysisPosition.Record(this);
     }
     catch (Exception ex)
     { _log.Error(ex.ToString()); }
 }
Ejemplo n.º 2
0
        private void FormNewAnalysisCylinder_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                // window position
                if (null == Settings.Default.FormNewAnalysisPosition)
                {
                    Settings.Default.FormNewAnalysisPosition = new WindowSettings();
                }
                Settings.Default.FormNewAnalysisPosition.Record(this);

                // Maximum pallet height / weight
                Settings.Default.MaximumPalletHeight = UnitsManager.ConvertLengthTo(MaximumPalletHeight, UnitsManager.UnitSystem.UNIT_METRIC1);
                Settings.Default.MaximumPalletWeight = UnitsManager.ConvertMassTo(MaximumPalletWeight, UnitsManager.UnitSystem.UNIT_METRIC1);
            }
            catch (Exception ex)
            {
                _log.Error(ex.ToString());
            }
        }