public TypeSelectorController(SelectedTypeViewModel view) { if (view == null) { throw new ArgumentNullException("view"); } this.View = view; }
public TypeSelectorController(SelectedTypeViewModel view) { if (view == null) { throw new ArgumentNullException("view"); } this.View = view; }
private void ShowTypeSelectorDialog(ISelectedType selectedType, string dialogTitle, TextBox textBox) { var view = new SelectedTypeViewModel(selectedType) { DialogTitle = dialogTitle, TextBox = textBox }; var controller = new TypeSelectorController(view); controller.LoadView(); var dialog = new TypeSelectorDialog() { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner, Model = view }; view.SaveViewToModelCallback = controller.SaveView; if (dialog.ShowDialog() != true) { return; } }