public void Execute(object parameter) { if (! (parameter is UserViewModel)) throw new ArgumentException(String.Format("Invalid paramater, expected {0} found {1}", typeof (UserViewModel), parameter.GetType())); var uvm = parameter as UserViewModel; var dialog = new DialogWindow("Edit " + uvm.Name, new EditUserUserControl(uvm)); dialog.ShowDialog(); }
private void ShowAboutDialog() { _logger.Debug("Show about dialgo"); var dialog = new DialogWindow("About", new AboutUserControl()); dialog.Show(); }
private void ManageUsers() { _logger.Debug("Manage users called."); var dialog = new DialogWindow("Manage Users", new ManageUsersUserControl()); dialog.Show(); }