Beispiel #1
0
        // text box
        private void attach(string key, TextBox txt)
        {
            txt.TextChanged -= txtChanged;
            txt.Text         = "";
            if (p == null)
            {
                return;
            }

            var v = p.Get(new Key(key, log), log);

            txt.Tag = v;
            if (v.IsSet)
            {
                txt.Text = (string)v.Value;
            }

            if (v.Readonly)
            {
                txt.Tag = null;
            }
            else
            {
                txt.TextChanged += txtChanged;
            }
        }