Ejemplo n.º 1
0
            public LocalisedBindableString(LocalisedString text, IBindable <IResourceStore <string> > storage, IBindable <bool> preferUnicode)
            {
                this.text = text;

                this.storage.BindTo(storage);
                this.preferUnicode.BindTo(preferUnicode);

                this.storage.BindValueChanged(_ => updateValue());
                this.preferUnicode.BindValueChanged(_ => updateValue(), true);
            }
Ejemplo n.º 2
0
        public LocalisedString GetLocalisedString(string key)
        {
            var bindable = new LocalisedString(key)
            {
                Value = GetLocalised(key)
            };

            AddWeakReference(bindable);

            return(bindable);
        }
        public LocalisedString GetLocalisedString(string key)
        {
            var bindable = new LocalisedString(key)
            {
                Value = GetLocalised(key)
            };

            localisedBindings.Add(bindable);

            return(bindable);
        }
Ejemplo n.º 4
0
 public ILocalisedBindableString GetLocalisedString(LocalisedString original) => new LocalisedBindableString(original, currentStorage, preferUnicode);
Ejemplo n.º 5
0
 protected void AddWeakReference(LocalisedString localisedBindable) => localisedBindings.Add(new WeakReference <LocalisedString>(localisedBindable));