/// <summary> /// Shows the dialog to the user. /// </summary> /// <param name="instance">The instance on which to managed authorized networks.</param> /// <returns>The authorized network changes or null if the user canceled the dialog.</returns> public static AuthorizedNetworkChange PromptUser(DatabaseInstance instance) { AuthorizedNetworksWindow dialog = new AuthorizedNetworksWindow(instance); dialog.ShowModal(); return(dialog.ViewModel.Result); }
public AuthorizedNetworksViewModel(AuthorizedNetworksWindow owner, DatabaseInstance instance) { _owner = owner; foreach (var network in GetAuthorizedNetworks(instance)) { Networks.Add(network); } Result = null; SaveCommand = new ProtectedCommand(OnSaveCommand); AddNetwork = new ProtectedCommand(OnAddNetwork); }
/// <summary> /// Shows the dialog to the user. /// </summary> /// <param name="instance">The instance on which to managed authorized networks.</param> /// <returns>The authorized network changes or null if the user canceled the dialog.</returns> public static AuthorizedNetworkChange PromptUser(DatabaseInstance instance) { AuthorizedNetworksWindow dialog = new AuthorizedNetworksWindow(instance); dialog.ShowModal(); return dialog.ViewModel.Result; }