public void SetOutLineColorEnabled(string driverName, bool isEnabled)
        {
            DriverPresentationDto driverPresentation = GetDriverOrCreatePresentation(driverName);

            driverPresentation.CustomOutLineEnabled = isEnabled;
            DriverCustomColorChanged?.Invoke(this, new DriverCustomColorEnabledArgs(driverName, isEnabled, driverPresentation.OutLineColor));
        }
        public void SetOutLineColor(string driverName, ColorDto color)
        {
            DriverPresentationDto driverPresentation = GetDriverOrCreatePresentation(driverName);

            driverPresentation.OutLineColor = color;
            DriverCustomColorChanged?.Invoke(this, new DriverCustomColorEnabledArgs(driverName, driverPresentation.CustomOutLineEnabled, color));
        }
        public bool TryGetOutLineColor(string driverName, out ColorDto color)
        {
            DriverPresentationDto driverPresentation = GetDriverPresentation(driverName);

            color = driverPresentation?.OutLineColor;
            return(driverPresentation?.OutLineColor != null);
        }
        public DriverPresentationDto GetDriverOrCreatePresentation(string driverName)
        {
            DriverPresentationDto driverPresentation = GetDriverPresentation(driverName);

            if (driverPresentation == null)
            {
                driverPresentation = new DriverPresentationDto()
                {
                    DriverName = driverName
                };
                DriverPresentationsDto.DriverPresentations.Add(driverPresentation);
            }

            return(driverPresentation);
        }
        public DriverPresentationDto GetDriverOrCreatePresentation(string driverName)
        {
            if (TryGetDriverPresentation(driverName, out DriverPresentationDto driverPresentationDto))
            {
                return(driverPresentationDto);
            }

            driverPresentationDto = new DriverPresentationDto()
            {
                DriverName           = driverName,
                CustomOutLineEnabled = false,
            };

            DriversPresentationsMap[driverName] = driverPresentationDto;
            return(driverPresentationDto);
        }
 public bool TryGetDriverPresentation(string driverName, out DriverPresentationDto driverPresentationDto)
 {
     return(DriversPresentationsMap.TryGetValue(driverName, out driverPresentationDto));
 }
        public void SetOutLineColor(string driverName, ColorDto color)
        {
            DriverPresentationDto driverPresentation = GetDriverOrCreatePresentation(driverName);

            driverPresentation.OutLineColor = color;
        }
        public void SetOutLineColorEnabled(string driverName, bool isEnabled)
        {
            DriverPresentationDto driverPresentation = GetDriverOrCreatePresentation(driverName);

            driverPresentation.CustomOutLineEnabled = isEnabled;
        }
        public bool IsCustomOutlineEnabled(string driverName)
        {
            DriverPresentationDto driverPresentation = GetDriverPresentation(driverName);

            return(driverPresentation?.CustomOutLineEnabled ?? false);
        }