This class is the dialog to manage authorized networks for Cloud SQL instances.
Inheritance: GoogleCloudExtension.Theming.CommonDialogWindowBase
コード例 #1
0
        /// <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);
        }
コード例 #2
0
        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;
 }