Ejemplo n.º 1
0
 private async void OnHighContrastChanged(AccessibilitySettings sender, object args) => await Dispatcher.RunAsync(
     CoreDispatcherPriority.Normal, () =>
 {
     SetTitleBarControlColors();
     SetTitleBarExtendView();
     SetTitleBarVisibility();
 });
Ejemplo n.º 2
0
 public void SetEmote(EmoteDefinition emoteDefinition)
 {
     if (emoteDefinition != null)
     {
         if (emoteDefinition.Id == "RecentEmoteKey")
         {
             EmoteIconText.text = null;
             GetComponent <Button>().interactable = false;
             RecentEmoteImage.enabled             = true;
             return;
         }
         this.emoteDefinition = emoteDefinition;
         if (!string.IsNullOrEmpty(emoteDefinition.Sound))
         {
             disableClickSound();
         }
         emoteString        = EmoteManager.GetEmoteString(emoteDefinition);
         EmoteIconText.text = emoteString;
         AccessibilitySettings component = GetComponent <AccessibilitySettings>();
         component.CustomToken = emoteDefinition.Token;
         TutorialBreadcrumb.SetBreadcrumbId($"Emote_{emoteDefinition.name}");
         GetComponent <Button>().interactable = true;
         RecentEmoteImage.enabled             = false;
     }
     else
     {
         EmoteIconText.text = null;
         GetComponent <Button>().interactable = false;
         RecentEmoteImage.enabled             = false;
     }
 }
 protected virtual void SetupIglooCustomizationButton(IglooCustomizationButton button, int index)
 {
     if (index < numberOfStaticButtons)
     {
         button.SetupCatalogButton();
     }
     else
     {
         button.SetupItemButton();
         int index2 = index - numberOfStaticButtons;
         DecorationDefinitionType key = inventoryCountPairs[index2].Key;
         button.gameObject.name = key.Name + "_button";
         button.Init(key.Icon, BreadcrumbType, GetIntegerDefinitionId(key), canDrag: true);
         inventoryProgressionStatus.TryGetValue(key.GetId(), out var value);
         if (!SetLockableButtonLockedStatus(button, key, value))
         {
             int value2 = inventoryCountPairs[index2].Value;
             button.SetItemCount(value2, showItemCountsWithZeroCount, tintItemsWithZeroCount);
             if (value2 <= 0)
             {
                 button.SetCanDrag(drag: false);
             }
         }
         AccessibilitySettings component = button.GetComponent <AccessibilitySettings>();
         if (component != null)
         {
             component.CustomToken = key.Name;
         }
     }
     button.SetDragReferences(scrollRect, index, 0f);
 }
Ejemplo n.º 4
0
 private void AccessibilitySettings_HighContrastChanged(AccessibilitySettings sender, object args)
 {
     DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, () =>
     {
         UpdateBrush();
     });
 }
        private void onObjectAdded(RectTransform item, int index)
        {
            CustomizationButton component       = item.GetComponent <CustomizationButton>();
            DecalDefinition     decalDefinition = displayedDecals[index];

            component.gameObject.name = decalDefinition.AssetName + "_button";
            RectTransform rectTransform = component.transform as RectTransform;

            rectTransform.anchoredPosition = Vector2.zero;
            rectTransform.anchorMin        = Vector2.zero;
            rectTransform.anchorMax        = Vector2.one;
            rectTransform.sizeDelta        = Vector2.zero;
            rectTransform.localScale       = Vector3.one;
            bool canDrag = isLocalPlayerMember;

            if (!isLocalPlayerMember)
            {
                canDrag = !decalDefinition.IsMemberOnly;
            }
            if (Service.Get <CatalogServiceProxy>().IsCatalogThemeActive())
            {
                canDrag = true;
            }
            Texture2DContentKey decalPath = EquipmentPathUtil.GetDecalPath(decalDefinition.AssetName);

            component.Init(decalPath, BreadcrumbType, decalDefinition.Id, canDrag);
            AccessibilitySettings component2 = component.GetComponent <AccessibilitySettings>();

            if (component2 != null)
            {
                component2.CustomToken = decalDefinition.AssetName;
            }
        }
Ejemplo n.º 6
0
 public SettingsPage()
 {
     InitializeComponent();
     NavigationCacheMode = NavigationCacheMode.Required;
     access = new AccessibilitySettings();
     access.HighContrastChanged += Access_HighContrastChanged;
 }
Ejemplo n.º 7
0
        private void Accessible_HighContrastChanged(AccessibilitySettings sender, object args)
        {
#if DEBUG
            Debug.WriteLine("HighContrast Changed");
#endif

            UpdateProperties();
        }
Ejemplo n.º 8
0
        private async void Accessible_HighContrastChanged(AccessibilitySettings sender, object args)
        {
#if DEBUG
            System.Diagnostics.Debug.WriteLine("HighContrast Changed");
#endif

            await OnThemePropertyChangedAsync();
        }
 public ExceptHighContrastPrivateData(FrameworkElement element, Windows.UI.Xaml.Style style)
 {
     _element = element;
     _style   = style;
     _accessibilitySettings = new AccessibilitySettings();
     _accessibilitySettings.HighContrastChanged += AccessibilitySettings_HighContrastChanged;
     ComputeStyle();
 }
Ejemplo n.º 10
0
        private void OnHighContrastChanged(AccessibilitySettings sender, object args)
        {
            if (CursorShadow != null)
            {
                CursorShadow.Visibility = sender.HighContrast ? Visibility.Collapsed : Visibility.Visible;
            }

            UpdateGraphTheme();
        }
Ejemplo n.º 11
0
        public void SetChatMessage(string playerName, string message, bool isChatActivity, bool isAwaitingModeration = false, bool isChatBlocked = false)
        {
            if (NameText != null)
            {
                NameText.text = playerName;
            }
            if (isChatActivity)
            {
                showActiveChat();
                return;
            }
            hideActiveChat();
            showBlockedTextPanel(isChatBlocked);
            MessageText.gameObject.SetActive(!isChatBlocked);
            if (isChatBlocked)
            {
                return;
            }
            bool flag  = message.Length <= maxEmoteString;
            bool flag2 = true;

            if (flag)
            {
                foreach (char character in message)
                {
                    if (!EmoteManager.IsEmoteCharacter(character))
                    {
                        flag2 = false;
                        break;
                    }
                }
            }
            if (flag2 && flag)
            {
                PaddingLayoutGroup.padding = PaddingSingleEmote;
                MessageText.fontSize       = FontSizeSingleEmote - (message.Length - 1) * emoteReduction;
            }
            else
            {
                PaddingLayoutGroup.padding = PaddingDefault;
                MessageText.fontSize       = FontSizeDefault;
            }
            MessageText.material = FontMaterialDefault;
            if (isAwaitingModeration)
            {
                MessageText.material = FontMaterialWaiting;
            }
            MessageText.text = message;
            if (MessageText.transform.parent != null)
            {
                AccessibilitySettings component = MessageText.transform.parent.GetComponent <AccessibilitySettings>();
                if (component != null)
                {
                    component.DynamicText = EmoteManager.GetMessageWithLocalizedEmotes(MessageText.text);
                }
            }
        }
Ejemplo n.º 12
0
        private void showChatMessage(bool isAwaitingModeration)
        {
            MessageText.gameObject.SetActive(value: true);
            ActiveTypingPanel.SetActive(value: false);
            BlockedTextPanel.SetActive(value: false);
            isMessageShowing = true;
            CoroutineRunner.StopAllForOwner(this);
            bool   flag  = message.Length <= maxEmoteString;
            int    num   = message.Length + previousEmoteMessage.Length;
            bool   flag2 = true;
            string text  = "";

            MessageText.material = FontMaterialDefault;
            if (flag)
            {
                string text2 = message;
                foreach (char c in text2)
                {
                    if (!EmoteManager.IsEmoteCharacter(c))
                    {
                        flag2 = false;
                        break;
                    }
                    playSoundForEmote(EmoteManager.GetEmoteFromCharacter(c));
                }
            }
            if (flag2 && flag)
            {
                text = ((num > maxEmoteString) ? message : (previousEmoteMessage + message));
                PaddingLayoutGroup.padding = PaddingSingleEmote;
                MessageText.fontSize       = FontSizeSingleEmote - (text.Length - 1) * emoteReduction;
                MessageText.text           = text;
                previousEmoteMessage       = text;
                Service.Get <EventDispatcher>().DispatchEvent(new ChatEvents.ChatEmoteMessageShown(text, SessionId));
            }
            else
            {
                PaddingLayoutGroup.padding = PaddingDefault;
                MessageText.fontSize       = FontSizeDefault;
                previousEmoteMessage       = "";
                if (isAwaitingModeration)
                {
                    MessageText.material = FontMaterialWaiting;
                }
                MessageText.text = message;
            }
            AccessibilitySettings component = MessageText.GetComponent <AccessibilitySettings>();

            if (component != null)
            {
                component.DynamicText = EmoteManager.GetMessageWithLocalizedEmotes(MessageText.text);
            }
            adjustBubbleSize();
            openBubble();
            CoroutineRunner.Start(waitForDisplayTime(), this, "waitForDisplayTime");
        }
        private static AccessibilitySettings GetAccessibilityModel()
        {
            // Get current settings
            var settings = UserSettingsService.Get();

            AccessibilitySettings model = new AccessibilitySettings
            {
                UseDyslexicFont = settings.UseDyslexicFont
            };

            return(model);
        }
Ejemplo n.º 14
0
            public BackdropMaterialState(Control target)
            {
                _dispatcherHelper = new DispatcherHelper(this);
                _target           = new WeakReference <Control>(target);

                // Track whether we're connected and update the number of connected BackdropMaterial on this thread.
                _connectedBrushCount.Value++;
                CreateOrDestroyMicaController();

                // Normally QI would be fine, but .NET is lying about implementing this interface (e.g. C# TestFrame derives from Frame and this QI
                // returns success even on RS2, but it's not implemented by XAML until RS3).
                if (SharedHelpers.IsRS3OrHigher())
                {
                    if (target is FrameworkElement targetThemeChanged)
                    {
                        void OnActualThemeChanged(FrameworkElement sender, object args)
                        {
                            UpdateFallbackBrush();
                        }

                        targetThemeChanged.ActualThemeChanged += OnActualThemeChanged;
                        _themeChangedRevoker = Disposable.Create(() => targetThemeChanged.ActualThemeChanged -= OnActualThemeChanged);
                    }
                }

                void OnColorValuesChanged(UISettings uiSettings, object args)
                {
                    _dispatcherHelper.RunAsync(() => UpdateFallbackBrush());
                }

                _uiSettings.ColorValuesChanged += OnColorValuesChanged;
                _colorValuesChangedRevoker      = Disposable.Create(() => _uiSettings.ColorValuesChanged -= OnColorValuesChanged);

                // Listen for High Contrast changes
                var accessibilitySettings = new AccessibilitySettings();

                _isHighContrast = accessibilitySettings.HighContrast;

                void OnHighContrastChanged(AccessibilitySettings sender, object args)
                {
                    _dispatcherHelper.RunAsync(() =>
                    {
                        _isHighContrast = accessibilitySettings.HighContrast;
                        UpdateFallbackBrush();
                    });
                }

                accessibilitySettings.HighContrastChanged += OnHighContrastChanged;
                _highContrastChangedRevoker = Disposable.Create(() => accessibilitySettings.HighContrastChanged -= OnHighContrastChanged);

                UpdateFallbackBrush();
            }
Ejemplo n.º 15
0
        public TitleBar()
        {
            this.InitializeComponent();
            _uiSettings            = new UISettings();
            _accessibilitySettings = new AccessibilitySettings();
            _coreTitleBar          = CoreApplication.GetCurrentView().TitleBar;

            _coreTitleBar.ExtendViewIntoTitleBar = true;

            Loaded   += OnLoaded;
            Unloaded += OnUnloaded;
            Buttons.CollectionChanged += OnButtonsCollectionChanged;
        }
Ejemplo n.º 16
0
 private void Access_HighContrastChanged(AccessibilitySettings sender, object args)
 {
     if (access.HighContrast)
     {
         if (access.HighContrastScheme == "High Contrast White")
         {
             RequestedTheme = headerPanel.RequestedTheme = ElementTheme.Light;
         }
         else
         {
             RequestedTheme = headerPanel.RequestedTheme = ElementTheme.Dark;
         }
     }
 }
        private void AccessibilitySettings_HighContrastChanged(AccessibilitySettings sender, object args)
        {
            if (ContrastHandlerAttached == ContrastHandler.Black)
            {
                FillCellButton.PointerEntered -= SetFillCellButtonToWhite;
                FillCellButton.PointerExited  -= SetFillCellButtonToBlack;
            }
            else if (ContrastHandlerAttached == ContrastHandler.White)
            {
                FillCellButton.PointerEntered -= SetFillCellButtonToBlack;
                FillCellButton.PointerExited  -= SetFillCellButtonToWhite;
            }

            InitializeHighContrastFillButtonHover();
        }
        public void SetColor(int colorId, Color color, string colorName)
        {
            this.colorId     = colorId;
            ColorImage.color = color;
            AccessibilitySettings component = base.gameObject.GetComponent <AccessibilitySettings>();

            if (component != null)
            {
                component.DynamicText = colorName + " " + Service.Get <Localizer>().GetTokenTranslation("GlobalUI.Navigation.button");
            }
            TutorialBreadcrumb.SetBreadcrumbId($"Color_{colorName}");
            getAvatarDetailsData();
            avatarDetailsData.PlayerColorChanged += onColorChanged;
            onColorChanged(avatarDetailsData.BodyColor);
        }
Ejemplo n.º 19
0
 private void Access_HighContrastChanged(AccessibilitySettings sender, object args)
 {
     if (access.HighContrast)
     {
         if (access.HighContrastScheme == "High Contrast White")
         {
             theme.SelectedIndex = 1;
             RequestedTheme      = stk.RequestedTheme = ElementTheme.Light;
         }
         else
         {
             theme.SelectedIndex = 2;
             RequestedTheme      = stk.RequestedTheme = ElementTheme.Dark;
         }
     }
 }
        private void onObjectAdded(RectTransform item, int index)
        {
            TemplateIcon      component         = item.GetComponent <TemplateIcon>();
            DisplayedTemplate displayedTemplate = displayedTemplates[index];

            component.gameObject.name = displayedTemplate.Definition.AssetName + "_button";
            RectTransform rectTransform = component.transform as RectTransform;

            rectTransform.anchoredPosition = Vector2.zero;
            rectTransform.anchorMin        = Vector2.zero;
            rectTransform.anchorMax        = Vector2.one;
            rectTransform.sizeDelta        = Vector2.zero;
            rectTransform.localScale       = Vector3.one;
            bool flag    = Service.Get <CPDataEntityCollection>().IsLocalPlayerMember();
            bool canDrag = flag;

            if (!flag)
            {
                canDrag = !displayedTemplate.Definition.IsMemberOnlyCreatable;
            }
            string assetName = displayedTemplate.Definition.AssetName;
            Texture2DContentKey equipmentIconPath = EquipmentPathUtil.GetEquipmentIconPath(assetName);

            component.Init(equipmentIconPath, BreadcrumbType, displayedTemplate.Definition.Id, canDrag);
            if (!flag && displayedTemplate.Definition.IsMemberOnlyCreatable)
            {
                component.SetTemplateMemberLocked(displayedTemplate.Definition);
            }
            else if (userLevel < displayedTemplate.Level)
            {
                component.SetTemplateToLevelLocked(displayedTemplate.Definition, displayedTemplate.Level);
            }
            else if (!string.IsNullOrEmpty(displayedTemplate.MascotName))
            {
                component.SetTemplateToProgressionLocked(displayedTemplate.Definition, displayedTemplate.MascotName);
            }
            else
            {
                component.SetTemplateToUnlocked(displayedTemplate.Definition);
            }
            AccessibilitySettings component2 = component.GetComponent <AccessibilitySettings>();

            if (component2 != null)
            {
                component2.CustomToken = displayedTemplate.Definition.Name;
            }
        }
    private bool onItemReady(EditableItemEvents.ItemReady evt)
    {
        int           index = evt.Index;
        EditableItem  item  = evt.Item;
        EquipmentIcon componentInChildren = item.GetComponentInChildren <EquipmentIcon>();

        switch (index)
        {
        case 0:
            item.ShowActionButton = false;
            componentInChildren.SetupCreateButton();
            break;

        case 1:
            item.ShowActionButton = false;
            componentInChildren.SetupCatalogButton();
            break;

        default:
        {
            componentInChildren.SetupEquipmentButton();
            long key = model.DisplayedInventory[index - 2];
            InventoryIconModel <DCustomEquipment> inventoryIconModel = model.InventoryData.Inventory[key];
            item.ShowActionButton = true;
            item.Action           = EditableItem.ActionType.Delete;
            if (templateDefinitions.TryGetValue(inventoryIconModel.Data.DefinitionId, out TemplateDefinition value) && !value.IsEditable)
            {
                if (inventoryIconModel.IsHidden)
                {
                    item.Action = EditableItem.ActionType.Hide;
                }
                else
                {
                    item.Action = EditableItem.ActionType.Show;
                }
            }
            AccessibilitySettings component = componentInChildren.GetComponent <AccessibilitySettings>();
            if (component != null)
            {
                component.CustomToken = value.Name;
            }
            setItemView(componentInChildren, inventoryIconModel);
            break;
        }
        }
        return(false);
    }
Ejemplo n.º 22
0
        public EquationInputArea()
        {
            m_lastLineColorIndex    = -1;
            m_AvailableColors       = new ObservableCollection <SolidColorBrush>();
            m_accessibilitySettings = new AccessibilitySettings();
            m_equationToFocus       = null;

            m_accessibilitySettings.HighContrastChanged += OnHighContrastChanged;
            m_isHighContrast = m_accessibilitySettings.HighContrast;

            m_uiSettings = new UISettings();
            m_uiSettings.ColorValuesChanged += OnColorValuesChanged;

            ReloadAvailableColors(m_accessibilitySettings.HighContrast, true);

            InitializeComponent();
        }
Ejemplo n.º 23
0
        public TitleBar()
        {
            m_coreTitleBar          = CoreApplication.GetCurrentView().TitleBar;
            m_uiSettings            = new UISettings();
            m_accessibilitySettings = new AccessibilitySettings();
            InitializeComponent();

            m_coreTitleBar.ExtendViewIntoTitleBar = true;
            Window.Current.SetTitleBar(BackgroundElement);

            Loaded   += OnLoaded;
            Unloaded += OnUnloaded;
#if IS_STORE_BUILD
            AppName.Text = AppResourceProvider.GetInstance().GetResourceString("AppName");
#else
            AppName.Text = AppResourceProvider.GetInstance().GetResourceString("DevAppName");
#endif
        }
Ejemplo n.º 24
0
        public MainPage()
        {
            m_model = new ViewModel.ApplicationViewModel();
            InitializeComponent();

            KeyboardShortcutManager.Initialize();

            Application.Current.Suspending += App_Suspending;
            m_model.PropertyChanged        += OnAppPropertyChanged;
            m_accessibilitySettings         = new AccessibilitySettings();

            if (Utilities.GetIntegratedDisplaySize(out var sizeInInches))
            {
                if (sizeInInches < 7.0) // If device's display size (diagonal length) is less than 7 inches then keep the calc always in Portrait mode only
                {
                    DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped;
                }
            }
        }
Ejemplo n.º 25
0
        protected override void OnConnected()
        {
            base.OnConnected();

            if (DesignMode.DesignModeEnabled)
            {
                return;
            }

            if (_settings == null)
            {
                _settings = new UISettings();
            }

            if (_accessibilitySettings == null)
            {
                _accessibilitySettings = new AccessibilitySettings();
            }

            if (_fastEffects == null)
            {
                _fastEffects = CompositionCapabilities.GetForCurrentView().AreEffectsFast();
            }
            if (_energySaver == null)
            {
                _energySaver = PowerManager.EnergySaverStatus == EnergySaverStatus.On;
            }

            UpdateBrush();

            // Trigger event on color changes (themes). Is also triggered for advanced effects changes.
            _settings.ColorValuesChanged -= ColorValuesChanged;
            _settings.ColorValuesChanged += ColorValuesChanged;

            _accessibilitySettings.HighContrastChanged -= AccessibilitySettings_HighContrastChanged;
            _accessibilitySettings.HighContrastChanged += AccessibilitySettings_HighContrastChanged;

            PowerManager.EnergySaverStatusChanged -= PowerManager_EnergySaverStatusChanged;
            PowerManager.EnergySaverStatusChanged += PowerManager_EnergySaverStatusChanged;

            CompositionCapabilities.GetForCurrentView().Changed -= CompositionCapabilities_Changed;
            CompositionCapabilities.GetForCurrentView().Changed += CompositionCapabilities_Changed;
        }
Ejemplo n.º 26
0
        public override void EnableElement()
        {
            MainNavMapButton component = GetComponent <MainNavMapButton>();

            if (component != null)
            {
                component.enabled = true;
            }
            AccessibilitySettings component2 = GetComponent <AccessibilitySettings>();

            if (component2 != null)
            {
                component2.CustomToken = AccessibilityEnabledToken;
            }
            GetComponent <MainNavButton>().enabled = true;
            ButtonIcon.sprite   = GetComponent <MainNavButton>().NormalSprite;
            onPressedEventAdded = false;
            GetComponent <ButtonClickListener>().OnClick.RemoveListener(onPressed);
            ButtonText.text = Service.Get <Localizer>().GetTokenTranslation(MapToken);
        }
Ejemplo n.º 27
0
        public override void DisableElement(bool hide)
        {
            MainNavMapButton component = GetComponent <MainNavMapButton>();

            if (component != null)
            {
                component.enabled = false;
            }
            AccessibilitySettings component2 = GetComponent <AccessibilitySettings>();

            if (component2 != null)
            {
                component2.CustomToken = AccessibilityDisabledToken;
            }
            GetComponent <MainNavButton>().enabled = false;
            ButtonIcon.sprite = GetComponent <MainNavButton>().DisabledSprite;
            if (!onPressedEventAdded)
            {
                onPressedEventAdded = true;
                GetComponent <ButtonClickListener>().OnClick.AddListener(onPressed);
            }
            ButtonText.text = Service.Get <Localizer>().GetTokenTranslation(ExitToken);
        }
Ejemplo n.º 28
0
 /// <summary>
 /// Конструктор по умолчанию.
 /// </summary>
 public AboutPage()
 {
     InitializeComponent();
     access = new AccessibilitySettings();
     access.HighContrastChanged += Access_HighContrastChanged;
 }
Ejemplo n.º 29
0
        private object ModifyValue(Type type, object origValue)
        {
            object modifiedValue = origValue;

            if (type == typeof(string))
            {
                modifiedValue = origValue + "_dummy";
            }
            else if (type == typeof(bool))
            {
                modifiedValue = !(bool)origValue;
            }
            else if (type == typeof(bool?))
            {
                modifiedValue = ((bool?)origValue) ?? true;
                modifiedValue = !(bool)modifiedValue;
            }
            else if (type == typeof(BatchInfo))
            {
                modifiedValue = new BatchInfo((origValue as BatchInfo)?.Name + "_dummy");
            }
            else if (type == typeof(ImageMatchSettings))
            {
                modifiedValue = new ImageMatchSettings();
            }
            else if (type == typeof(TimeSpan))
            {
                modifiedValue = ((TimeSpan)origValue).Add(TimeSpan.FromSeconds(1));
            }
            else if (type == typeof(int))
            {
                modifiedValue = ((int)origValue) + 1;
            }
            else if (type == typeof(RectangleSize))
            {
                RectangleSize origRectSize = origValue as RectangleSize;
                if (origRectSize == null)
                {
                    modifiedValue = new RectangleSize();
                }
                else
                {
                    modifiedValue = new RectangleSize(origRectSize.Width + 1, origRectSize.Height + 1);
                }
            }
            else if (type == typeof(MatchLevel))
            {
                modifiedValue = MatchLevel.Exact;
                if (modifiedValue == origValue)
                {
                    modifiedValue = MatchLevel.Content;
                }
            }
            else if (type == typeof(StitchModes))
            {
                modifiedValue = StitchModes.CSS;
                if (modifiedValue == origValue)
                {
                    modifiedValue = StitchModes.Scroll;
                }
            }
            else if (type == typeof(AccessibilityLevel))
            {
                modifiedValue = AccessibilityLevel.AA;
                if (modifiedValue == origValue)
                {
                    modifiedValue = AccessibilityLevel.AAA;
                }
            }
            else if (type == typeof(AccessibilitySettings))
            {
                modifiedValue = new AccessibilitySettings(AccessibilityLevel.AA, AccessibilityGuidelinesVersion.WCAG_2_0);
            }
            else if (type == typeof(VisualGridOption[]))
            {
                var list = new List <VisualGridOption>()
                {
                    new VisualGridOption("option1", "value1")
                };
                if (origValue != null && list.Count == ((VisualGridOption[])origValue).Length)
                {
                    list.Add(new VisualGridOption("option2", true));
                }
                modifiedValue = list.ToArray();
            }
            return(modifiedValue);
        }
Ejemplo n.º 30
0
 private void OnHighContrastChanged(AccessibilitySettings sender, object args)
 {
     ReloadAvailableColors(sender.HighContrast, true);
     m_isHighContrast = sender.HighContrast;
 }