You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/06/14 02:54:46 UTC

git commit: Added dialog UI to wp7 until dialog plugin is split out

Updated Branches:
  refs/heads/master d5ca2f064 -> 884058fb8


Added dialog UI to wp7 until dialog plugin is split out


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/commit/884058fb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/884058fb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/884058fb

Branch: refs/heads/master
Commit: 884058fb8a8e5009eac0646bf9080f7aace535f6
Parents: d5ca2f0
Author: Benn Mapes <be...@gmail.com>
Authored: Thu Jun 13 17:51:27 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu Jun 13 17:54:17 2013 -0700

----------------------------------------------------------------------
 plugin.xml                      |  2 ++
 src/wp7/NotificationBox.xaml    | 62 ++++++++++++++++++++++++++++++++++++
 src/wp7/NotificationBox.xaml.cs | 41 ++++++++++++++++++++++++
 3 files changed, 105 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/884058fb/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 9fec03c..3255126 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -54,6 +54,8 @@ id="org.apache.cordova.core.Notification"
         </config-file>
 
         <source-file src="src/wp7/Notification.cs" />
+        <source-file src="src/wp7/NotificationBox.xaml.cs" />
+        <source-file src="src/wp7/NotificationBox.xaml" />
     </platform>
     
 </plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/884058fb/src/wp7/NotificationBox.xaml
----------------------------------------------------------------------
diff --git a/src/wp7/NotificationBox.xaml b/src/wp7/NotificationBox.xaml
new file mode 100644
index 0000000..1ca5d5f
--- /dev/null
+++ b/src/wp7/NotificationBox.xaml
@@ -0,0 +1,62 @@
+<!--
+ 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="WPCordovaClassLib.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/cordova-plugin-vibration/blob/884058fb/src/wp7/NotificationBox.xaml.cs
----------------------------------------------------------------------
diff --git a/src/wp7/NotificationBox.xaml.cs b/src/wp7/NotificationBox.xaml.cs
new file mode 100644
index 0000000..50b2f2a
--- /dev/null
+++ b/src/wp7/NotificationBox.xaml.cs
@@ -0,0 +1,41 @@
+/*
+ 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 WPCordovaClassLib.Cordova.UI
+{
+    public partial class NotificationBox : UserControl
+    {
+        public NotificationBox()
+        {
+            InitializeComponent();
+        }
+    }
+}