Exemplo n.º 1
0
        public ConstantVM(ModuleDef ownerModule, object value, string constantCheckBoxToolTip)
        {
            this.constantTypeVM = new ConstantTypeVM(ownerModule, value, constantTypes, true, false);
            this.ConstantCheckBoxToolTip = constantCheckBoxToolTip;
            this.ConstantTypeVM.PropertyChanged += ConstantTypeVM_PropertyChanged;

            IsEnabled = ConstantTypeVM.IsEnabled;
        }
Exemplo n.º 2
0
        public object Create(ModuleDef ownerModule, object value, ConstantType[] validConstants, bool allowNullString, bool arraysCanBeNull, TypeSigCreatorOptions options, out object resultNoSpecialNull, out bool canceled)
        {
            var data = new ConstantTypeVM(ownerModule, value, validConstants ?? DefaultConstants, true, true, options);
            var win = new ConstantTypeDlg();
            win.DataContext = data;
            win.Owner = ownerWindow ?? MainWindow.Instance;
            if (win.ShowDialog() != true) {
                canceled = true;
                resultNoSpecialNull = null;
                return null;
            }

            canceled = false;
            resultNoSpecialNull = data.ValueNoSpecialNull;
            return data.Value;
        }