示例#1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            cbCylinders.Initialize(_document, this, AnalysisCast?.Content);
            cbTrucks.Initialize(_document, this, AnalysisCast?.TruckProperties);

            // event handling
            uCtrlLayerList.LayerSelected += OnSolutionSelected;
            uCtrlLayerList.ButtonSizes    = new Size(250, 100);

            if (null == AnalysisCast)
            {
                tbName.Text        = _document.GetValidNewAnalysisName(ItemDefaultName);
                tbDescription.Text = tbName.Text;

                uCtrlMinDistanceLoadWall.ValueX = Settings.Default.MinDistancePalletTruckWallX;
                uCtrlMinDistanceLoadWall.ValueY = Settings.Default.MinDistancePalletTruckWallY;
                uCtrlMinDistanceLoadRoof.Value  = Settings.Default.MinDistancePalletTruckRoof;
            }
            else
            {
                tbName.Text        = AnalysisBase.Name;
                tbDescription.Text = AnalysisBase.Description;

                ConstraintSetCylinderTruck constraintSet = AnalysisBase.ConstraintSet as ConstraintSetCylinderTruck;
                uCtrlMinDistanceLoadWall.ValueX = constraintSet.MinDistanceLoadWall.X;
                uCtrlMinDistanceLoadWall.ValueY = constraintSet.MinDistanceLoadWall.Y;
                uCtrlMinDistanceLoadRoof.Value  = constraintSet.MinDistanceLoadRoof;
            }
            checkBoxBestLayersOnly.Checked = Settings.Default.KeepBestSolutions;
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            cbCylinders.Initialize(_document, this, AnalysisCast?.Content);
            cbTrucks.Initialize(_document, this, AnalysisCast?.TruckProperties);

            // event handling
            if (null == AnalysisBase)
            {
                ItemName        = _document.GetValidNewAnalysisName(ItemDefaultName);
                ItemDescription = ItemName;

                uCtrlOptMaximumNumber.Value     = new treeDiM.Basics.OptInt(false, 1);
                uCtrlMinDistanceLoadWall.ValueX = Settings.Default.MinDistancePalletTruckWallX;
                uCtrlMinDistanceLoadWall.ValueY = Settings.Default.MinDistancePalletTruckWallY;
                uCtrlMinDistanceLoadRoof.Value  = Settings.Default.MinDistancePalletTruckRoof;
            }
            else
            {
                tbName.Text        = AnalysisBase.Name;
                tbDescription.Text = AnalysisBase.Description;

                ConstraintSetCylinderTruck constraintSet = AnalysisCast.ConstraintSet as ConstraintSetCylinderTruck;
                uCtrlMinDistanceLoadWall.ValueX = constraintSet.MinDistanceLoadWall.X;
                uCtrlMinDistanceLoadWall.ValueY = constraintSet.MinDistanceLoadWall.Y;
                uCtrlMinDistanceLoadRoof.Value  = constraintSet.MinDistanceLoadRoof;
            }
            // event handling
            cbCylinders.SelectedIndexChanged      += new EventHandler(OnCylinderChanged);
            cbTrucks.SelectedIndexChanged         += new EventHandler(OnInputChanged);
            uCtrlMinDistanceLoadWall.ValueChanged += new UCtrlDualDouble.ValueChangedDelegate(OnInputChanged);
            uCtrlMinDistanceLoadRoof.ValueChanged += new UCtrlDouble.ValueChangedDelegate(OnInputChanged);
            uCtrlOptMaximumWeight.ValueChanged    += new UCtrlOptDouble.ValueChangedDelegate(OnInputChanged);
            uCtrlOptMaximumNumber.ValueChanged    += new UCtrlOptInt.ValueChangedDelegate(OnInputChanged);

            OnInputChanged(this, null);
        }
示例#3
0
 public AnalysisCylinderTruck(Document doc, Packable packable, TruckProperties truckProperties, ConstraintSetCylinderTruck constraintSet)
     : base(doc, packable, truckProperties, constraintSet)
 {
 }