//********************** //* * //* AddAccount_Click * //* * //********************** // Display dialog for adding a storage account. private async void AddAccount_Click(object sender, RoutedEventArgs e) { AccountDialog dlg = new AccountDialog(); dlg.Title = "Add Storage Account"; dlg.IsEdit = false; if (dlg.ShowDialog().Value) { String accountName = dlg.AccountName.Text; AzureAccount account = new AzureAccount() { IsDeveloperAccount = dlg.AccountTypeDev.IsChecked.Value, Name = dlg.AccountName.Text, Key = dlg.AccountKey.Text, UseSSL = dlg.UseSSL, EndpointDomain = dlg.EndpointDomain.Text.Trim() }; if (String.IsNullOrEmpty(account.EndpointDomain)) { account.EndpointDomain = "core.windows.net"; } if (account.IsDeveloperAccount) { account.Name = "DevStorage"; } Accounts.Add(account); SaveAccountList(); DisplayAccountList(); await AddStorageViewAsync(accountName); } }
//********************** //* * //* AddAccount_Click * //* * //********************** // Display dialog for adding a storage account. private void AddAccount_Click(object sender, RoutedEventArgs e) { AccountDialog dlg = new AccountDialog(); dlg.Title = "Add Storage Account"; dlg.IsEdit = false; if (dlg.ShowDialog().Value) { String accountName = dlg.AccountName.Text; AzureAccount account = new AzureAccount() { IsDeveloperAccount = dlg.AccountTypeDev.IsChecked.Value, Name = dlg.AccountName.Text, Key = dlg.AccountKey.Text, UseSSL = dlg.UseSSL, EndpointDomain = dlg.EndpointDomain.Text.Trim() }; if (String.IsNullOrEmpty(account.EndpointDomain)) { account.EndpointDomain = "core.windows.net"; } if (account.IsDeveloperAccount) { account.Name = "DevStorage"; } Accounts.Add(account); SaveAccountList(); DisplayAccountList(); AddStorageView(accountName); } }