Example #1
0
        private void UpdateVisibilities()
        {
            if (Config.WmtcMode)
            {
                Visibilities.NormalMode = Visibility.Collapsed;
            }
            else
            {
                Visibilities.NormalMode = Visibility.Visible;
                Visibilities.SetVisibilityOfWmtcClass(String.Empty);
            }

            if (SelectedVehicle != null)
            {
                Visibilities.ShiftInput = Visibility.Visible;
                if (BoundVehicleObject == null)
                {
                    Visibilities.SetVisibilityOfGears(0);
                }
                else
                {
                    Visibilities.SetVisibilityOfGears(TypeCast.ToInt(BoundVehicleObject.NumberOfGears));
                    if (Config.WmtcMode)
                    {
                        Visibilities.SetVisibilityOfWmtcClass(BoundVehicleObject.Class);
                    }
                }
            }
            Visibilities = new BoundVisibilities(Visibilities);
        }