Exemplo n.º 1
0
 public void Register(IOutputStationInfo oStation, SimulationVisualOutputStation2D visual)
 {
     if (!_managedInfoObjects.ContainsKey(oStation))
     {
         _managedInfoObjects[oStation] = new SimulationInfoOutputStation(_infoHost, oStation);
     }
     _managed2DVisuals[visual] = _managedInfoObjects[oStation];
     _managed2DVisuals[visual].ManagedVisual2D = visual;
 }
Exemplo n.º 2
0
        public SimulationVisualOutputStation3D(IOutputStationInfo oStation, DetailLevel detailLevel)
            : base(oStation)
        {
            _oStation = oStation;
            var visual = new BoxVisual3D
            {
                Fill   = VisualizationConstants.BrushOutputStationVisual,
                Center = new Point3D(
                    _oStation.GetInfoCurrentTier().GetInfoTLX() + _oStation.GetInfoCenterX(),
                    _oStation.GetInfoCurrentTier().GetInfoTLY() + _oStation.GetInfoCenterY(),
                    _oStation.GetInfoCurrentTier().GetInfoZ() + STATION_HEIGHT / 2.0
                    ),
                Length = _oStation.GetInfoLength(),
                Width  = _oStation.GetInfoWidth(),
                Height = STATION_HEIGHT
            };

            Children.Add(visual);
        }
Exemplo n.º 3
0
 public SimulationVisualOutputStation2D(
     IOutputStationInfo oStation,
     DetailLevel detailLevel,
     Transformation2D transformer,
     double strokeThickness,
     MouseButtonEventHandler elementClickAction,
     SimulationAnimation2D controller)
     : base(oStation, detailLevel, transformer, strokeThickness, elementClickAction, controller)
 {
     _oStation = oStation;
     // Build geometry
     _geometry =
         new RectangleGeometry(
             new Rect(
                 new Point(_transformer.ProjectX(_oStation.GetInfoTLX()), _transformer.ProjectY(_oStation.GetInfoTLY())),
                 new Size(_transformer.ProjectXLength(_oStation.GetInfoLength()), _transformer.ProjectYLength(_oStation.GetInfoWidth()))));
     // Paint it
     Fill            = VisualizationConstants.BrushOutputStationVisual;
     Cursor          = System.Windows.Input.Cursors.Hand;
     MouseDown      += _elementClickAction;
     Stroke          = VisualizationConstants.BrushOutline;
     StrokeThickness = StrokeThicknessReference;
 }