public static void OpenComposerWindow( Window owner, ViewModel parent, string method, string url, bool?isHrefTemplate = null, string body = null, string actionType = null, string description = null, string title = null, Action <ComposerViewModel> modifier = null, StartFocus focus = StartFocus.Method) { ComposerViewModel vm = new ComposerViewModel(parent); if (method != null) { vm.Method = method; } if (url != null) { vm.Url = url; } if (isHrefTemplate != null) { vm.IsHRefTemplate = isHrefTemplate.Value; } if (body != null) { vm.Body = body; } if (actionType != null) { vm.SelectedType = actionType; } if (description != null) { vm.Description = description; } if (title != null) { vm.Title = title; } vm.WindowTitle = title ?? "Request composer"; if (modifier != null) { modifier(vm); } ComposerWindow w = new ComposerWindow(vm, focus); w.Owner = owner; w.ShowDialog(); }
public static void OpenComposerWindow( Window owner, ViewModel parent, string method, string url, bool? isHrefTemplate = null, string body = null, string actionType = null, string description = null, string title = null, Action<ComposerViewModel> modifier = null, StartFocus focus = StartFocus.Method) { ComposerViewModel vm = new ComposerViewModel(parent); if (method != null) vm.Method = method; if (url != null) vm.Url = url; if (isHrefTemplate != null) vm.IsHRefTemplate = isHrefTemplate.Value; if (body != null) vm.Body = body; if (actionType != null) vm.SelectedType = actionType; if (description != null) vm.Description = description; if (title != null) vm.Title = title; vm.WindowTitle = title ?? "Request composer"; if (modifier != null) modifier(vm); ComposerWindow w = new ComposerWindow(vm, focus); w.Owner = owner; w.ShowDialog(); }