incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [30/46] rejigger to the new structure
Date Sat, 14 Jul 2012 00:24:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/AudioRecorder.xaml.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/AudioRecorder.xaml.cs b/framework/Cordova/UI/AudioRecorder.xaml.cs
deleted file mode 100644
index 5cfbf61..0000000
--- a/framework/Cordova/UI/AudioRecorder.xaml.cs
+++ /dev/null
@@ -1,387 +0,0 @@
-/*  
-	Licensed under the Apache License, Version 2.0 (the "License");
-	you may not use this file except in compliance with the License.
-	You may obtain a copy of the License at
-	
-	http://www.apache.org/licenses/LICENSE-2.0
-	
-	Unless required by applicable law or agreed to in writing, software
-	distributed under the License is distributed on an "AS IS" BASIS,
-	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	See the License for the specific language governing permissions and
-	limitations under the License.
-*/
-
-using System;
-using System.IO;
-using System.IO.IsolatedStorage;
-using System.Windows;
-using System.Windows.Threading;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Tasks;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Audio;
-using AudioResult = WP7CordovaClassLib.Cordova.UI.AudioCaptureTask.AudioResult;
-
-namespace WP7CordovaClassLib.Cordova.UI
-{
-    /// <summary>
-    /// Implements Audio Recording application
-    /// </summary>
-    public partial class AudioRecorder : PhoneApplicationPage
-    {
-
-        #region Constants
-
-        private const string RecordingStartCaption = "Start";
-        private const string RecordingStopCaption = "Stop";
-
-        private const string LocalFolderName = "AudioCache";
-        private const string FileNameFormat = "Audio-{0}.wav";
-
-        #endregion
-
-        #region Callbacks
-
-        /// <summary>
-        /// Occurs when a audio recording task is completed.
-        /// </summary>
-        public event EventHandler<AudioResult> Completed;
-
-        #endregion
-
-        #region Fields
-
-        /// <summary>
-        /// Audio source
-        /// </summary>
-        private Microphone microphone;
-
-        /// <summary>
-        /// Temporary buffer to store audio chunk
-        /// </summary>
-        private byte[] buffer;
-
-        /// <summary>
-        /// Recording duration
-        /// </summary>
-        private TimeSpan duration;
-        
-        /// <summary>
-        /// Output buffer
-        /// </summary>
-        private MemoryStream memoryStream;
-
-        /// <summary>
-        /// Xna game loop dispatcher
-        /// </summary>
-        DispatcherTimer dtXna;
-
-        /// <summary>
-        /// Recording result, dispatched back when recording page is closed
-        /// </summary>
-        private AudioResult result = new AudioResult(TaskResult.Cancel);
-
-        /// <summary>
-        /// Whether we are recording audio now
-        /// </summary>
-        private bool IsRecording
-        {
-            get
-            {
-                return (this.microphone != null && this.microphone.State == MicrophoneState.Started);
-            }
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Creates new instance of the AudioRecorder class.
-        /// </summary>
-        public AudioRecorder()
-        {
-                       
-            this.InitializeXnaGameLoop();
-
-            // microphone requires special XNA initialization to work
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Starts recording, data is stored in memory
-        /// </summary>
-        private void StartRecording()
-        {
-            this.microphone = Microphone.Default;
-            this.microphone.BufferDuration = TimeSpan.FromMilliseconds(500);
-
-            this.btnTake.IsEnabled = false;
-            this.btnStartStop.Content = RecordingStopCaption;
-
-            this.buffer = new byte[microphone.GetSampleSizeInBytes(this.microphone.BufferDuration)];
-            this.microphone.BufferReady += new EventHandler<EventArgs>(MicrophoneBufferReady);
-
-            this.memoryStream = new MemoryStream();
-            this.WriteWavHeader(this.memoryStream, this.microphone.SampleRate);
-
-            this.duration = new TimeSpan(0);
-            
-            this.microphone.Start();
-        }
-
-        /// <summary>
-        /// Stops recording
-        /// </summary>
-        private void StopRecording()
-        {
-            this.microphone.Stop();
-
-            this.microphone.BufferReady -= MicrophoneBufferReady;
-
-            this.microphone = null;
-            
-            btnStartStop.Content = RecordingStartCaption;
-
-            // check there is some data
-            this.btnTake.IsEnabled = true;
-        }
-
-        /// <summary>
-        /// Handles Start/Stop events
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnStartStop_Click(object sender, RoutedEventArgs e)
-        {
-
-            if (this.IsRecording)
-            {
-                this.StopRecording();
-            }
-            else
-            {
-                this.StartRecording();
-            }
-        }
-
-        /// <summary>
-        /// Handles Take button click
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnTake_Click(object sender, RoutedEventArgs e)
-        {
-            this.result = this.SaveAudioClipToLocalStorage();
-
-            if (Completed != null)
-            {
-                Completed(this, result);
-            }
-
-            if (this.NavigationService.CanGoBack)
-            {
-                this.NavigationService.GoBack();
-            }
-        }
-
-        /// <summary>
-        /// Handles page closing event, stops recording if needed and dispatches results.
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
-        {
-            if (IsRecording)
-            {
-                StopRecording();
-            }
-
-            this.FinalizeXnaGameLoop();
-
-            base.OnNavigatedFrom(e);
-        }
-
-        /// <summary>
-        /// Copies data from microphone to memory storages and updates recording state
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void MicrophoneBufferReady(object sender, EventArgs e)
-        {
-            this.microphone.GetData(this.buffer);
-            this.memoryStream.Write(this.buffer, 0, this.buffer.Length);
-            TimeSpan bufferDuration = this.microphone.BufferDuration;
-
-            this.Dispatcher.BeginInvoke(() =>
-            {
-                this.duration += bufferDuration;
-
-                this.txtDuration.Text = "Duration: " + 
-                    this.duration.Minutes.ToString().PadLeft(2, '0') + ":" +
-                    this.duration.Seconds.ToString().PadLeft(2, '0');
-            });     
-            
-        }
-
-        /// <summary>
-        /// Writes audio data from memory to isolated storage
-        /// </summary>
-        /// <returns></returns>
-        private AudioResult SaveAudioClipToLocalStorage()
-        {
-            if (this.memoryStream == null || this.memoryStream.Length <= 0)
-            {
-                return new AudioResult(TaskResult.Cancel);
-            }
-
-            this.UpdateWavHeader(this.memoryStream);
-            
-            // save audio data to local isolated storage
-
-            string filename = String.Format(FileNameFormat, Guid.NewGuid().ToString());
-
-            try
-            {
-                using (IsolatedStorageFile isoFile = IsolatedStorageFile.GetUserStoreForApplication())
-                {
-
-                    if (!isoFile.DirectoryExists(LocalFolderName))
-                    {
-                        isoFile.CreateDirectory(LocalFolderName);
-                    }
-
-                    string filePath = System.IO.Path.Combine("/" + LocalFolderName + "/", filename);
-
-                    this.memoryStream.Seek(0, SeekOrigin.Begin);
-
-                    using (IsolatedStorageFileStream fileStream = isoFile.CreateFile(filePath))
-                    {
-
-                        this.memoryStream.CopyTo(fileStream);
-                    }
-
-                    AudioResult result = new AudioResult(TaskResult.OK);
-                    result.AudioFileName = filePath;
-
-                    result.AudioFile = this.memoryStream;
-                    result.AudioFile.Seek(0, SeekOrigin.Begin);
-
-                    return result;
-                }
-
-                
-                
-            }
-            catch (Exception)
-            {
-                //TODO: log or do something else
-                throw;
-            }
-        }
-
-        /// <summary>
-        /// Special initialization required for the microphone: XNA game loop
-        /// </summary>
-        private void InitializeXnaGameLoop()
-        {
-            // Timer to simulate the XNA game loop (Microphone is from XNA)
-            this.dtXna = new DispatcherTimer();
-            this.dtXna.Interval = TimeSpan.FromMilliseconds(33);
-            this.dtXna.Tick += delegate { try { FrameworkDispatcher.Update(); } catch { } };
-            this.dtXna.Start();
-        }
-        /// <summary>
-        /// Finalizes XNA game loop for microphone
-        /// </summary>
-        private void FinalizeXnaGameLoop()
-        {
-            // Timer to simulate the XNA game loop (Microphone is from XNA)
-            if (dtXna != null)
-            {
-                dtXna.Stop();
-                dtXna = null;
-            }
-        }
-
-
-        #region Wav format
-        // Original source http://damianblog.com/2011/02/07/storing-wp7-recorded-audio-as-wav-format-streams/
-
-        /// <summary>
-        /// Adds wav file format header to the stream
-        /// https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
-        /// </summary>
-        /// <param name="stream">Wav stream</param>
-        /// <param name="sampleRate">Sample Rate</param>
-        private void WriteWavHeader(Stream stream, int sampleRate)
-        {
-            const int bitsPerSample = 16;
-            const int bytesPerSample = bitsPerSample / 8;
-            var encoding = System.Text.Encoding.UTF8;
-
-            // ChunkID Contains the letters "RIFF" in ASCII form (0x52494646 big-endian form).
-            stream.Write(encoding.GetBytes("RIFF"), 0, 4);
-
-            // NOTE this will be filled in later
-            stream.Write(BitConverter.GetBytes(0), 0, 4);
-
-            // Format Contains the letters "WAVE"(0x57415645 big-endian form).
-            stream.Write(encoding.GetBytes("WAVE"), 0, 4);
-
-            // Subchunk1ID Contains the letters "fmt " (0x666d7420 big-endian form).
-            stream.Write(encoding.GetBytes("fmt "), 0, 4);
-
-            // Subchunk1Size 16 for PCM.  This is the size of therest of the Subchunk which follows this number.
-            stream.Write(BitConverter.GetBytes(16), 0, 4);
-
-            // AudioFormat PCM = 1 (i.e. Linear quantization) Values other than 1 indicate some form of compression.
-            stream.Write(BitConverter.GetBytes((short)1), 0, 2);
-
-            // NumChannels Mono = 1, Stereo = 2, etc.
-            stream.Write(BitConverter.GetBytes((short)1), 0, 2);
-
-            // SampleRate 8000, 44100, etc.
-            stream.Write(BitConverter.GetBytes(sampleRate), 0, 4);
-
-            // ByteRate =  SampleRate * NumChannels * BitsPerSample/8
-            stream.Write(BitConverter.GetBytes(sampleRate * bytesPerSample), 0, 4);
-
-            // BlockAlign NumChannels * BitsPerSample/8 The number of bytes for one sample including all channels.
-            stream.Write(BitConverter.GetBytes((short)(bytesPerSample)), 0, 2);
-
-            // BitsPerSample    8 bits = 8, 16 bits = 16, etc.
-            stream.Write(BitConverter.GetBytes((short)(bitsPerSample)), 0, 2);
-
-            // Subchunk2ID Contains the letters "data" (0x64617461 big-endian form).
-            stream.Write(encoding.GetBytes("data"), 0, 4);
-
-            // NOTE to be filled in later
-            stream.Write(BitConverter.GetBytes(0), 0, 4);
-        }
-
-        /// <summary>
-        /// Updates wav file format header
-        /// https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
-        /// </summary>
-        /// <param name="stream">Wav stream</param>
-        private void UpdateWavHeader(Stream stream)
-        {
-            if (!stream.CanSeek) throw new Exception("Can't seek stream to update wav header");
-
-            var oldPos = stream.Position;
-
-            // ChunkSize  36 + SubChunk2Size
-            stream.Seek(4, SeekOrigin.Begin);
-            stream.Write(BitConverter.GetBytes((int)stream.Length - 8), 0, 4);
-
-            // Subchunk2Size == NumSamples * NumChannels * BitsPerSample/8 This is the number of bytes in the data.
-            stream.Seek(40, SeekOrigin.Begin);
-            stream.Write(BitConverter.GetBytes((int)stream.Length - 44), 0, 4);
-
-            stream.Seek(oldPos, SeekOrigin.Begin);
-        }
-
-        #endregion
-
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/ImageCapture.xaml
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/ImageCapture.xaml b/framework/Cordova/UI/ImageCapture.xaml
deleted file mode 100644
index 3fe4be6..0000000
--- a/framework/Cordova/UI/ImageCapture.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-<phone:PhoneApplicationPage 
-    x:Class="WP7CordovaClassLib.Cordova.UI.ImageCapture"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
-    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
-    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    FontFamily="{StaticResource PhoneFontFamilyNormal}"
-    FontSize="{StaticResource PhoneFontSizeNormal}"
-    Foreground="{StaticResource PhoneForegroundBrush}"
-    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
-    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
-    shell:SystemTray.IsVisible="True">
-
-    <!--LayoutRoot is the root grid where all page content is placed-->
-    <Grid x:Name="LayoutRoot" Background="Yellow">
-        <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-
-    </Grid>
- 
-
-</phone:PhoneApplicationPage>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/ImageCapture.xaml.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/ImageCapture.xaml.cs b/framework/Cordova/UI/ImageCapture.xaml.cs
deleted file mode 100644
index bb3bbeb..0000000
--- a/framework/Cordova/UI/ImageCapture.xaml.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-/*  
-	Licensed under the Apache License, Version 2.0 (the "License");
-	you may not use this file except in compliance with the License.
-	You may obtain a copy of the License at
-	
-	http://www.apache.org/licenses/LICENSE-2.0
-	
-	Unless required by applicable law or agreed to in writing, software
-	distributed under the License is distributed on an "AS IS" BASIS,
-	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	See the License for the specific language governing permissions and
-	limitations under the License.
-*/
-
-
-using System;
-using System.IO;
-using System.Windows;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Tasks;
-
-namespace WP7CordovaClassLib.Cordova.UI
-{
-    public partial class ImageCapture : PhoneApplicationPage
-    {
-        public ImageCapture()
-        {
-            InitializeComponent();
-        }
-    }
-
-    public class ImageCaptureTask
-    {
-        /// <summary>
-        /// Represents an image returned from a call to the Show method of
-        /// a WP7CordovaClassLib.Cordova.Controls.ImageCaptureTask object
-        /// </summary>
-        //public class AudioResult : TaskEventArgs
-        //{
-        //    /// <summary>
-        //    /// Initializes a new instance of the AudioResult class.
-        //    /// </summary>
-        //    public AudioResult()
-        //    { }
-
-        //    /// <summary>
-        //    /// Initializes a new instance of the AudioResult class
-        //    /// with the specified Microsoft.Phone.Tasks.TaskResult.
-        //    /// </summary>
-        //    /// <param name="taskResult">Associated Microsoft.Phone.Tasks.TaskResult</param>
-        //    public AudioResult(TaskResult taskResult)
-        //        : base(taskResult)
-        //    { }
-
-        //    /// <summary>
-        //    ///  Gets the file name of the recorded audio.
-        //    /// </summary>
-        //    public Stream AudioFile { get; internal set; }
-
-        //    /// <summary>
-        //    /// Gets the stream containing the data for the recorded audio.
-        //    /// </summary>
-        //    public string AudioFileName { get; internal set; }
-        //}
-
-        ///// <summary>
-        ///// Occurs when a audio recording task is completed.
-        ///// </summary>
-        //public event EventHandler<AudioResult> Completed;
-
-        /// <summary>
-        /// Shows Audio Recording application
-        /// </summary>
-        public void Show()
-        {
-            Deployment.Current.Dispatcher.BeginInvoke(() =>
-            {
-                var root = Application.Current.RootVisual as PhoneApplicationFrame;
-
-                root.Navigated += new System.Windows.Navigation.NavigatedEventHandler(NavigationService_Navigated);
-
-                // dummy parameter is used to always open a fresh version
-                root.Navigate(new System.Uri("/WP7CordovaClassLib;component/Cordova/UI/ImageCapture.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
-            });
-        }
-
-        /// <summary>
-        /// Performs additional configuration of the recording application.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void NavigationService_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
-        {
-            ImageCapture imageCapture = e.Content as ImageCapture;
-            if (imageCapture != null)
-            {
-                (Application.Current.RootVisual as PhoneApplicationFrame).Navigated -= NavigationService_Navigated;
-
-                //imageCapture.Completed += this.Completed;
-                //else if (this.Completed != null)
-                //{
-                //    this.Completed(this, new AudioResult(TaskResult.Cancel));
-                //}
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/NotificationBox.xaml
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/NotificationBox.xaml b/framework/Cordova/UI/NotificationBox.xaml
deleted file mode 100644
index dda25c6..0000000
--- a/framework/Cordova/UI/NotificationBox.xaml
+++ /dev/null
@@ -1,62 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License. 
--->
-<UserControl x:Class="WP7CordovaClassLib.Cordova.UI.NotificationBox"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    mc:Ignorable="d"
-    FontFamily="{StaticResource PhoneFontFamilyNormal}"
-    FontSize="{StaticResource PhoneFontSizeNormal}"
-    Foreground="{StaticResource PhoneForegroundBrush}"
-    d:DesignHeight="800" d:DesignWidth="480" VerticalAlignment="Stretch">
-
-    <Grid x:Name="LayoutRoot" 
-          Background="{StaticResource PhoneSemitransparentBrush}" VerticalAlignment="Stretch">
-        
-        <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-        
-
-        <!--TitlePanel contains the name of the application and page title-->
-        <StackPanel x:Name="TitlePanel" 
-                    Grid.Row="0" 
-                    Background="{StaticResource PhoneSemitransparentBrush}">
-            <TextBlock x:Name="PageTitle" 
-                       Text="Title" 
-                       Margin="10,10" 
-                       Style="{StaticResource PhoneTextTitle2Style}"/>
-            
-            <TextBlock x:Name="SubTitle" 
-                       Text="Subtitle" 
-                       TextWrapping="Wrap"
-                       Margin="10,10"
-                       Style="{StaticResource PhoneTextTitle3Style}"/>
-            
-            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">       
-            <StackPanel x:Name="ButtonPanel"
-                        Margin="10,10"
-                        Orientation="Horizontal"/>
-            </ScrollViewer>
-
-        </StackPanel>
-    </Grid>
-</UserControl>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/NotificationBox.xaml.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/NotificationBox.xaml.cs b/framework/Cordova/UI/NotificationBox.xaml.cs
deleted file mode 100644
index 4e4a3f8..0000000
--- a/framework/Cordova/UI/NotificationBox.xaml.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License. 
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-
-namespace WP7CordovaClassLib.Cordova.UI
-{
-    public partial class NotificationBox : UserControl
-    {
-        public NotificationBox()
-        {
-            InitializeComponent();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/VideoCaptureTask.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/VideoCaptureTask.cs b/framework/Cordova/UI/VideoCaptureTask.cs
deleted file mode 100644
index f437826..0000000
--- a/framework/Cordova/UI/VideoCaptureTask.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-/*  
-	Licensed under the Apache License, Version 2.0 (the "License");
-	you may not use this file except in compliance with the License.
-	You may obtain a copy of the License at
-	
-	http://www.apache.org/licenses/LICENSE-2.0
-	
-	Unless required by applicable law or agreed to in writing, software
-	distributed under the License is distributed on an "AS IS" BASIS,
-	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	See the License for the specific language governing permissions and
-	limitations under the License.
-*/
-
-using System;
-using System.IO;
-using System.Windows;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Tasks;
-
-namespace WP7CordovaClassLib.Cordova.UI
-{
-    /// <summary>
-    /// Allows an application to launch the Video Recording application. 
-    /// Use this to allow users to record video from your application.
-    /// </summary>
-    public class VideoCaptureTask
-    {
-        /// <summary>
-        /// Represents recorded video returned from a call to the Show method of
-        /// a WP7CordovaClassLib.Cordova.Controls.VideoCaptureTask object
-        /// </summary>
-        public class VideoResult : TaskEventArgs
-        {
-            /// <summary>
-            /// Initializes a new instance of the VideoResult class.
-            /// </summary>
-            public VideoResult()
-            { }
-
-            /// <summary>
-            /// Initializes a new instance of the VideoResult class
-            /// with the specified Microsoft.Phone.Tasks.TaskResult.
-            /// </summary>
-            /// <param name="taskResult">Associated Microsoft.Phone.Tasks.TaskResult</param>
-            public VideoResult(TaskResult taskResult)
-                : base(taskResult)
-            { }
-
-            /// <summary>
-            ///  Gets the file name of the recorded Video.
-            /// </summary>
-            public Stream VideoFile { get; internal set; }
-
-            /// <summary>
-            /// Gets the stream containing the data for the recorded Video.
-            /// </summary>
-            public string VideoFileName { get; internal set; }
-        }
-
-        /// <summary>
-        /// Occurs when a Video recording task is completed.
-        /// </summary>
-        public event EventHandler<VideoResult> Completed;
-
-        /// <summary>
-        /// Shows Video Recording application
-        /// </summary>
-        public void Show()
-        {
-            Deployment.Current.Dispatcher.BeginInvoke(() =>
-            {
-                var root = Application.Current.RootVisual as PhoneApplicationFrame;
-
-                root.Navigated += new System.Windows.Navigation.NavigatedEventHandler(NavigationService_Navigated);
-
-                // dummy parameter is used to always open a fresh version
-                root.Navigate(new System.Uri("/WP7CordovaClassLib;component/Cordova/UI/VideoRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
-            });
-        }
-
-        /// <summary>
-        /// Performs additional configuration of the recording application.
-        /// </summary>
-        private void NavigationService_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
-        {
-            if (!(e.Content is VideoRecorder)) return;
-
-            (Application.Current.RootVisual as PhoneApplicationFrame).Navigated -= NavigationService_Navigated;
-
-            VideoRecorder VideoRecorder = (VideoRecorder)e.Content;
-
-            if (VideoRecorder != null)
-            {
-                VideoRecorder.Completed += this.Completed;
-            }
-            else if (this.Completed != null)
-            {
-                this.Completed(this, new VideoResult(TaskResult.Cancel));
-            }
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/VideoRecorder.xaml
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/VideoRecorder.xaml b/framework/Cordova/UI/VideoRecorder.xaml
deleted file mode 100644
index 9d02ec7..0000000
--- a/framework/Cordova/UI/VideoRecorder.xaml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License. 
--->
-<phone:PhoneApplicationPage 
-    x:Class="WP7CordovaClassLib.Cordova.UI.VideoRecorder"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
-    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
-    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="480"
-    FontFamily="{StaticResource PhoneFontFamilyNormal}"
-    FontSize="{StaticResource PhoneFontSizeNormal}"
-    Foreground="{StaticResource PhoneForegroundBrush}"
-    SupportedOrientations="Landscape" Orientation="LandscapeLeft"
-    shell:SystemTray.IsVisible="False">
-   
-    <Canvas x:Name="LayoutRoot" Background="Transparent" Grid.ColumnSpan="1" Grid.Column="0">
-
-        <Rectangle 
-            x:Name="viewfinderRectangle"
-            Width="640" 
-            Height="480" 
-            HorizontalAlignment="Left" 
-            Canvas.Left="80"/>
-        
-    </Canvas>
-
-    <phone:PhoneApplicationPage.ApplicationBar>
-        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" x:Name="PhoneAppBar" Opacity="0.0">
-            <shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.video.rest.png" Text="Record"  x:Name="btnStartRecording" Click="StartRecording_Click" />
-            <shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="Take" x:Name="btnTakeVideo" Click="TakeVideo_Click"/>            
-        </shell:ApplicationBar>
-    </phone:PhoneApplicationPage.ApplicationBar>
-
-</phone:PhoneApplicationPage>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/framework/Cordova/UI/VideoRecorder.xaml.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/VideoRecorder.xaml.cs b/framework/Cordova/UI/VideoRecorder.xaml.cs
deleted file mode 100644
index 301a824..0000000
--- a/framework/Cordova/UI/VideoRecorder.xaml.cs
+++ /dev/null
@@ -1,405 +0,0 @@
-/*  
-	Licensed under the Apache License, Version 2.0 (the "License");
-	you may not use this file except in compliance with the License.
-	You may obtain a copy of the License at
-	
-	http://www.apache.org/licenses/LICENSE-2.0
-	
-	Unless required by applicable law or agreed to in writing, software
-	distributed under the License is distributed on an "AS IS" BASIS,
-	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-	See the License for the specific language governing permissions and
-	limitations under the License.
-*/
-
-using System;
-using System.IO;
-using System.IO.IsolatedStorage;
-using System.Windows.Media;
-using System.Windows.Navigation;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-using Microsoft.Phone.Tasks;
-using VideoResult = WP7CordovaClassLib.Cordova.UI.VideoCaptureTask.VideoResult;
-
-namespace WP7CordovaClassLib.Cordova.UI
-{
-    public partial class VideoRecorder : PhoneApplicationPage
-    {
-
-        #region Constants
-
-        /// <summary>
-        /// Caption for record button in ready state
-        /// </summary>
-        private const string RecordingStartCaption = "Record";       
-
-        /// <summary>
-        /// Caption for record button in recording state
-        /// </summary>
-        private const string RecordingStopCaption = "Stop";
-
-        /// <summary>
-        /// Start record icon URI
-        /// </summary>
-        private const string StartIconUri = "/Images/appbar.feature.video.rest.png";
-
-        /// <summary>
-        /// Stop record icon URI
-        /// </summary>
-        private const string StopIconUri = "/Images/appbar.stop.rest.png";
-
-        /// <summary>
-        /// Folder to save video clips
-        /// </summary>
-        private const string LocalFolderName = "VideoCache";
-        
-        /// <summary>
-        /// File name format
-        /// </summary>
-        private const string FileNameFormat = "Video-{0}.mp4";
-        
-        /// <summary>
-        /// Temporary file name
-        /// </summary>
-        private const string defaultFileName = "NewVideoFile.mp4";
-        
-        #endregion
-
-        #region Callbacks
-        /// <summary>
-        /// Occurs when a video recording task is completed.
-        /// </summary>
-        public event EventHandler<VideoResult> Completed;
-
-        #endregion
-
-        #region Fields
-        
-        /// <summary>
-        /// Viewfinder for capturing video
-        /// </summary>
-        private VideoBrush videoRecorderBrush;
-
-        /// <summary>
-        /// Path to save video clip
-        /// </summary>
-        private string filePath;        
-
-        /// <summary>
-        /// Source for capturing video. 
-        /// </summary>
-        private CaptureSource captureSource;
-
-        /// <summary>
-        /// Video device
-        /// </summary>
-        private VideoCaptureDevice videoCaptureDevice;
-
-        /// <summary>
-        /// File sink so save recording video in Isolated Storage
-        /// </summary>
-        private FileSink fileSink;        
-        
-        /// <summary>
-        /// For managing button and application state 
-        /// </summary>
-        private enum VideoState { Initialized, Ready, Recording, CameraNotSupported };
-        
-        /// <summary>
-        /// Current video state
-        /// </summary>
-        private VideoState currentVideoState;
-
-        /// <summary>
-        /// Stream to return result
-        /// </summary>
-        private MemoryStream memoryStream;
-
-        /// <summary>
-        /// Recording result, dispatched back when recording page is closed
-        /// </summary>
-        private VideoResult result = new VideoResult(TaskResult.Cancel);
-
-        #endregion
-
-        /// <summary>
-        /// Initializes components
-        /// </summary>
-        public VideoRecorder()
-        {
-            InitializeComponent();
-
-            PhoneAppBar = (ApplicationBar)ApplicationBar;
-            PhoneAppBar.IsVisible = true;
-            btnStartRecording = ((ApplicationBarIconButton)ApplicationBar.Buttons[0]);
-            btnTakeVideo = ((ApplicationBarIconButton)ApplicationBar.Buttons[1]);            
-        }
-
-        /// <summary>
-        /// Initializes the video recorder then page is loading
-        /// </summary>
-        protected override void OnNavigatedTo(NavigationEventArgs e)
-        {
-            base.OnNavigatedTo(e);
-            this.InitializeVideoRecorder();
-        }
-
-        /// <summary>
-        /// Disposes camera and media objects then leave the page
-        /// </summary>
-        protected override void OnNavigatedFrom(NavigationEventArgs e)
-        {
-            this.DisposeVideoRecorder();
-
-            if (this.Completed != null)
-            {
-                this.Completed(this, result);
-            }
-            base.OnNavigatedFrom(e);
-        }
-
-        /// <summary>
-        /// Handles TakeVideo button click
-        /// </summary>
-        private void TakeVideo_Click(object sender, EventArgs e)
-        {
-            this.result = this.SaveVideoClip();
-            this.NavigateBack();
-        }
-
-        private void NavigateBack()
-        {
-            if (this.NavigationService.CanGoBack)
-            {
-                this.NavigationService.GoBack();
-            }
-        }
-
-        /// <summary>
-        /// Resaves video clip from temporary directory to persistent 
-        /// </summary>
-        private VideoResult SaveVideoClip()
-        {            
-            try
-            {
-                using (IsolatedStorageFile isoFile = IsolatedStorageFile.GetUserStoreForApplication())
-                {                                       
-                    if (string.IsNullOrEmpty(filePath) || (!isoFile.FileExists(filePath)))
-                    {
-                        return new VideoResult(TaskResult.Cancel);
-                    }                    
-
-                    string fileName = String.Format(FileNameFormat, Guid.NewGuid().ToString());
-                    string newPath = Path.Combine("/" + LocalFolderName + "/", fileName);
-                    isoFile.CopyFile(filePath,newPath);
-                    isoFile.DeleteFile(filePath);
-
-                    memoryStream = new MemoryStream();
-                    using (IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream(newPath,FileMode.Open,isoFile))
-                    {                        
-                        fileStream.CopyTo(memoryStream);                       
-                    }
-
-                    VideoResult result = new VideoResult(TaskResult.OK);
-                    result.VideoFileName = newPath;
-                    result.VideoFile = this.memoryStream;
-                    result.VideoFile.Seek(0, SeekOrigin.Begin);
-                    return result;
-                }
-
-            }
-            catch (Exception)
-            {
-                return new VideoResult(TaskResult.None);
-            }
-        }
-
-        /// <summary>
-        /// Updates the buttons on the UI thread based on current state. 
-        /// </summary>
-        /// <param name="currentState">current UI state</param>
-        private void UpdateUI(VideoState currentState)
-        {
-            Dispatcher.BeginInvoke(delegate
-            {
-                switch (currentState)
-                {
-                    case VideoState.CameraNotSupported:
-                        btnStartRecording.IsEnabled = false;                        
-                        btnTakeVideo.IsEnabled = false;
-                        break;
-
-                    case VideoState.Initialized:                    
-                        btnStartRecording.Text = RecordingStartCaption;
-                        btnStartRecording.IconUri = new Uri(StartIconUri, UriKind.Relative);
-                        btnTakeVideo.IsEnabled = false;
-                        break;
-
-                    case VideoState.Ready:           
-                        btnStartRecording.Text = RecordingStartCaption;
-                        btnStartRecording.IconUri = new Uri(StartIconUri, UriKind.Relative);
-                        btnTakeVideo.IsEnabled = true;
-                        break;
-
-                    case VideoState.Recording:                        
-                        btnStartRecording.Text = RecordingStopCaption;
-                        btnStartRecording.IconUri = new Uri(StopIconUri,UriKind.Relative);
-                        btnTakeVideo.IsEnabled = false;
-                        break;
-
-                    default:
-                        break;
-                }
-                currentVideoState = currentState;
-            });
-        }
-
-        /// <summary>
-        /// Initializes VideoRecorder
-        /// </summary>
-        public void InitializeVideoRecorder()
-        {
-            if (captureSource == null)
-            {
-                captureSource = new CaptureSource();
-                fileSink = new FileSink();
-                videoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();
-
-                if (videoCaptureDevice != null)
-                {
-                    videoRecorderBrush = new VideoBrush();
-                    videoRecorderBrush.SetSource(captureSource);
-                    viewfinderRectangle.Fill = videoRecorderBrush;
-                    captureSource.Start();
-                    this.UpdateUI(VideoState.Initialized);
-                }
-                else
-                {
-                    this.UpdateUI(VideoState.CameraNotSupported);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Sets recording state: start recording 
-        /// </summary>
-        private void StartVideoRecording()
-        {
-            try
-            {
-                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Started))
-                {
-                    captureSource.Stop();
-                    fileSink.CaptureSource = captureSource;                    
-                    filePath = System.IO.Path.Combine("/" + LocalFolderName + "/", defaultFileName);
-
-                    using(IsolatedStorageFile isoFile = IsolatedStorageFile.GetUserStoreForApplication())
-                    {
-                        if (!isoFile.DirectoryExists(LocalFolderName))
-                        {
-                            isoFile.CreateDirectory(LocalFolderName);
-                        }
-
-                        if (isoFile.FileExists(filePath))
-                        {
-                            isoFile.DeleteFile(filePath);
-                        }
-                    }
-
-                    fileSink.IsolatedStorageFileName = filePath;
-                }
-
-                if (captureSource.VideoCaptureDevice != null
-                    && captureSource.State == CaptureState.Stopped)
-                {
-                    captureSource.Start();
-                }
-                this.UpdateUI(VideoState.Recording);
-            }
-            catch (Exception)
-            {
-                this.result = new VideoResult(TaskResult.None);
-                this.NavigateBack();
-            }
-        }
-        
-        /// <summary>
-        /// Sets the recording state: stop recording
-        /// </summary>
-        private void StopVideoRecording()
-        {
-            try
-            {
-                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Started))
-                {
-                    captureSource.Stop();
-                    fileSink.CaptureSource = null;
-                    fileSink.IsolatedStorageFileName = null;
-                    this.StartVideoPreview();
-                }
-            }
-            catch (Exception)
-            {
-                this.result = new VideoResult(TaskResult.None);
-                this.NavigateBack();
-            }
-        }
-
-        /// <summary>
-        /// Sets the recording state: display the video on the viewfinder. 
-        /// </summary>
-        private void StartVideoPreview()
-        {
-            try
-            {
-                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Stopped))
-                {
-                    videoRecorderBrush.SetSource(captureSource);
-                    viewfinderRectangle.Fill = videoRecorderBrush;
-                    captureSource.Start();
-                    this.UpdateUI(VideoState.Ready);
-                }
-            }
-            catch (Exception)
-            {
-                this.result = new VideoResult(TaskResult.None);
-                this.NavigateBack();
-            }
-        }
-
-        /// <summary>
-        /// Starts video recording 
-        /// </summary>
-        private void StartRecording_Click(object sender, EventArgs e)
-        {
-            if (currentVideoState == VideoState.Recording)
-            {
-                this.StopVideoRecording();
-            }
-            else
-            {
-                this.StartVideoRecording();
-            }            
-        }             
-
-        /// <summary>
-        /// Releases resources
-        /// </summary>
-        private void DisposeVideoRecorder()
-        {
-            if (captureSource != null)
-            {
-                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Started))
-                {
-                    captureSource.Stop();
-                }
-                captureSource = null;
-                videoCaptureDevice = null;
-                fileSink = null;
-                videoRecorderBrush = null;
-            }
-        }
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/App.xaml
----------------------------------------------------------------------
diff --git a/templates/standalone/App.xaml b/templates/standalone/App.xaml
new file mode 100644
index 0000000..d37fafa
--- /dev/null
+++ b/templates/standalone/App.xaml
@@ -0,0 +1,37 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+-->
+<Application 
+    x:Class="GapExample.App"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
+
+    <!--Application Resources-->
+    <Application.Resources>
+    </Application.Resources>
+
+    <Application.ApplicationLifetimeObjects>
+        <!--Required object that handles lifetime events for the application-->
+        <shell:PhoneApplicationService 
+            Launching="Application_Launching" Closing="Application_Closing" 
+            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
+    </Application.ApplicationLifetimeObjects>
+
+</Application>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/App.xaml.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/App.xaml.cs b/templates/standalone/App.xaml.cs
new file mode 100644
index 0000000..0b0590d
--- /dev/null
+++ b/templates/standalone/App.xaml.cs
@@ -0,0 +1,154 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+
+namespace GapExample
+{
+    public partial class App : Application
+    {
+        /// <summary>
+        /// Provides easy access to the root frame of the Phone Application.
+        /// </summary>
+        /// <returns>The root frame of the Phone Application.</returns>
+        public PhoneApplicationFrame RootFrame { get; private set; }
+
+        /// <summary>
+        /// Constructor for the Application object.
+        /// </summary>
+        public App()
+        {
+            // Global handler for uncaught exceptions. 
+            UnhandledException += Application_UnhandledException;
+
+            // Show graphics profiling information while debugging.
+            if (System.Diagnostics.Debugger.IsAttached)
+            {
+                // Display the current frame rate counters.
+                //Application.Current.Host.Settings.EnableFrameRateCounter = true;
+
+                // Show the areas of the app that are being redrawn in each frame.
+                //Application.Current.Host.Settings.EnableRedrawRegions = true;
+
+                // Enable non-production analysis visualization mode, 
+                // which shows areas of a page that are being GPU accelerated with a colored overlay.
+                //Application.Current.Host.Settings.EnableCacheVisualization = true;
+            }
+
+            // Standard Silverlight initialization
+            InitializeComponent();
+
+            // Phone-specific initialization
+            InitializePhoneApplication();
+        }
+
+        // Code to execute when the application is launching (eg, from Start)
+        // This code will not execute when the application is reactivated
+        private void Application_Launching(object sender, LaunchingEventArgs e)
+        {
+        }
+
+        // Code to execute when the application is activated (brought to foreground)
+        // This code will not execute when the application is first launched
+        private void Application_Activated(object sender, ActivatedEventArgs e)
+        {
+        }
+
+        // Code to execute when the application is deactivated (sent to background)
+        // This code will not execute when the application is closing
+        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
+        {
+        }
+
+        // Code to execute when the application is closing (eg, user hit Back)
+        // This code will not execute when the application is deactivated
+        private void Application_Closing(object sender, ClosingEventArgs e)
+        {
+        }
+
+        // Code to execute if a navigation fails
+        private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
+        {
+            if (System.Diagnostics.Debugger.IsAttached)
+            {
+                // A navigation has failed; break into the debugger
+                System.Diagnostics.Debugger.Break();
+            }
+        }
+
+        // Code to execute on Unhandled Exceptions
+        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+        {
+            if (System.Diagnostics.Debugger.IsAttached)
+            {
+                // An unhandled exception has occurred; break into the debugger
+                System.Diagnostics.Debugger.Break();
+            }
+        }
+
+        #region Phone application initialization
+
+        // Avoid double-initialization
+        private bool phoneApplicationInitialized = false;
+
+        // Do not add any additional code to this method
+        private void InitializePhoneApplication()
+        {
+            if (phoneApplicationInitialized)
+                return;
+
+            // Create the frame but don't set it as RootVisual yet; this allows the splash
+            // screen to remain active until the application is ready to render.
+            RootFrame = new PhoneApplicationFrame();
+            RootFrame.Navigated += CompleteInitializePhoneApplication;
+
+            // Handle navigation failures
+            RootFrame.NavigationFailed += RootFrame_NavigationFailed;
+
+            // Ensure we don't initialize again
+            phoneApplicationInitialized = true;
+        }
+
+        // Do not add any additional code to this method
+        private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
+        {
+            // Set the root visual to allow the application to render
+            if (RootVisual != RootFrame)
+                RootVisual = RootFrame;
+
+            // Remove this handler since it is no longer needed
+            RootFrame.Navigated -= CompleteInitializePhoneApplication;
+        }
+
+        #endregion
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/ApplicationIcon.png
----------------------------------------------------------------------
diff --git a/templates/standalone/ApplicationIcon.png b/templates/standalone/ApplicationIcon.png
new file mode 100644
index 0000000..6b69046
Binary files /dev/null and b/templates/standalone/ApplicationIcon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/Background.png
----------------------------------------------------------------------
diff --git a/templates/standalone/Background.png b/templates/standalone/Background.png
new file mode 100644
index 0000000..2667df4
Binary files /dev/null and b/templates/standalone/Background.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/BuildManifestProcessor.js
----------------------------------------------------------------------
diff --git a/templates/standalone/BuildManifestProcessor.js b/templates/standalone/BuildManifestProcessor.js
new file mode 100644
index 0000000..67073d2
--- /dev/null
+++ b/templates/standalone/BuildManifestProcessor.js
@@ -0,0 +1,80 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+*/
+var objArgs = WScript.Arguments;
+for (i = 0; i < objArgs.length; i++) {
+    WScript.Echo("Arg :: " + objArgs(i));
+}
+
+var projectFilePath = null;
+if (objArgs && objArgs.length > 0) {
+    projectFilePath = objArgs(0);
+}
+
+
+var fso = WScript.CreateObject("Scripting.FileSystemObject");
+var outFile = fso.CreateTextFile("..\\..\\CordovaSourceDictionary.xml", true);
+
+outFile.WriteLine('<?xml version="1.0" encoding="utf-8"?>');
+outFile.WriteLine('<!-- This file is auto-generated, do not edit! -jm -->');
+outFile.WriteLine('<CordovaSourceDictionary>');
+
+// We need to get any Linked files from the project
+
+WScript.Echo("Adding Source Files ...");
+if (projectFilePath != null) {
+    var projXml = WScript.CreateObject("Microsoft.XMLDOM");
+
+    projXml.async = false;
+    if (projXml.load(projectFilePath)) {
+
+        // add linked content ( windows shortcuts )
+        var nodes = projXml.selectNodes("/Project/ItemGroup/Content/Link");
+        WScript.Echo("/Project/ItemGroup/Content/Link nodes.length" + nodes.length);
+        for (var n = 0; n < nodes.length; n++) {
+            outFile.WriteLine('    <FilePath Value="' + nodes[n].text + '"/>');
+        }
+
+        // add files of type Resource
+        nodes = projXml.selectNodes("/Project/ItemGroup/Resource/Link");
+        WScript.Echo("/Project/ItemGroup/Resource/Link nodes.length" + nodes.length);
+        for (n = 0; n < nodes.length; n++) {
+            outFile.WriteLine('    <FilePath Value="' + nodes[n].text + '"/>');
+        }
+
+        // add Content files from www folder
+        nodes = projXml.selectNodes("/Project/ItemGroup/Content[@Include]");
+        WScript.Echo("/Project/ItemGroup/Content nodes.length" + nodes.length);
+        for (n = 0; n < nodes.length; n++) {
+            for (var i = 0; i < nodes[n].attributes.length; i++) {
+
+                if (nodes[n].attributes[i].name == "Include") {
+                    var val = nodes[n].attributes[i].value;
+                    if (val.indexOf("www") == 0) {
+                        WScript.Echo("adding value :: " + val);
+                        outFile.WriteLine('    <FilePath Value="' + val + '"/>');
+                    }
+                }
+            }
+            
+        }
+    }
+}
+
+outFile.WriteLine('</CordovaSourceDictionary>');
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/templates/standalone/CordovaAppProj.csproj b/templates/standalone/CordovaAppProj.csproj
new file mode 100644
index 0000000..d8923e9
--- /dev/null
+++ b/templates/standalone/CordovaAppProj.csproj
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.20506</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
+    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>CordovaApp</RootNamespace>
+    <AssemblyName>CordovaApp</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
+    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+    <SilverlightApplication>true</SilverlightApplication>
+    <SupportedCultures>
+    </SupportedCultures>
+    <XapOutputs>true</XapOutputs>
+    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+    <XapFilename>CordovaApp.xap</XapFilename>
+    <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+    <SilverlightAppEntry>
+    </SilverlightAppEntry>
+    <ValidateXaml>true</ValidateXaml>
+    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Bin\Release</OutputPath>
+    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Devices.Sensors" />
+    <Reference Include="Microsoft.Phone" />
+    <Reference Include="Microsoft.Phone.Interop" />
+    <Reference Include="Microsoft.Xna.Framework" />
+    <Reference Include="System.Device" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Servicemodel.Web" />
+    <Reference Include="System.Windows" />
+    <Reference Include="system" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Net" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Xml.Linq" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="cordovalib\BrowserMouseHelper.cs" />
+    <Compile Include="cordovalib\CommandFactory.cs" />
+    <Compile Include="cordovalib\Commands\Accelerometer.cs" />
+    <Compile Include="cordovalib\Commands\AudioPlayer.cs" />
+    <Compile Include="cordovalib\Commands\BaseCommand.cs" />
+    <Compile Include="cordovalib\Commands\Battery.cs" />
+    <Compile Include="cordovalib\Commands\Camera.cs" />
+    <Compile Include="cordovalib\Commands\Capture.cs" />
+    <Compile Include="cordovalib\Commands\Compass.cs" />
+    <Compile Include="cordovalib\Commands\Contacts.cs" />
+    <Compile Include="cordovalib\Commands\DebugConsole.cs" />
+    <Compile Include="cordovalib\Commands\Device.cs" />
+    <Compile Include="cordovalib\Commands\File.cs" />
+    <Compile Include="cordovalib\Commands\FileTransfer.cs" />
+    <Compile Include="cordovalib\Commands\GeoLocation.cs" />
+    <Compile Include="cordovalib\Commands\ImageExifHelper.cs" />
+    <Compile Include="cordovalib\Commands\Media.cs" />
+    <Compile Include="cordovalib\Commands\MimeTypeMapper.cs" />
+    <Compile Include="cordovalib\Commands\NetworkStatus.cs" />
+    <Compile Include="cordovalib\Commands\Notification.cs" />
+    <Compile Include="cordovalib\CordovaCommandCall.cs" />
+    <Compile Include="cordovalib\CordovaView.xaml.cs">
+      <DependentUpon>CordovaView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="cordovalib\DOMStorageHelper.cs" />
+    <Compile Include="cordovalib\JSON\JsonHelper.cs" />
+    <Compile Include="cordovalib\NativeExecution.cs" />
+    <Compile Include="cordovalib\OrientationHelper.cs" />
+    <Compile Include="cordovalib\PluginResult.cs" />
+    <Compile Include="cordovalib\ScriptCallback.cs" />
+    <Compile Include="cordovalib\UI\AudioCaptureTask.cs" />
+    <Compile Include="cordovalib\UI\AudioRecorder.xaml.cs">
+      <DependentUpon>AudioRecorder.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="cordovalib\UI\ImageCapture.xaml.cs">
+      <DependentUpon>ImageCapture.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="cordovalib\UI\NotificationBox.xaml.cs">
+      <DependentUpon>NotificationBox.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="cordovalib\UI\VideoCaptureTask.cs" />
+    <Compile Include="cordovalib\UI\VideoRecorder.xaml.cs">
+      <DependentUpon>VideoRecorder.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="MainPage.xaml.cs">
+      <DependentUpon>MainPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </ApplicationDefinition>
+    <Page Include="cordovalib\CordovaView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="cordovalib\UI\AudioRecorder.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="cordovalib\UI\ImageCapture.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="cordovalib\UI\NotificationBox.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="cordovalib\UI\VideoRecorder.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="MainPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="VERSION" />
+    <Resource Include="cordovalib\Images\appbar.back.rest.png" />
+    <Resource Include="cordovalib\Images\appbar.close.rest.png" />
+    <Resource Include="cordovalib\Images\appbar.feature.video.rest.png" />
+    <Resource Include="cordovalib\Images\appbar.next.rest.png" />
+    <Resource Include="cordovalib\Images\appbar.save.rest.png" />
+    <Resource Include="cordovalib\Images\appbar.stop.rest.png" />
+    <Content Include="cordovalib\resources\notification-beep.wav" />
+    <Content Include="CordovaSourceDictionary.xml" />
+    <None Include="BuildManifestProcessor.js" />
+    <Content Include="www\cordova-1.9.0.js" />
+    <Content Include="www\index.html">
+      <SubType>Designer</SubType>
+    </Content>
+    <Content Include="www\master.css" />
+    <None Include="cordova\debug.bat" />
+    <None Include="cordova\emulate.bat" />
+    <None Include="Properties\AppManifest.xml">
+      <SubType>Designer</SubType>
+    </None>
+    <None Include="Properties\WMAppManifest.xml">
+      <SubType>Designer</SubType>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="ApplicationIcon.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Background.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="SplashScreenImage.jpg" />
+  </ItemGroup>
+  <ItemGroup>
+    <WCFMetadata Include="Service References\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Plugins\" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ProjectExtensions />
+  <PropertyGroup>
+    <PreBuildEvent>CScript "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/CordovaSolution.sln
----------------------------------------------------------------------
diff --git a/templates/standalone/CordovaSolution.sln b/templates/standalone/CordovaSolution.sln
new file mode 100644
index 0000000..5ce2292
--- /dev/null
+++ b/templates/standalone/CordovaSolution.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010 Express for Windows Phone
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CordovaAppProj", "CordovaAppProj.csproj", "{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+		{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Release|Any CPU.Deploy.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/MainPage.xaml
----------------------------------------------------------------------
diff --git a/templates/standalone/MainPage.xaml b/templates/standalone/MainPage.xaml
new file mode 100644
index 0000000..df58028
--- /dev/null
+++ b/templates/standalone/MainPage.xaml
@@ -0,0 +1,52 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+-->
+<phone:PhoneApplicationPage 
+    x:Class="GapExample.MainPage"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}"
+    FontSize="{StaticResource PhoneFontSizeNormal}"
+    Foreground="{StaticResource PhoneForegroundBrush}"
+    Background="Black"
+    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
+    shell:SystemTray.IsVisible="True" d:DesignHeight="768" d:DesignWidth="480" 
+    xmlns:my="clr-namespace:WP7CordovaClassLib">
+    <Grid x:Name="LayoutRoot" Background="Transparent" HorizontalAlignment="Stretch">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <my:CordovaView HorizontalAlignment="Stretch" 
+                   Margin="0,0,0,0"  
+                   Name="PGView" 
+                   VerticalAlignment="Stretch" />
+        <Image Source="SplashScreenImage.jpg"
+          x:Name="SplashImage"
+          VerticalAlignment="Center"
+          HorizontalAlignment="Stretch">
+            <Image.Projection>
+                <PlaneProjection x:Name="SplashProjector"  CenterOfRotationX="0"/>
+            </Image.Projection>
+        </Image>
+    </Grid>
+
+</phone:PhoneApplicationPage>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/MainPage.xaml.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/MainPage.xaml.cs b/templates/standalone/MainPage.xaml.cs
new file mode 100644
index 0000000..7d12e82
--- /dev/null
+++ b/templates/standalone/MainPage.xaml.cs
@@ -0,0 +1,72 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Controls;
+using System.IO;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using WP7CordovaClassLib;
+
+
+namespace GapExample
+{
+    public partial class MainPage : PhoneApplicationPage
+    {
+        // Constructor
+        public MainPage()
+        {
+            InitializeComponent();
+            this.PGView.Loaded += GapBrowser_Loaded;
+        }
+
+        private void GapBrowser_Loaded(object sender, RoutedEventArgs e)
+        {
+            this.PGView.Loaded -= GapBrowser_Loaded;
+            Storyboard _storyBoard = new Storyboard();
+            DoubleAnimation animation = new DoubleAnimation()
+            {
+                From = 0,
+                Duration = TimeSpan.FromSeconds(0.6),
+                To = 90
+            };
+            Storyboard.SetTarget(animation, SplashProjector);
+            Storyboard.SetTargetProperty(animation, new PropertyPath("RotationY"));
+            _storyBoard.Children.Add(animation);
+            _storyBoard.Begin();
+            _storyBoard.Completed += Splash_Completed;
+        }
+
+        void Splash_Completed(object sender, EventArgs e)
+        {
+            (sender as Storyboard).Completed -= Splash_Completed;
+            LayoutRoot.Children.Remove(SplashImage);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/Properties/AppManifest.xml
----------------------------------------------------------------------
diff --git a/templates/standalone/Properties/AppManifest.xml b/templates/standalone/Properties/AppManifest.xml
new file mode 100644
index 0000000..877ea4b
--- /dev/null
+++ b/templates/standalone/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+  <Deployment.Parts>
+  </Deployment.Parts>
+</Deployment>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/Properties/AssemblyInfo.cs b/templates/standalone/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..94a4580
--- /dev/null
+++ b/templates/standalone/Properties/AssemblyInfo.cs
@@ -0,0 +1,38 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("GapAppProj")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("GapAppProj")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("9e27b972-0825-4386-ba17-63c695262c3d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/templates/standalone/Properties/WMAppManifest.xml b/templates/standalone/Properties/WMAppManifest.xml
new file mode 100644
index 0000000..d5913e6
--- /dev/null
+++ b/templates/standalone/Properties/WMAppManifest.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
+  <App xmlns="" ProductID="{$guid1$}" Title="$safeprojectname$" 
+       RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"  
+       Author="$safeprojectname$ author" 
+       Description="PhoneGap for Windows Phone 7" 
+       Publisher="$safeprojectname$">
+    
+    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
+    <Capabilities>
+      <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+      <Capability Name="ID_CAP_IDENTITY_USER" />
+      <Capability Name="ID_CAP_LOCATION" />
+      <Capability Name="ID_CAP_NETWORKING" />
+      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+      <Capability Name="ID_CAP_APPOINTMENTS"/>
+      <Capability Name="ID_CAP_CAMERA"/>
+      <Capability Name="ID_CAP_CONTACTS"/>
+      <Capability Name="ID_CAP_ISV_CAMERA"/>
+      <Capability Name="ID_CAP_MEDIALIB"/>
+      <Capability Name="ID_CAP_MICROPHONE"/>
+      <Capability Name="ID_CAP_PHONEDIALER"/>
+      <Capability Name="ID_CAP_PUSH_NOTIFICATION"/>
+      <Capability Name="ID_CAP_SENSORS"/>
+      <Capability Name="ID_HW_FRONTCAMERA"/>      
+    </Capabilities>
+    
+    <Tasks>
+      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
+    </Tasks>
+    <Tokens>
+      <PrimaryToken TokenID="$safeprojectname$Token" TaskName="_default">
+        <TemplateType5>
+          <BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
+          <Count>0</Count>
+          <Title>$safeprojectname$</Title>
+        </TemplateType5>
+      </PrimaryToken>
+    </Tokens>
+  </App>
+</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/SplashScreenImage.jpg
----------------------------------------------------------------------
diff --git a/templates/standalone/SplashScreenImage.jpg b/templates/standalone/SplashScreenImage.jpg
new file mode 100644
index 0000000..d35501d
Binary files /dev/null and b/templates/standalone/SplashScreenImage.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/VERSION
----------------------------------------------------------------------
diff --git a/templates/standalone/VERSION b/templates/standalone/VERSION
new file mode 100644
index 0000000..359a5b9
--- /dev/null
+++ b/templates/standalone/VERSION
@@ -0,0 +1 @@
+2.0.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/cordova/debug.bat
----------------------------------------------------------------------
diff --git a/templates/standalone/cordova/debug.bat b/templates/standalone/cordova/debug.bat
new file mode 100644
index 0000000..4efc80c
--- /dev/null
+++ b/templates/standalone/cordova/debug.bat
@@ -0,0 +1,68 @@
+
+@echo off
+goto start
+
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+:start
+
+
+if /i "%1"=="help" goto usage
+if /i "%1"=="-help" goto usage
+if /i "%1"=="--help" goto usage
+if /i "%1"=="/help" goto usage
+if /i "%1"=="/?" goto usage
+
+
+if defined VCINSTALLDIR goto start-msbuild
+if not defined VS100COMNTOOLS goto msbuild-missing
+if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-missing
+call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat"
+if not defined VCINSTALLDIR goto msbuild-missing
+goto start-msbuild
+
+
+:builderror
+echo Error level 1
+goto exit
+
+:msbuild-missing
+echo Error! Cannot run msbuild from this command prompt.  Try running a VS Command prompt.
+goto exit
+
+
+:start-msbuild
+cd ..
+msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug
+cd cordova
+if errorlevel 1 goto builderror
+goto deploy
+
+:usage
+echo "Usage: %0"
+echo "solution file is expected to be in the parent folder."
+goto exit
+
+:deploy
+CordovaDeploy ../Bin/Debug -d:1
+
+
+:exit
+
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/62d32605/templates/standalone/cordova/emulate.bat
----------------------------------------------------------------------
diff --git a/templates/standalone/cordova/emulate.bat b/templates/standalone/cordova/emulate.bat
new file mode 100644
index 0000000..b3375fe
--- /dev/null
+++ b/templates/standalone/cordova/emulate.bat
@@ -0,0 +1,24 @@
+
+@echo off
+goto start
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+
+:start
+CordovaDeploy ../Bin/Debug -d:1
\ No newline at end of file


Mime
View raw message