Skip to content

Commit 7000f09

Browse files
committed
First Commit
0 parents  commit 7000f09

25 files changed

+986
-0
lines changed

jQueryNotification.gpState

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<GuidancePackagesState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/pag/gax-gpstate">
3+
<Packages />
4+
</GuidancePackagesState>

jQueryNotification.sln

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jQueryNotification", "jQueryNotification\jQueryNotification.csproj", "{A21FCA4B-74EE-468C-8EAB-880141CEB3CC}"
5+
EndProject
6+
Global
7+
GlobalSection(TeamFoundationVersionControl) = preSolution
8+
SccNumberOfProjects = 2
9+
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
10+
SccTeamFoundationServer = http://emadmokhtar-ws:8080/tfs/defaultcollection
11+
SccLocalPath0 = .
12+
SccProjectUniqueName1 = jQueryNotification\\jQueryNotification.csproj
13+
SccProjectName1 = jQueryNotification
14+
SccLocalPath1 = jQueryNotification
15+
EndGlobalSection
16+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
17+
Debug|Any CPU = Debug|Any CPU
18+
Release|Any CPU = Release|Any CPU
19+
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{A21FCA4B-74EE-468C-8EAB-880141CEB3CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{A21FCA4B-74EE-468C-8EAB-880141CEB3CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{A21FCA4B-74EE-468C-8EAB-880141CEB3CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{A21FCA4B-74EE-468C-8EAB-880141CEB3CC}.Release|Any CPU.Build.0 = Release|Any CPU
25+
EndGlobalSection
26+
GlobalSection(SolutionProperties) = preSolution
27+
HideSolutionNode = FALSE
28+
EndGlobalSection
29+
EndGlobal

jQueryNotification.sln.docstates.suo

4.01 KB
Binary file not shown.

jQueryNotification.suo

29.5 KB
Binary file not shown.

jQueryNotification.vssscc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
""
2+
{
3+
"FILE_VERSION" = "9237"
4+
"ENLISTMENT_CHOICE" = "NEVER"
5+
"PROJECT_FILE_RELATIVE_PATH" = ""
6+
"NUMBER_OF_EXCLUDED_FILES" = "0"
7+
"ORIGINAL_PROJECT_FILE_PATH" = ""
8+
"NUMBER_OF_NESTED_PROJECTS" = "0"
9+
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
10+
}

jQueryNotification/Default.aspx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="jQueryNotification.Default" %>
2+
3+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+
5+
<html xmlns="http://www.w3.org/1999/xhtml">
6+
<head runat="server">
7+
<title>jQuery notification</title>
8+
<link href="Styles/jquery.jnotify.css" rel="stylesheet" type="text/css" />
9+
<script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
10+
<script src="Scripts/jquery.jnotify.js" type="text/javascript"></script>
11+
</head>
12+
13+
<body>
14+
<form id="form" runat="server">
15+
<div>
16+
17+
<asp:Button ID="btnSuccess" runat="server" Text="Successful Notification"
18+
onclick="btnSuccess_Click" />
19+
<asp:Button ID="btnWraning" runat="server" Text="Warning Notification"
20+
onclick="btnWraning_Click" />
21+
<asp:Button ID="btnError" runat="server" Text="Error Notification"
22+
onclick="btnError_Click" />
23+
24+
</div>
25+
<div>
26+
27+
<asp:Button ID="btnDelayedSuccess" runat="server"
28+
Text="Delayed Successful Notification" onclick="btnDelayedSuccess_Click" />
29+
<asp:Button ID="btnDelayedWarning" runat="server"
30+
Text="Delayed Warning Notification" onclick="btnDelayedWarning_Click" />
31+
<asp:Button ID="btnDelayedError" runat="server"
32+
Text="Delayed Error Notification" onclick="btnDelayedError_Click" />
33+
34+
</div>
35+
</form>
36+
</body>
37+
</html>

jQueryNotification/Default.aspx.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using jQueryNotification.Helper;
3+
4+
namespace jQueryNotification
5+
{
6+
public partial class Default : System.Web.UI.Page
7+
{
8+
protected void Page_Load(object sender, EventArgs e)
9+
{
10+
11+
}
12+
13+
protected void btnSuccess_Click(object sender, EventArgs e)
14+
{
15+
this.ShowSuccessfulNotification("Success Notification");
16+
}
17+
18+
protected void btnWraning_Click(object sender, EventArgs e)
19+
{
20+
this.ShowWarningNotification("Warning Notification");
21+
}
22+
23+
protected void btnError_Click(object sender, EventArgs e)
24+
{
25+
this.ShowErrorNotification("Error Notification");
26+
}
27+
28+
protected void btnDelayedSuccess_Click(object sender, EventArgs e)
29+
{
30+
this.ShowSuccessfulNotification("Success Notification",5000);
31+
}
32+
33+
protected void btnDelayedWarning_Click(object sender, EventArgs e)
34+
{
35+
this.ShowWarningNotification("Warning Notification",5000);
36+
}
37+
38+
protected void btnDelayedError_Click(object sender, EventArgs e)
39+
{
40+
this.ShowErrorNotification("Error Notification", 5000);
41+
}
42+
}
43+
}

jQueryNotification/Default.aspx.designer.cs

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
using System.Web.UI;
2+
3+
namespace jQueryNotification.Helper
4+
{
5+
public static class NotificationHelper
6+
{
7+
/// <summary>
8+
/// Shows the successful notification.
9+
/// </summary>
10+
/// <param name="page">The page.</param>
11+
/// <param name="message">The message.</param>
12+
public static void ShowSuccessfulNotification(this Page page, string message)
13+
{
14+
page.ClientScript.RegisterStartupScript(page.GetType(), "notificationScript",
15+
"<script type='text/javascript'> $(document).ready(function () { $.jnotify('" +
16+
message + "'); });</script>");
17+
}
18+
19+
20+
/// <summary>
21+
/// Shows the warning notification.
22+
/// </summary>
23+
/// <param name="page">The page.</param>
24+
/// <param name="message">The message.</param>
25+
public static void ShowWarningNotification(this Page page, string message)
26+
{
27+
page.ClientScript.RegisterStartupScript(page.GetType(), "notificationScript",
28+
"<script type='text/javascript'> $(document).ready(function () { $.jnotify('" +
29+
message + "', 'warning'); });</script>");
30+
}
31+
32+
/// <summary>
33+
/// Shows the error notification.
34+
/// </summary>
35+
/// <param name="page">The page.</param>
36+
/// <param name="message">The message.</param>
37+
public static void ShowErrorNotification(this Page page, string message)
38+
{
39+
page.ClientScript.RegisterStartupScript(page.GetType(), "notificationScript",
40+
"<script type='text/javascript'> $(document).ready(function () { $.jnotify('" +
41+
message + "', 'error'); });</script>");
42+
}
43+
44+
/// <summary>
45+
/// Shows the successful notification.
46+
/// </summary>
47+
/// <param name="page">The page.</param>
48+
/// <param name="message">The message.</param>
49+
/// <param name="delayTimeSpan">The delay time span in millisecond.</param>
50+
public static void ShowSuccessfulNotification(this Page page, string message, int delayTimeSpan)
51+
{
52+
page.ClientScript.RegisterStartupScript(page.GetType(), "notificationScript",
53+
"<script type='text/javascript'> $(document).ready(function () { $.jnotify('" +
54+
message + "', " + delayTimeSpan + " ); });</script>");
55+
}
56+
57+
/// <summary>
58+
/// Shows the warning notification.
59+
/// </summary>
60+
/// <param name="page">The page.</param>
61+
/// <param name="message">The message.</param>
62+
/// <param name="delayTimeSpan">The delay time span in millisecond.</param>
63+
public static void ShowWarningNotification(this Page page, string message, int delayTimeSpan)
64+
{
65+
page.ClientScript.RegisterStartupScript(page.GetType(), "notificationScript",
66+
"<script type='text/javascript'> $(document).ready(function () { $.jnotify('" +
67+
message + "', 'warning', " + delayTimeSpan + " ); });</script>");
68+
}
69+
70+
/// <summary>
71+
/// Shows the error notification.
72+
/// </summary>
73+
/// <param name="page">The page.</param>
74+
/// <param name="message">The message.</param>
75+
/// <param name="delayTimeSpan">The delay time span in millisecond.</param>
76+
public static void ShowErrorNotification(this Page page, string message, int delayTimeSpan)
77+
{
78+
page.ClientScript.RegisterStartupScript(page.GetType(), "notificationScript",
79+
"<script type='text/javascript'> $(document).ready(function () { $.jnotify('" +
80+
message + "', 'error', " + delayTimeSpan + " ); });</script>");
81+
}
82+
}
83+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("jQueryNotification")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("jQueryNotification")]
13+
[assembly: AssemblyCopyright("Copyright © 2012")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("35b6f9a0-e598-4bf2-af8e-d908e3296325")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)