Esempio n. 1
0
        public void Initialize(DataVaultUIContext ctx)
        {
            _ctx.AssertNull();
            ctx.AssertNotNull();

            _ctx = ctx;
            InitializeImpl();
        }
Esempio n. 2
0
        public DefaultEditValueForm(DataVaultUIContext context, IValue value)
        {
            DataVaultUIContext = context.AssertNotNull();
            Value = value.AssertNotNull();
            Wrapper = value.GetTypeToken2() == "binary" ? null : ContentTypes.ApplyCType(value);

            InitializeComponent();
            DefaultSize = new Size(Size.Width, Size.Height - _panelBinary.Height);
            InflatedSize = new Size(DefaultSize.Width + 300, DefaultSize.Height + 400);

            _cbType.Items.Add(Resources.ValueType_NotSelected);
            ContentTypes.All.ForEach(w => _cbType.Items.Add(w.LocTypeName));
            _cbType.Items.Add(Resources.ValueType_Binary);
            if (Wrapper is UnknownContentTypeAppliedToValue) _cbType.Items.Add(Value.LocalizedTypeToken());
            _cbType.SelectedIndex = 0;

            _tbName.Text = Value.Name.ResolveIfSpecial();
            _cbType.SelectedItem = Value.LocalizedTypeToken();

            _tbValueTyped.Text = Wrapper == null ? null : Wrapper.AsLocalizedString;
            _tbValueBinary.Text = Resources.BinaryType_ContentNotEditedYet;
        }