Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2864B766 for ; Thu, 12 Jan 2012 19:31:33 +0000 (UTC) Received: (qmail 18303 invoked by uid 500); 12 Jan 2012 19:31:33 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 18281 invoked by uid 500); 12 Jan 2012 19:31:33 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 18274 invoked by uid 99); 12 Jan 2012 19:31:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 19:31:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.114] (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 19:31:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A8B09554CC; Thu, 12 Jan 2012 19:30:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: purplecabbage@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [33/51] [abbrv] Restucture Message-Id: <20120112193014.A8B09554CC@tyr.zones.apache.org> Date: Thu, 12 Jan 2012 19:30:14 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/App.xaml ---------------------------------------------------------------------- diff --git a/templates/custom/App.xaml b/templates/custom/App.xaml new file mode 100644 index 0000000..e546a0f --- /dev/null +++ b/templates/custom/App.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/App.xaml.cs ---------------------------------------------------------------------- diff --git a/templates/custom/App.xaml.cs b/templates/custom/App.xaml.cs new file mode 100644 index 0000000..8d8e53d --- /dev/null +++ b/templates/custom/App.xaml.cs @@ -0,0 +1,135 @@ +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 + { + /// + /// Provides easy access to the root frame of the Phone Application. + /// + /// The root frame of the Phone Application. + public PhoneApplicationFrame RootFrame { get; private set; } + + /// + /// Constructor for the Application object. + /// + 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 + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/ApplicationIcon.png ---------------------------------------------------------------------- diff --git a/templates/custom/ApplicationIcon.png b/templates/custom/ApplicationIcon.png new file mode 100644 index 0000000..a43e67a Binary files /dev/null and b/templates/custom/ApplicationIcon.png differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/Background.png ---------------------------------------------------------------------- diff --git a/templates/custom/Background.png b/templates/custom/Background.png new file mode 100644 index 0000000..e46f21d Binary files /dev/null and b/templates/custom/Background.png differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/GapAppProj.csproj ---------------------------------------------------------------------- diff --git a/templates/custom/GapAppProj.csproj b/templates/custom/GapAppProj.csproj new file mode 100644 index 0000000..6573438 --- /dev/null +++ b/templates/custom/GapAppProj.csproj @@ -0,0 +1,130 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {3677C1B7-D68B-4CF9-BF8A-E869D437A6DF} + {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + GapExample + GapExample + v4.0 + $(TargetFrameworkVersion) + WindowsPhone71 + Silverlight + true + + + true + true + GapExample.xap + Properties\AppManifest.xml + GapExample.App + true + true + + + true + full + false + Bin\Debug + DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + pdbonly + true + Bin\Release + TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + + + + + + + + + + + + + App.xaml + + + MainPage.xaml + + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + + + Designer + + + + + Designer + + + Designer + + + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + + + + + + + + CScript "$(ProjectDir)/ManifestProcessor.js" "$(ProjectPath)" + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/GapSolution.sln ---------------------------------------------------------------------- diff --git a/templates/custom/GapSolution.sln b/templates/custom/GapSolution.sln new file mode 100644 index 0000000..15a494c --- /dev/null +++ b/templates/custom/GapSolution.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}") = "GapAppProj", "GapAppProj.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/cec8a3cf/templates/custom/GapSourceDictionary.xml ---------------------------------------------------------------------- diff --git a/templates/custom/GapSourceDictionary.xml b/templates/custom/GapSourceDictionary.xml new file mode 100644 index 0000000..cef91d6 --- /dev/null +++ b/templates/custom/GapSourceDictionary.xml @@ -0,0 +1,5 @@ + + + + + http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/MainPage.xaml ---------------------------------------------------------------------- diff --git a/templates/custom/MainPage.xaml b/templates/custom/MainPage.xaml new file mode 100644 index 0000000..7c2ace5 --- /dev/null +++ b/templates/custom/MainPage.xaml @@ -0,0 +1,24 @@ + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/MainPage.xaml.cs ---------------------------------------------------------------------- diff --git a/templates/custom/MainPage.xaml.cs b/templates/custom/MainPage.xaml.cs new file mode 100644 index 0000000..106331a --- /dev/null +++ b/templates/custom/MainPage.xaml.cs @@ -0,0 +1,33 @@ +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; + + +namespace GapExample +{ + public partial class MainPage : PhoneApplicationPage + { + // Constructor + public MainPage() + { + InitializeComponent(); + } + + private void GapBrowser_Loaded(object sender, RoutedEventArgs e) + { + + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/ManifestProcessor.js ---------------------------------------------------------------------- diff --git a/templates/custom/ManifestProcessor.js b/templates/custom/ManifestProcessor.js new file mode 100644 index 0000000..0148fa2 --- /dev/null +++ b/templates/custom/ManifestProcessor.js @@ -0,0 +1,40 @@ + +var objArgs = WScript.Arguments; +for (i = 0; i < objArgs.length; i++) +{ + WScript.Echo("Arg :: " + objArgs(i)); +} + + +var fso = WScript.CreateObject("Scripting.FileSystemObject"); + +var folder = fso.GetFolder("..\\..\\www"); + +var outFile = fso.CreateTextFile("..\\..\\GapSourceDictionary.xml", true); + +outFile.WriteLine(''); +outFile.WriteLine(''); +outFile.WriteLine(''); + +function enumerateFolder(folder,parentPath) +{ + var files = new Enumerator(folder.files); + while(!files.atEnd()) + { + WScript.Echo(parentPath + "\\" + fso.GetFileName(files.item())); + outFile.WriteLine(' '); + files.moveNext(); + } + + var subFolders = new Enumerator(folder.SubFolders); + while(!subFolders.atEnd()) + { + var item = subFolders.item(); + enumerateFolder(item, parentPath + "\\" + fso.GetFileName(item)); + subFolders.moveNext(); + } +} +enumerateFolder(folder,"www"); + +outFile.WriteLine(''); + http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/Properties/AppManifest.xml ---------------------------------------------------------------------- diff --git a/templates/custom/Properties/AppManifest.xml b/templates/custom/Properties/AppManifest.xml new file mode 100644 index 0000000..877ea4b --- /dev/null +++ b/templates/custom/Properties/AppManifest.xml @@ -0,0 +1,6 @@ + + + + http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/templates/custom/Properties/AssemblyInfo.cs b/templates/custom/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..94a4580 --- /dev/null +++ b/templates/custom/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/cec8a3cf/templates/custom/Properties/WMAppManifest.xml ---------------------------------------------------------------------- diff --git a/templates/custom/Properties/WMAppManifest.xml b/templates/custom/Properties/WMAppManifest.xml new file mode 100644 index 0000000..3387ffb --- /dev/null +++ b/templates/custom/Properties/WMAppManifest.xml @@ -0,0 +1,32 @@ + + + + + ApplicationIcon.png + + + + + + + + + + + + + + + + Background.png + 0 + $safeprojectname$ + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/SplashScreenImage.jpg ---------------------------------------------------------------------- diff --git a/templates/custom/SplashScreenImage.jpg b/templates/custom/SplashScreenImage.jpg new file mode 100644 index 0000000..16e653f Binary files /dev/null and b/templates/custom/SplashScreenImage.jpg differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/www/index.html ---------------------------------------------------------------------- diff --git a/templates/custom/www/index.html b/templates/custom/www/index.html new file mode 100644 index 0000000..aaa07f4 --- /dev/null +++ b/templates/custom/www/index.html @@ -0,0 +1,35 @@ + + + + + + + PhoneGap WP7 + + + + + + + + + + + + +

Hello PhoneGap

+
+ + http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/cec8a3cf/templates/custom/www/master.css ---------------------------------------------------------------------- diff --git a/templates/custom/www/master.css b/templates/custom/www/master.css new file mode 100644 index 0000000..320f926 --- /dev/null +++ b/templates/custom/www/master.css @@ -0,0 +1,28 @@ + + + body + { + background:#000 none repeat scroll 0 0; + color:#ccc; + font-family:Helvetica, Verdana, Geneva, sans-serif; + margin:0; + border-top:1px solid #393939; + } + + h1 + { + text-align:center; + font-size:18px; + color:#FFC312; /* Mango me! */ + } + + + + + + + + + + +