Permalink
Browse files

fixes capture api

  • Loading branch information...
1 parent 22477ea commit 06dc27aee8828a53d7b978cf2698d4e03efb0fe5 @sgrebnov committed Oct 8, 2012
@@ -244,8 +244,9 @@ public void captureImage(string options)
{
try
{
- this.captureImageOptions = String.IsNullOrEmpty(options) ?
- CaptureImageOptions.Default : JSON.JsonHelper.Deserialize<CaptureImageOptions[]>(options)[0];
+
+ string args = JSON.JsonHelper.Deserialize<string[]>(options)[0];
+ this.captureImageOptions = String.IsNullOrEmpty(args) ? CaptureImageOptions.Default : JSON.JsonHelper.Deserialize<CaptureImageOptions>(args);
}
catch (Exception ex)
@@ -275,8 +276,8 @@ public void captureAudio(string options)
{
try
{
- this.captureAudioOptions = String.IsNullOrEmpty(options) ?
- CaptureAudioOptions.Default : JSON.JsonHelper.Deserialize<CaptureAudioOptions[]>(options)[0];
+ string args = JSON.JsonHelper.Deserialize<string[]>(options)[0];
+ this.captureAudioOptions = String.IsNullOrEmpty(args) ? CaptureAudioOptions.Default : JSON.JsonHelper.Deserialize<CaptureAudioOptions>(args);
}
catch (Exception ex)
@@ -306,8 +307,8 @@ public void captureVideo(string options)
{
try
{
- this.captureVideoOptions = String.IsNullOrEmpty(options) ?
- CaptureVideoOptions.Default : JSON.JsonHelper.Deserialize<CaptureVideoOptions[]>(options)[0];
+ string args = JSON.JsonHelper.Deserialize<string[]>(options)[0];
+ this.captureVideoOptions = String.IsNullOrEmpty(args) ? CaptureVideoOptions.Default : JSON.JsonHelper.Deserialize<CaptureVideoOptions>(args);
}
catch (Exception ex)
@@ -76,7 +76,7 @@ public void Show()
string baseUrl = WP7CordovaClassLib.Cordova.Commands.BaseCommand.GetBaseURL();
// dummy parameter is used to always open a fresh version
- root.Navigate(new System.Uri( baseUrl + "Cordova/UI/AudioRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
+ root.Navigate(new System.Uri(baseUrl + "CordovaLib/UI/AudioRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
});
}
@@ -76,7 +76,7 @@ public void Show()
string baseUrl = WP7CordovaClassLib.Cordova.Commands.BaseCommand.GetBaseURL();
// dummy parameter is used to always open a fresh version
- root.Navigate(new System.Uri( baseUrl + "Cordova/UI/VideoRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
+ root.Navigate(new System.Uri(baseUrl + "CordovaLib/UI/VideoRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
});
}

0 comments on commit 06dc27a

Please sign in to comment.