public ConstantVM(ModuleDef ownerModule, object value, string constantCheckBoxToolTip) { ConstantTypeVM = new ConstantTypeVM(ownerModule, value, constantTypes, true, false); ConstantCheckBoxToolTip = constantCheckBoxToolTip; ConstantTypeVM.PropertyChanged += ConstantTypeVM_PropertyChanged; IsEnabled = ConstantTypeVM.IsEnabled; }
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 ?? Application.Current.MainWindow; if (win.ShowDialog() != true) { canceled = true; resultNoSpecialNull = null; return null; } canceled = false; resultNoSpecialNull = data.ValueNoSpecialNull; return data.Value; }