Permalink
Browse files

Updated Drawing Pad sample style.

  • Loading branch information...
1 parent 7e90abc commit 4da517acd374e898933d280b74fdc749d5d26d5d @DamianEdwards DamianEdwards committed Oct 30, 2012
@@ -0,0 +1,60 @@
+<%@ Page Title="ASP.NET SignalR: Drawing Pad" Language="C#" MasterPageFile="~/SignalR.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Microsoft.AspNet.SignalR.Samples.Hubs.DrawingPad.Default" %>
+<asp:Content ContentPlaceHolderID="HeadContent" runat="server">
+ <style type="text/css">
+ #pad {
+ border: 2px solid #808080;
+ }
+ </style>
+</asp:Content>
+
+<asp:Content ContentPlaceHolderID="MainContent" runat="server">
+ <ul class="breadcrumb">
+ <li><a href="<%: ResolveUrl("~/") %>">SignalR Samples</a> <span class="divider">/</span></li>
+ <li class="active">Drawing Pad</li>
+ </ul>
+
+ <div class="page-header">
+ <h2>Drawing Pad <small>Real-time canvas</small></h2>
+ <p>An example of a collaborative drawing pad using the HTML5 canvas API.</p>
+ </div>
+
+ <div id="connecting" class="text-info">
+ Please while the connection is established...
+ </div>
+
+ <div id="connected" style="display: none">
+ <canvas width="700" height="400" id="pad">
+ <p class="text-error">Unsupported brower</p>
+ </canvas>
+ </div>
+</asp:Content>
+
+<asp:Content ContentPlaceHolderID="Scripts" runat="server">
+ <script src="<%: ResolveUrl("~/Scripts/jcanvas.js") %>"></script>
+ <script src="<%: ResolveUrl("~/signalr/hubs") %>"></script>
+ <script src="DrawingPad.js"></script>
+ <script>
+ $(function () {
+ var drawingPad = $.connection.DrawingPad;
+
+ // someone draw something
+ drawingPad.client.draw = function (value) {
+ $("#pad").drawingpad("line", value);
+ };
+
+ $.connection.hub.start({ transport: activeTransport }, function () {
+ drawingPad.server.join().done(function () {
+ $("#connecting").hide();
+ $("#connected").show();
+
+ color = drawingPad.state.color;
+
+ // Listen for drawing
+ $("#pad").drawingpad({ linecolor: color }).bind('line.drawingpad', function (event, args) {
+ drawingPad.server.Draw(args);
+ });
+ });
+ });
+ });
+ </script>
+</asp:Content>
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Microsoft.AspNet.SignalR.Samples.Hubs.DrawingPad
+{
+ public partial class Default : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title></title>
- <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
- <script src="../../Scripts/signalr.samples.js" type="text/javascript"></script>
- <script src="../../Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
- <script src="../../Scripts/json2.min.js" type="text/javascript"></script>
- <script src="../../Scripts/jquery.signalR.js" type="text/javascript"></script>
- <script src="../../Scripts/jcanvas.js" type="text/javascript"></script>
- <script src="../../signalr/hubs" type="text/javascript"></script>
- <script src="drawingpad.js" type="text/javascript"></script>
- <style type="text/css">
- #pad {
- border: 3px solid navy;
- }
- </style>
-</head>
-<body>
- <div id="connecting">
- Please while the connection is established...
- </div>
- <div id="connected" style="display: none">
- <canvas width="500" height="400" id="pad">
- <p>Unsupported brower</p>
- </canvas>
- </div>
- <script type="text/javascript">
- $(function () {
- var drawingPad = $.connection.DrawingPad;
-
- // someone draw something
- drawingPad.client.draw = function (value) {
- $("#pad").drawingpad("line", value);
- };
-
- $.connection.hub.start({ transport: activeTransport }, function () {
-
- drawingPad.server.join().done(function () {
- $("#connecting").hide();
- $("#connected").show();
-
- color = drawingPad.state.color;
-
- // Listen for drawing
- $("#pad").drawingpad({ linecolor: color }).bind('line.drawingpad', function (event, args) {
- drawingPad.server.Draw(args);
- });
- });
- });
- });
- </script>
-</body>
-</html>
@@ -140,7 +140,7 @@
<Content Include="Hubs\Chat\Chat.css" />
<Content Include="Hubs\Chat\Chat.js" />
<Content Include="Hubs\Chat\index.htm" />
- <Content Include="Hubs\DrawingPad\index.htm" />
+ <Content Include="Hubs\DrawingPad\Default.aspx" />
<Content Include="Hubs\MouseTracking\Default.aspx" />
<Content Include="Hubs\MouseTracking\images\wand.png" />
<Content Include="Hubs\MouseTracking\MouseTracking.css" />
@@ -247,6 +247,13 @@
<Compile Include="Hubs\Chat\ContentProviders\IContentProvider.cs" />
<Compile Include="Hubs\Chat\ContentProviders\ImageContentProvider.cs" />
<Compile Include="Hubs\Chat\ContentProviders\YouTubeContentProvider.cs" />
+ <Compile Include="Hubs\DrawingPad\Default.aspx.cs">
+ <DependentUpon>Default.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="Hubs\DrawingPad\Default.aspx.designer.cs">
+ <DependentUpon>Default.aspx</DependentUpon>
+ </Compile>
<Compile Include="Hubs\DrawingPad\DrawingPad.cs" />
<Compile Include="Hubs\MouseTracking\Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>

0 comments on commit 4da517a

Please sign in to comment.