Ejemplo n.º 1
0
 private void bGeneratePassword_Click(object sender, RoutedEventArgs e)
 {
     TableServiceContext tsc = new TableServiceContext("http://wakslab1.table.core.windows.net", new Microsoft.Samples.WindowsPhoneCloud.StorageClient.Credentials.StorageCredentialsAccountAndKey("wakslab1", "a6cxCi2PBeIVJSjvo6g5JvPY7vg804Nu6yXQoNP/LCnc1bJPe6rMqNsCju3el9AdcAaloM9ke474UfTfe+MWKg=="));
     CloudTableClient ctc = new CloudTableClient(tsc);
     ctc.CreateTableIfNotExist("NewTable1", delegate { result(); });
     try
     {
         bool? requiresNumber = cbNumber.IsChecked;
         bool? requiresSpecialCharacter = cbSpecialCharacter.IsChecked;
         int minLength = Convert.ToInt32(tbMinimumLength.Text);
         int maxLength = Convert.ToInt32(tbMaximumLength.Text);
         tbPassword.Text = RandomPassword.Generate(minLength, maxLength, requiresNumber.Value, requiresSpecialCharacter.Value);
     }
     catch
     {
         MessageBox.Show("Invalid Number");
         return;
     }
 }
        private void EnsureTablesCreated()
        {
            _tableContext = new TableServiceContext(TableServiceUri, _credentials);
            var tableClient = new CloudTableClient(_tableContext);

            tableClient.CreateTableIfNotExist(AppDeviceTableName, null);
            tableClient.CreateTableIfNotExist(AppUsageTableName, null);
            tableClient.CreateTableIfNotExist(AppAgreementTableName, null);
            tableClient.CreateTableIfNotExist(AppReviewTableName, null);
        }