Click here to Skip to main content
15,884,388 members
Articles / Web Development / HTML

C# and AJAX WhiteBoard

Rate me:
Please Sign up or sign in to vote.
4.71/5 (14 votes)
26 Oct 2009CPOL7 min read 99.4K   2.9K   95  
This is a web-based WhiteBoard. It uses C# and AJAX to communicate between the server and clients. Data sharing between different users is made possible using AJAX. Drawings can be shared in real time over multiple clients.
using System;

namespace board
{
	/// <summary>
	/// Summary description for Constants.
	/// </summary>
	public class Constants
	{
		public Constants()
		{
			
		}

		//Variables in the application object
		public const string CONST_APP_DATA_ARRAY_NAME = "ArrayData";

		//THE UNIVERSAL IN BETWEEN LINES SEPERATOR
		public const string CONST_INTERNAL_SEPERATOR = "$";

		//THE UNIVERSAL LINE SEPERATOR
		public const string CONST_LINE_SEPERATOR = "#";

		//THE UNIVERSAL CONSTANT TO IDENTIFY ERROR
		public const string CONST_ERROR = "ERROR";

		//COLOR CONSTANTS
		public const string CONST_COLOR_RED = "red";

		public const string CONST_COLOR_BLUE = "blue";

		public const string CONST_COLOR_BLACK = "black";

		public const string CONST_COLOR_GREEN = "green";

		public const string CONST_COLOR_BROWN = "brown";

		//TOOL CONSTANTS
		public const string CONST_ACTION_TOOL_LINE = "LINE";

		public const string CONST_ACTION_TOOL_RECT = "RECT";

		public const string CONST_ACTION_TOOL_ELLIPSE = "ELLIPSE";
		
		public const string CONST_ACTION_COLOR = "COLOR";

		public const string CONST_ACTION_STROKE = "STROKE";

        //Addition: 21/09/2009

        public const string  CONST_ACTION_TEXT = "TEXT";

        //Addition: 21/09/2009 - Ends here

		public const string CONST_ACTION_TOOL_CLEAR = "CLEAR";

		//Query String constants

		public const string CONST_QUERY_VALUE = "Value";

		public const string CONST_QUERY_PARAM = "Param";

		public const string CONST_QUERY_ACTION = "Action";

		public const string CONST_QUERY_READ_FROM = "ReadFrom";

		public const string CONST_QUERY_COLOR = "Color";

		public const string CONST_QUERY_STROKE = "Stroke";

		public const string CONST_QUERY_STARTX = "StartX";

		public const string CONST_QUERY_STARTY = "StartY";

		public const string CONST_QUERY_ENDX = "EndX";

		public const string CONST_QUERY_ENDY = "EndY";

        //Addition: 10/10/2009
        public const string CONST_QUERY_SEND_TEXT = "SendText";

        //Addition: 10/10/2009 - Ends here

		//Identifies that the call is to send the data to the server
		public const string CONST_QUERY_PARAM_SETDATA = "SetData";

		//Identifies that the call is to get the data from server
		public const string CONST_QUERY_PARAM_GETDATA = "GetData";

		//ERROR MESSAGES
		public const string CONST_ERROR_SETDATA = "Error setting data !";

		public const string CONST_ERROR_PARAM = "Incorrect parameters !";

		public const string CONST_ERROR_UNKNOWN = "UNKNOWN ERROR !";

		public const string CONST_ERROR_ALREADY_UPDATED = "Your Screen is already updated !";

	} //End of class

} //End of Namespace

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Japan Japan
My computer career started as an Avid Gamer Smile | :) . I loved the old times Xatax and Wolf. But, curiosity took over my gaming side and I started to search on ways to create all the mesmerising programs that I used.
I started programming in Qbasic and then moved on to every possible programming language I could lay my hands on. Qbasic, Pascal, C, C++, Win32 SDK, VB 6.0, VB.NET, C#, Struts, Core Java, Javascript, VbScript, Unix Shell Programming, SQL SERVER PROGRAMMING, WMI scripting....are some of the languages I can boast of being proficient in.
My formal introduction to computers was when I took the Bachelor of Computer Sciences (Pune, India) degree.Later on I got Masters from the same university.
My Professional Certifications include
MCP SQL Server 2000 (70-229)
Brainbench Certified MS SQL Server Programmer
Brainbench Certified MS SQL Server Administrator
Brainbench Certified ASP.NET Programmer
Brainbench Certified Javascript Programmer
Brainbench Certified RDBMS Concepts

Comments and Discussions