diff --git a/GMW-RT/GMW-RT.csproj b/GMW-RT/GMW-RT.csproj index be7761ff..4b656d7b 100644 --- a/GMW-RT/GMW-RT.csproj +++ b/GMW-RT/GMW-RT.csproj @@ -85,12 +85,20 @@ + + + TestSend.aspx + ASPXCodeBehind + + + TestSend.aspx + diff --git a/GMW-RT/TestSend.aspx b/GMW-RT/TestSend.aspx new file mode 100644 index 00000000..d83d368a --- /dev/null +++ b/GMW-RT/TestSend.aspx @@ -0,0 +1,18 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestSend.aspx.cs" Inherits="GMW_RT.TestSend" %> + + + + + + + + +
+
+ + + +
+
+ + diff --git a/GMW-RT/TestSend.aspx.cs b/GMW-RT/TestSend.aspx.cs new file mode 100644 index 00000000..dc554903 --- /dev/null +++ b/GMW-RT/TestSend.aspx.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNet.SignalR; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GMW_RT +{ + public partial class TestSend : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void btnSendAll_Click(object sender, EventArgs e) + { + // mando segnale a tutti i clients... +#if false + var context = GlobalHost.ConnectionManager.GetHubContext(); + context.Clients.All.Send("Admin", "stop the chat"); +#endif + var hubContext = GlobalHost.ConnectionManager.GetHubContext(); + hubContext.Clients.All.Send("Admin", "stop the chat"); + + txtMessage.Text = ""; + txtMessage.Focus(); + lblMess.Text = "Messaggio inviato!"; + } + } +} \ No newline at end of file diff --git a/GMW-RT/TestSend.aspx.designer.cs b/GMW-RT/TestSend.aspx.designer.cs new file mode 100644 index 00000000..61504feb --- /dev/null +++ b/GMW-RT/TestSend.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GMW_RT { + + + public partial class TestSend { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// txtMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMessage; + + /// + /// btnSendAll control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSendAll; + + /// + /// lblMess control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMess; + } +} diff --git a/GMW-RT/bin/GMW-RT.dll b/GMW-RT/bin/GMW-RT.dll index ac550edd..dd530306 100644 Binary files a/GMW-RT/bin/GMW-RT.dll and b/GMW-RT/bin/GMW-RT.dll differ