diff --git a/SampleUserControlLibrary/SampleUserControl.xaml.cs b/SampleUserControlLibrary/SampleUserControl.xaml.cs
index 15a8e4c..f580b73 100644
--- a/SampleUserControlLibrary/SampleUserControl.xaml.cs
+++ b/SampleUserControlLibrary/SampleUserControl.xaml.cs
@@ -98,6 +98,12 @@ public string SubscriptionKey
set;
}
+ public string AzureEnvironment
+ {
+ get;
+ set;
+ }
+
public SampleScenarios()
{
InitializeComponent();
diff --git a/SampleUserControlLibrary/SubscriptionKeyPage.xaml b/SampleUserControlLibrary/SubscriptionKeyPage.xaml
index ff16284..d7f815a 100644
--- a/SampleUserControlLibrary/SubscriptionKeyPage.xaml
+++ b/SampleUserControlLibrary/SubscriptionKeyPage.xaml
@@ -39,6 +39,11 @@
+
+
+ Global Azure
+ Mooncake - China Azure
+
diff --git a/SampleUserControlLibrary/SubscriptionKeyPage.xaml.cs b/SampleUserControlLibrary/SubscriptionKeyPage.xaml.cs
index 5ed6eb5..cabd12e 100644
--- a/SampleUserControlLibrary/SubscriptionKeyPage.xaml.cs
+++ b/SampleUserControlLibrary/SubscriptionKeyPage.xaml.cs
@@ -49,6 +49,7 @@ public partial class SubscriptionKeyPage : Page, INotifyPropertyChanged
private readonly string _defaultSubscriptionKeyPromptMessage = "Paste your subscription key here to start";
private static string s_subscriptionKey;
+ private static string s_environment;
private SampleScenarios _sampleScenarios;
public SubscriptionKeyPage(SampleScenarios sampleScenarios)
@@ -78,6 +79,23 @@ public string SubscriptionKey
}
}
+ ///
+ /// Get or sets Azure Environment
+ ///
+ public string AzureEnvironment
+ {
+ get
+ {
+ return s_environment;
+ }
+
+ set
+ {
+ s_environment = value;
+ _sampleScenarios.AzureEnvironment = s_environment;
+ }
+ }
+
///
/// Implement INotifyPropertyChanged interface
///
@@ -186,5 +204,16 @@ private void GetKeyButton_Click(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://www.microsoft.com/cognitive-services/en-us/sign-up");
}
+
+ private void RadioButton_Checked(object sender, RoutedEventArgs e)
+ {
+ var button = sender as RadioButton;
+
+ if (button.Content != null)
+ {
+ // s_environment = button.Content.ToString().ToLower();
+ AzureEnvironment = button.Content.ToString().ToLower();
+ }
+ }
}
}