Exemple #1
0
        /// <summary> Adds a new control for the specified vehicle and adds it to the the cell. </summary>
        /// <param name="vehicle"> The vehicle to add. </param>
        /// <param name="isToggled"> The vehicle is toggled on/off by default. </param>
        internal void AddVehicle(IVehicle vehicle, bool isToggled)
        {
            var vehicleControl = new ResearchTreeCellVehicleControl(_presenter, vehicle, new DisplayVehicleInformationInResearchTreeStrategy(), EVehicleCard.ResearchTree, isToggled);

            _stackPanel.Children.Add(vehicleControl);
            VehicleControls.Add(vehicle.GaijinId, vehicleControl);
        }
Exemple #2
0
 /// <summary> Raises the <see cref="UIElement.MouseEnterEvent"/> for the given vehicle control. </summary>
 /// <param name="vehicleControl"> The vehicle control to raise the event for. </param>
 private void RaiseMouseLeaveEvent(ResearchTreeCellVehicleControl vehicleControl) =>
 RaiseEvent(GetMouseEventArgs(Mouse.MouseLeaveEvent, vehicleControl));
Exemple #3
0
 private MouseEventArgs GetMouseEventArgs(RoutedEvent routedEvent, ResearchTreeCellVehicleControl vehicleControl) =>
 new MouseEventArgs(Mouse.PrimaryDevice, EInteger.Number.Zero)
 {
     RoutedEvent = routedEvent, Source = vehicleControl
 };