You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/08/31 02:34:58 UTC
[4/4] wp7 commit: CORDOVA_CLASSLIB build time define to resolve
resource linkage
CORDOVA_CLASSLIB build time define to resolve resource linkage
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/b7812734
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/b7812734
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/b7812734
Branch: refs/heads/master
Commit: b781273445a5bfa67d1d9942eb5d1ed4b8ba1d49
Parents: e13733a
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Aug 30 13:04:08 2012 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Aug 30 13:04:08 2012 -0700
----------------------------------------------------------------------
framework/WP7CordovaClassLib.csproj | 2 +-
.../standalone/cordovalib/Commands/Notification.cs | 7 +++++++
.../standalone/cordovalib/UI/AudioCaptureTask.cs | 4 ++++
3 files changed, 12 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/b7812734/framework/WP7CordovaClassLib.csproj
----------------------------------------------------------------------
diff --git a/framework/WP7CordovaClassLib.csproj b/framework/WP7CordovaClassLib.csproj
index 914e217..a92ed15 100644
--- a/framework/WP7CordovaClassLib.csproj
+++ b/framework/WP7CordovaClassLib.csproj
@@ -42,7 +42,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
- <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;CORDOVA_CLASSLIB</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/b7812734/templates/standalone/cordovalib/Commands/Notification.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/Commands/Notification.cs b/templates/standalone/cordovalib/Commands/Notification.cs
index 03174f9..a0d3bd9 100644
--- a/templates/standalone/cordovalib/Commands/Notification.cs
+++ b/templates/standalone/cordovalib/Commands/Notification.cs
@@ -22,6 +22,7 @@ using System.Windows.Resources;
using Microsoft.Phone.Controls;
using Microsoft.Xna.Framework.Audio;
using WP7CordovaClassLib.Cordova.UI;
+using System.Diagnostics;
namespace WP7CordovaClassLib.Cordova.Commands
{
@@ -89,6 +90,12 @@ namespace WP7CordovaClassLib.Cordova.Commands
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
+
+#if CORDOVA_CLASSLIB
+ Debug.WriteLine("CORDOVA_CLASSLIB IS defined");
+#else
+ Debug.WriteLine("CORDOVA_CLASSLIB is NOT defined");
+#endif
string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
AlertOptions alertOpts = new AlertOptions();// JSON.JsonHelper.Deserialize<AlertOptions>(options);
alertOpts.message = args[0];
http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/b7812734/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/UI/AudioCaptureTask.cs b/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
index fa5938a..812d9a6 100644
--- a/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
+++ b/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
@@ -75,7 +75,11 @@ namespace WP7CordovaClassLib.Cordova.UI
root.Navigated += new System.Windows.Navigation.NavigatedEventHandler(NavigationService_Navigated);
// dummy parameter is used to always open a fresh version
+#if CORDOVA_CLASSLIB
root.Navigate(new System.Uri("/WP7CordovaClassLib;component/Cordova/UI/AudioRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
+#else
+ root.Navigate(new System.Uri("component/Cordova/UI/AudioRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
+#endif
});
}