Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated Mouse Tracking sample style.

  • Loading branch information...
commit 7e90abcfd7f8f67d9f62469b910e2b4946ccf3c9 1 parent 49ef78c
@DamianEdwards DamianEdwards authored
View
22 samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/MouseTracking/Default.aspx
@@ -0,0 +1,22 @@
+<%@ Page Title="ASP.NET SignalR: Mouse Tracking" Language="C#" MasterPageFile="~/SignalR.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Microsoft.AspNet.SignalR.Samples.Hubs.MouseTracking.Default" %>
+
+<asp:Content runat="server" ContentPlaceHolderID="HeadContent">
+ <link href="MouseTracking.css" rel="stylesheet" type="text/css" />
+</asp:Content>
+
+<asp:Content runat="server" ContentPlaceHolderID="MainContent">
+ <ul class="breadcrumb">
+ <li><a href="<%: ResolveUrl("~/") %>">SignalR Samples</a> <span class="divider">/</span></li>
+ <li class="active">Mouse Tracking</li>
+ </ul>
+
+ <div class="page-header">
+ <h2>Mouse Tracking</h2>
+ <p>An example that displays a live cursor on all users' screens for all other users' mouse movements.</p>
+ </div>
+
+</asp:Content>
+
+<asp:Content runat="server" ContentPlaceHolderID="Scripts">
+ <script src="MouseTracking.js"></script>
+</asp:Content>
View
17 samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/MouseTracking/Default.aspx.cs
@@ -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.MouseTracking
+{
+ public partial class Default : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
View
17 samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/MouseTracking/Default.aspx.designer.cs
@@ -0,0 +1,17 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Microsoft.AspNet.SignalR.Samples.Hubs.MouseTracking
+{
+
+
+ public partial class Default
+ {
+ }
+}
View
13 samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/MouseTracking/MouseTracking.css
@@ -1,18 +1,19 @@
-body
-{
+body {
font-family: Trebuchet MS;
font-size: 13px;
}
-.icon
-{
+.icon {
background-repeat: no-repeat;
background-position: 0 50%;
padding-left: 20px;
line-height: 20px;
}
-.icon-wand
-{
+.icon-wand {
background-image: url('images/wand.png');
}
+
+.page-header {
+ min-height: 500px;
+}
View
6 samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/MouseTracking/MouseTracking.js
@@ -1,4 +1,4 @@
-/// <reference path="../../Scripts/jquery-1.6.4.js" />
+/// <reference path="../../Scripts/jquery-1.8.2.js" />
/// <reference path="../../Scripts/jquery.signalR.js" />
$(function () {
@@ -10,13 +10,13 @@ $(function () {
function updateCursor(id, x, y) {
var e = document.getElementById(id);
if (!e) {
- e = $('<div id="' + id + '" class="icon icon-wand">' + id + '</div>').appendTo(document.body);
+ e = $('<div id="' + id + '"><i class="icon-screenshot"></i>' + id + '</div>').appendTo(document.body);
e.css('position', 'absolute');
}
else {
e = $(e);
}
- e.css({ left: x, top: y });
+ e.css({ left: x + 15, top: y + 15 });
}
hubConnection.logging = true;
View
17 samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/MouseTracking/index.htm
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title></title>
- <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
- <link href="MouseTracking.css" rel="stylesheet" type="text/css" />
- <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="../../signalr/hubs" type="text/javascript"></script>-->
- <script src="MouseTracking.js" type="text/javascript"></script>
-</head>
-<body>
-
-</body>
-</html>
View
9 ...s/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples.csproj
@@ -141,9 +141,9 @@
<Content Include="Hubs\Chat\Chat.js" />
<Content Include="Hubs\Chat\index.htm" />
<Content Include="Hubs\DrawingPad\index.htm" />
+ <Content Include="Hubs\MouseTracking\Default.aspx" />
<Content Include="Hubs\MouseTracking\images\wand.png" />
<Content Include="Hubs\MouseTracking\MouseTracking.css" />
- <Content Include="Hubs\MouseTracking\index.htm" />
<Content Include="Hubs\MouseTracking\MouseTracking.js" />
<Content Include="Hubs\RealtimeBroadcast\index.html" />
<Content Include="Hubs\RealtimeBroadcast\Realtime.css" />
@@ -248,6 +248,13 @@
<Compile Include="Hubs\Chat\ContentProviders\ImageContentProvider.cs" />
<Compile Include="Hubs\Chat\ContentProviders\YouTubeContentProvider.cs" />
<Compile Include="Hubs\DrawingPad\DrawingPad.cs" />
+ <Compile Include="Hubs\MouseTracking\Default.aspx.cs">
+ <DependentUpon>Default.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="Hubs\MouseTracking\Default.aspx.designer.cs">
+ <DependentUpon>Default.aspx</DependentUpon>
+ </Compile>
<Compile Include="Hubs\MouseTracking\MouseTracking.cs" />
<Compile Include="Hubs\RealtimeBroadcast\HighFrequencyTimer.cs" />
<Compile Include="Hubs\RealtimeBroadcast\Realtime.cs" />
Please sign in to comment.
Something went wrong with that request. Please try again.