Report
Report
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE ENGINEERING
Submitted by :-
Charu : 114/CS/05 (CS3)
Gurpreet : 120/CS/05 (CS3)
Sheetal : 149/CS/05 (CS3)
Preservation, inspiration and motivation have always played a key role in the success of
any venture. In the present world of cut throat competition project is likely a bridge
between theoretical and practical working, willingly we have prepared this particular
project.
First of all we would like to thank the supreme power, the almighty God who is obviously
the one who has always directed us to work on the right path of our life. With his grace
Any accomplishment requires the effort of many people and this work is not different.
Engineering for her valuable guidance, full cooperation and expert advice to complete
our project. Then, we would like to extend our sincere thanks to Mr. Pankaj Gupta,
Assistant Professor & Head of Department, Computer Science Engineering for his
We sincerely thank to all the faculty members and the staff associated for their support
given to us time to time. Also, we would like to thank to all our friends and family
It is to certify that the project HTML DEBUGGER has been carried out by the student of
8th semester Charu with the help of other team members Gurpreet and Sheetal under the
guidance of Computer Department. The report covers all the aspects of the work done
The project is complete in all respects. It shall be possible for the next batch of the
(Signature)/Date
(Ms. Kiran)
(Computer Department)
CERTIFICATE
It is to certify that the project HTML DEBUGGER has been carried out by the student of
8th semester Charu with the help of other team members Gurpreet and Sheetal under the
guidance of Computer Department. The report covers all the aspects of the work done
The project is complete in all respects. It shall be possible for the next batch of the
(Signature)/Date
(Mr. Pankaj Gupta)
(Head of Computer
Department)
TABLE OF CONTENTS
Page No.
1. ABSTRACT 1–2
3. NEED ANALYSIS 6 – 10
5. DETAILS
A) SOFTWARE USED 19 – 24
C) MODULES/ INTERFACES 28 – 35
D) CODING 36 – 88
E) ACCEPTANCE TESTING 89 – 95
F) OUTPUTS 96 – 112
6. LIMITATIONS 113
9. CONCLUSIONS 116
A) EDITING
B) COMPILING/ DEBUGGING
C) EXECUTING
A) EDITING:-
Editing is the process of preparing language, images, sound,
video, or film through correction, condensation, organization, and
other modifications in various media. A person who edits is
called an editor. In a sense, the editing process originates with
the idea for the work itself and continues in the relationship
between the author and the editor. Editing is, therefore, also a
practice that includes creative skills, human relations, and a precise
set of method. There are various levels of editorial positions in
publishing.
B) COMPILING:-
C) EXECUTING:-
Execution in computer and software engineering is the process by
which a computer or a virtual machine carries out the instructions
of a computer program. The instructions in the program trigger
sequences of simple actions on the executing machine. Those
actions produce effects according to the semantics of the
instructions in the program. The term run is used almost
synonymously. The context in which execution takes place is crucial.
Very few programs are executed on a bare machine. Programs usually
contain implicit and explicit assumptions about resources available
at the time of execution. Most programs are executed with the
support of an operating system and run-time libraries specific to the
source language that provide crucial services not supplied directly
by the computer itself . This supportive environment, for instance,
usually decouples a program from direct manipulation of the
computer peripherals, providing more general, abstract services instead.
CHAPTER 2 : INTRODUCTION
When the program crashes, the debugger shows the position in the
original code if it is a source-level debugger or symbolic debugger,
commonly seen in integrates development environments. If it is a low-
level debugger or a machine-language debugger it shows the line in
the disassembly. (A "crash" happens when the program cannot continue
because of a programming bug. For example, perhaps the program tried
to use an instruction not available on the current version of the CPU or
attempted access to unavailable or protected memory.)
features.
Web masters and developers gather around for the greatest collection of Free
java scripts, PHP scripts, CGI scripts, and VB script - all in one location.
EDITPLUS
EditPlus is a text editor, HTML editor and programmer’s editor for
Windows. While it can serve as a good Notepad replacement, it also
offers many powerful features for Web page authors and programmers.
EditPlus is a 32-bit text editor for the Microsoft Windows operating
system, developed by Sangil Kim of ES-Computing. The editor
contains tools for programmers, including syntax highlighting (and
support for custom syntax files), file type conversions, line ending
conversion (between Linux, Windows and Mac styles), regular
expressions for search-and-replace, keystroke recording, full support
for Unicode editing, customizable keyboard shortcuts, auto-completion,
code folding, and more. Files can be browsed and edited in tabs, and an
internal file browser is implemented in the software.
The FRONTPAGE Editor
The FrontPage Editor generates all the popular HTML tags, including
extensions such as cascading style sheets, frames, and ActiveX Controls
If you want to edit the HTML code directly, you can use the FrontPage
Editor’s HTML view. In this view, you can enter text, edit HTML tags,
and use standard word-processing commands such as cutting, pasting,
and find and replace. Although it is a powerful tool, the FrontPage
Editor is easy to use because of its familiar, word-processor interface.
• You can create new HTML pages based on page wizards and templates.
The FrontPage Editor offers many choices of page formats, and you can
create your own templates.
• You can apply one of the many FrontPage themes, created by
professional designers, to give your pages a dynamic, colorful
appearance. You can also add and design borders for your pages and
insert navigation bars, which guide your users around your Web site.
• You can open any HTML file in the FrontPage Editor and all the HTML
tags on the page are preserved. You can also open files of many popular
types, and the FrontPage Editor converts them to HTML. Some of the
file types you can open are Microsoft Word 2.0 and 6.0, Microsoft
Word 6.0 for MS-DOS, Microsoft Word 95 and 97, Microsoft Excel 4.0
and 5.0, Microsoft Excel 95 and 97 WordPerfect 6.x.
• You can insert text in all HTML styles, create multilevel lists, change
text size and color, and apply formatting such as centring a heading or
making text italic. Using cascading style sheet support, you can control
margins, line spacing, colors, fonts faces and sizes.
• You can create forms containing text fields, check boxes, radio buttons,
drop-down lists, and push buttons. When you create a form, the default
FrontPage form handler automatically saves form information to a file
or sends it to an e-mail address. You can select from a set of FrontPage
form handlers or add you own custom form handler to a form.
• Using the FrontPage table-editing commands, you can create a table,
insert rows and columns, align them, and create background colors,
using a point-and-click interface.
• You can create new frames pages, edit the appearance of your frames,
and assign initial pages to each frame, all using a point-and click
interface. FrontPage displays your frames pages in WYSIWYG style
and generates the HTML.
EXCEL SHEET OF HTML TAGS
NAME OF ATTRIBUTES
TAG TYPE 1 2 3 4 5 6 7 8
Html close
Head close
Title close
Left Right
Body close Bgcolor text Background link vlink alink Margin Margin
Font close Size Face color
Basefont close Size Face color
B close
I close
U close
P close align
HR close align width size shade
Br open
LI open
OL close start type
UL close type
DL close
DT open
DD open
center close
Cell Cell
Table close align Bgcolor Border Height width padding spacing
TR close align valign Bgcolor
TH close align valign Bgcolor
TD close
A close href name title Alt
img open src align border height width alt
H1 close
H2 close
H3 close
H4 close
H5 close
H6 close
EM close
HR open align noshade size width
comment open
small close
big close
STRIKE close
TT close
SB close
ST close
Address close
Strong close
Menu close
DIR close
Caption close
Base open HREF
Link open HREF REL REV
Pre close
Cite close
CHAPTER 4: OBJECTIVES
There are three main objectives:-
EDITING:-
1. NEW
2. OPEN
3. SAVE
4. SAVE AS
5. FILE
NEW
OPEN
SAVE
Saves the active document with its current file name, location and
format. Save allows you to update changes you are making to the
document and stores it on the hard drive so that you won’t lose
your work that has been completed if there is a power
interruption or other system malfunction – computers can
malfunction, and usually do so at the most inconvenient times.
SAVE AS
FILE
The File Menu contains the functions that are most commonly
used to open, save, rename, print, and close files. (Although there
is no separate "rename" function available, you can rename a file
by choosing the Save As… menu item and giving the
COMPILING:-
and operating system that the compiler itself runs on. The output
of a cross compiler is designed to run on a different platform.
Cross compilers are often used when developing software for
embedded systems that are not intended to support a software
development environment. The output of a compiler that produces
code for (VM) may or may not be executed on the same
platform as the compiler that produced it. For this reason such
compilers are not usually classified as native or cross compilers.
1. TAG CHECK :-
In this we will check the order of tags i.e. first HTML will come then
HEAD then TITLE then BODY and so on.
In this we will check whether we have used empty and container tags in
<BODY>.
In this we have check that frameset and body can’t come together.
EXECUTING:-
Execution in computer and software engineering is the process by
which a computer or a virtual machine carries out the instructions
of a computer program. The instructions in the program trigger
sequences of simple actions on the executing machine. Those
actions produce effects according to the semantics of the
instructions in the program. The term run is used almost
synonymously. The context in which execution takes place is
crucial. Very few programs are executed on a bare machine.
Programs usually contain implicit and explicit assumptions about
resources available at the time of execution. Most programs are
executed with the support of an operating system and run-time
libraries specific to the source language that provide crucial
services not supplied directly by the computer itself . This
supportive environment, for instance, usually decouples a program
from direct manipulation of the computer peripherals, providing
more general, abstract services instead.
a) INTERNAL
b) EXTERNAL
INTERNAL BROWSER:-
EXTERNAL BROWSER:-
CHAPTER 5 : DETAILS
CHAPTER 5.A : SOFTWARE USED
.NET
The Microsoft .NET Framework is a software framework
available with several Microsoft Windows operating systems. It
includes a large library of coded solutions to prevent common
programming problems and a virtual machine that manages the
execution of programs written specifically for the frame work. The
.NET Framework is akey Microsoft offering and is intended to be
used by most new applications created for the Windows platform.
The framework's Base Class Library provides a large range of
features including user interface, data and data access, data base
connectivity, cryptography, web application development, numeric
algorithms, and network communications. The class library is used
by programmers, who combine it with their own code to produce
applications. Programs written for the .NET Framework execute in
a software environment that manages the program's runtime
requirements. Also part of the .NET Framework, this runtime
environment is known as the Common Language Runtime. The
CLR provides the appearance of an application virtual machine so
that programmers need not consider the capabilities of the specific
CPU that will execute the program. The CLR also provides other
important services such as security, memory management, and
exception handling. The class library and the CLR together
constitute the .NET Framework. Version 3.0 of the .NET
Framework is included with Windows Server 2008 and Windows
Vista. The current version of the framework can also be installed
on Windows and the Windows Server 2003 family of operating
systems. A reduced "Compact" version of the .NET Framework is
also available on Windows Mobile platforms, including smart
phones.
FEATURES OF .NET :-
1. Interoperability:-
Because interaction between new and older applications is commonly
required, the .NET Framework provides means to access functionality
that is implemented in programs that execute outside the .NET
environment. Access to COM components is provided in the
System.Runtime.InteropServices and System.EnterpriseServices
namespaces of the framework; access to other functionality is provided
using the P/Invoke feature.
3. Language Independence :-
The .NET Framework introduces a Common Type System, or CTS. The
CTS specification defines all possible data types and programming
constructs supported by the CLR and how they may or may not interact
with each other. Because of this feature, the .NET Framework supports
the exchange of instances of types between programs written in any of
the .NET languages. This is discussed in more detail in Microsoft .NET
Technology.
5. Simplified Deployment :-
The .NET framework includes design features and tools that help
manage the installation of computer software to ensure that it does not
interfere with previously installed software, and that it conforms to
security requirements.
6. Security:-
The design is meant to address some of the vulnerabilities, such as
buffer overflows, that have been exploited by malicious software.
Additionally, .NET provides a common security model for all
applications.
7. Portability:-
The design of the .NET Framework allows it to theoretically be
platform agnostic, and Thus cross-platform compatible. That is, a
program written to use the framework should run without change on
any type of system for which the framework is implemented.
Microsoft's commercial implementations of the framework cover
Windows, Windows CE, and the Xbox 360. In addition, Microsoft
submits the specifications for the Common Language Infrastructure
(which includes the core class libraries, Common Type and the
Common Intermediate Language), the C# language, and the C++/CLI
to both ECMA and the ISO, making them available as open standards.
This makes it possible for third parties to create compatible
implementations of the framework and its languages on other platforms.
Version 2.0 without any Service Pack is the last version with support
for Windows 98 and Windows Me. Version 2.0 with Service Pack 1 is
the last version with official support for Windows 2000 although there
have been some unofficial workarounds published online to use a
subset of the functionality from Version 3.5 in Windows 2000.[17]
Version 2.0 with Service Pack 2 requires Windows XP or Windows
Server 2003. It shipped with Windows Server 2003 R2 (not installed by
default).
C#.NET
1. System:-
A string is a sequential collection of Unicode characters that is used
.NET Development.NET Framework 3.5.NET Framework Class
Library System Namespace. It is also provide OutOfMemoryException,
FormatException, BadImageFormatException in .NET Framework
3.5.NET Framework Class Library System Namespace
OutOfMemoryException.
2. System.Collections:-
3. System.Data:-
This represents the view of data whose property value type is system
.string in .NET Framework 3.5.NET Framework Class Library
System.Collections Namespace.
4. System.Drawing:-
5. System.Text:-
It is StringBuilderClass which represents a string-like object whose
value is a mutable in .NET Framework 3.5.NET Framework Class
Library System.Text Namespace StringBuilder Class.
6. System.Window.FORM:-
1) EDITING :-
2) COMPILING/ DEBUGGING :-
3) EXECUTING :-
1) TAG CHECK :-
In this module, we have checked whether the tag is in between
the open angular brackets and close angular brackets. And also in
this we will check the double entry of tags i.e. basic tags like
<HTML>, <HEAD>, <BODY>, <TITLE> should come once.
In the same way, error for more than one close angular bracket
is detected. In this we will see that if the close angular bracket
has come then decrement the status by one. If the status value is
less than one on reading the whole tag then there is an error
because there is more than one close angular bracket. The error
will be shown in RED color and its description will be given in
the ERROR LIST. On clicking that description, cursor will be
placed in the line which has error. In the end status will again be
incremented by one so that we can check all tags.
Now if we have found the off state of the container tag then we
will check it with the top of the stack. If they are matched then
we will decrement the top of the stack. But if they are not
matched then there is an error of wrong order of the tags in our
text.
Then we will break the loop and check that just the next tag of
it is </HTML> i.e. off sate of HTML tag. If it is so then there
will be no error in the text written by the user otherwise there
will be an error.
4) POSITION CHECK :-
In this module we have checked that first and last tags in the
text must be the on and off states of HTML. This means that
first tag in the user text must be <HTML> and last tag in the
user text must be </HTML>.
APPROACH USED
The above example contains all the elements of the algorithm. For the
moment, we assume the existence of a "partial match" table T,
described below which indicates where we need to look for the start of
a new match in the event that the current one ends in a mismatch. The
entries of T are constructed so that if we have a match starting at S[m]
that fails when comparing S[m + i] to W[i], then the next possible
match will start at index m + i - T[i] in S (that is, T[i] is the amount of
"backtracking" we need to do after a mismatch).
This has two implications: first, T[0] = -1, which indicates that if W[0]
is a mismatch, we cannot backtrack and must simply check the next
character; and second, although the next possible match will begin at
index m + i - T[i], as in the example above, we need not actually check
any of the T[i] characters after that, so that we continue searching from
W[T[i]].
input:
an array of characters, S (the text to be searched)
an array of characters, W (the word sought)
output:
an integer (the zero-based position in S at which W is found)
define variables:
an integer, m ← 0 (the beginning of the current match in S)
an integer, i ← 0 (the position of the current character in W)
an array of integers, T (the table, computed elsewhere)
SCHEDULE CHART
MODULE NAME START DATE COMPLETION BY
DATE
namespace HTML_DEBUGGER
{
public partial class Form1 : Form
{
String filename = "";
int compilestatus = 0;
string[] opentags ={ "<BR>", "<LI>", "<DD>", "<IMG>",
"<DT>","<!-->" ,"<HR>","<BASE>","<INPUT>","<FRAME>"};
string[] closetags ={ "<HTML>", "<BODY>", "<TITLE>",
"<P>", "<FONT>", "<HEAD>", "<BASEFONT>", "<B>", "<I>",
"<U>", "<OL>", "<UL>", "<DL>", "<CENTER>", "<TABLE>",
"<TR>", "<TH>", "<TD>", "<A>", "<H1>", "<H2>", "<H3>", "<H4>",
"<H5>", "<H6>", "</HTML>", "</BODY>", "</TITLE>", "</P>",
"</FONT>", "</HEAD>", "</BASEFONT>", "</B>", "</I>", "</U>",
"</OL>", "</UL>", "</DL>", "</CENTER>", "</TABLE>", "</TR>",
"</TH>", "</TD>", "</A>", "</H1>", "</H2>", "</H3>", "</H4>",
"</H5>", "</H6>"
,"<FRAMESET>","</FRAMESET>","<FORM>","</FORM>","<IMG
>","</IMG>","<STRIKE>","</STRIKE>","<TT>","</TT>","<EM>","
</EM>","<STRONG>","</STRONG>","<META>","</META>","<ST
RIKE>","</STRIKE>"};
string[] singletags ={ "<HTML>", "<HEAD>", "<TITLE>",
"<BODY>", "</HTML>", "</HEAD>", "</TITLE>", "</BODY>"};
string[,] attrib = new string[20,10];
if (status > 1)
{
richTextBox1.SelectionStart = i;
richTextBox1.SelectionLength = 1;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
i).ToString() + " Error for more than one < or tag is not in between
angular brackets") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
i).ToString() + " Error for more than one < or tag is not in between
angular brackets");
status--;
compilestatus = 1;
}
}
if (str == ">")
{
status--;
if (status < 0)
{
richTextBox1.SelectionStart = i;
richTextBox1.SelectionLength = 1;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
i).ToString() + " Error for more than one > or tag is not in between
angular brackets ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
i).ToString() + " Error for more than one > or tag is not in between
angular brackets ");
compilestatus = 1;
status++;
}
}
return true;
}
int closetagindex(string Tag)
{
for (int i = 0; i < closetags.Length; i++)
{
if (closetags[i] == Tag)
return i;
}
return -1;
}
int opentagindex(string Tag)
{
for (int i = 0; i < opentags.Length; i++)
{
if (opentags[i] == Tag)
return i;
}
return -1;
}
public bool tagcheck(string Text)
{
if (j == Text.Length)
break;
}
str1 += ">";
if (closetagindex(str1) == -1 && opentagindex(str1) == -1)
{
richTextBox1.SelectionStart = j - str1.Length + 1;
richTextBox1.SelectionLength = str1.Length;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text, j -
str1.Length + 2).ToString() + " Error-- this tag doesn't exist ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text, j-
str1.Length + 2).ToString() + " Error-- this tag doesn't exist ");
compilestatus = 1;
}
}
}
return true;
}
void tagordercheck(string Text)
{
string str = "";
int status = 0;
if (j == Text.Length)
break;
}
str1 += ">";
string tag1;
if (closetagindex(str1) != -1)
if ((str1.IndexOf("/") == -1))
{
top++;
tagstack[top] = str1;
}
else
{
tag1 = str1.ToString().Replace("/", "");
if (top>=0&&tag1 == tagstack[top])
{
top--;
}
else
{
richTextBox1.SelectionStart = i;
richTextBox1.SelectionLength = tag1.Length + 1;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, i).ToString() + "
Error-- Tag order is Wrong") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
i).ToString() + " Error-- Tag order is Wrong");
compilestatus = 1;
}
}
}
}
}
return i;
}
return -1;
}
void singleentrytags(string Text)
{
int[,] countsingletag = new int[singletags.Length, 2];
string str1 = "";
for (int i = 0; i < Text.Length; i++)
{
if (Text.Substring(i, 1) == "<")
{
str1 = "";
int j = i;
if (j == Text.Length)
break;
}
str1 += ">";
if (checksingletags(str1) != -1)
{
countsingletag[checksingletags(str1), 0]++;
countsingletag[checksingletags(str1), 1] = i;
}
}
}
}
}
}
int strstatuss = 0;
if (j == Text.Length)
break;
}
str1 += ">";
}
if (str1 == "<HTML>")
strstatuss = 99;
if (strstatuss != 99)
{
if (str1 != "<HTML>"&&str1!="<!-->")
{
richTextBox1.SelectionStart = i;
richTextBox1.SelectionLength = str1.Length;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
i).ToString() + " Error--<HTML> must be the first tag") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
i).ToString() + " Error--<HTML> must be the first tag");
compilestatus = 1;
}
}
}
if (str1 !="</HTML>"&& str1!="<!-->")
{
richTextBox1.SelectionStart = richTextBox1.Text.Length -
str1.Length;
richTextBox1.SelectionLength = str1.Length - 1;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
richTextBox1.Text.Length - str1.Length).ToString() + " Error--
</HTML> must be the last tag") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
richTextBox1.Text.Length - str1.Length).ToString() + " Error--
</HTML> must be the last tag");
compilestatus = 1;
}
int strstatus = 0;
int i, j, Stat;
if (j == Text.Length)
break;
}
if(str1=="<!--")
{
Stat=0;
for(j=i;j<(Text.Length)-3;j++)
{
if(Text.Substring(j,3)=="-->")
{
Stat=1;
break;
}
}
if(Stat==0)
{
richTextBox1.SelectionStart = i;
richTextBox1.SelectionLength = str1.Length;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
i).ToString() + " Error of comment tag") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
i).ToString() + " Error of comment tag");
compilestatus = 1;
}
i = j + 1;
}
}
}
}
void frameset(string Text)
{
int i = 0;
int j = 0;
if (Text.IndexOf("<FRAMESET>") != -1)
{
i = Text.IndexOf("<FRAMESET>");
if (Text.IndexOf("<BODY>") != -1)
{
richTextBox1.SelectionStart = i;
richTextBox1.SelectionLength="<FRAMESET>".Length;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
i).ToString() + " Error-- BODY and FRAMESET can't come together")
== -1)
errorlist.Items.Add(lineno(richTextBox1.Text, i).ToString()
+ " Error-- BODY and FRAMESET can't come together");
compilestatus = 1;
}
if (Text.IndexOf("</BODY>") != -1)
{
richTextBox1.SelectionStart = i;
richTextBox1.SelectionLength = "<FRAMESET>".Length;
;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
i).ToString() + " Error-- BODY and FRAMESET can't come together")
== -1)
errorlist.Items.Add(lineno(richTextBox1.Text, i).ToString()
+ " Error-- BODY and FRAMESET can't come together");
compilestatus = 1;
}
}
if (Text.IndexOf("<BODY>") != -1)
{
j = Text.IndexOf("<BODY>");
if (Text.IndexOf("<FRAMESET>") != -1)
{
richTextBox1.SelectionStart = j;
richTextBox1.SelectionLength = "<BODY>".Length;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
j).ToString() + " Error-- BODY and FRAMESET can't come together")
== -1)
errorlist.Items.Add(lineno(richTextBox1.Text, j).ToString()
+ " Error-- BODY and FRAMESET can't come together");
compilestatus = 1;
}
if (Text.IndexOf("</FRAMESET>") != -1)
{
richTextBox1.SelectionStart = j;
richTextBox1.SelectionLength = "<BODY>".Length;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
j).ToString() + " Error-- BODY and FRAMESET can't come together")
== -1)
errorlist.Items.Add(lineno(richTextBox1.Text, j).ToString()
+ " Error-- BODY and FRAMESET can't come together");
compilestatus = 1;
}
if (Text.IndexOf("<FRAME>") != -1)
{
richTextBox1.SelectionStart = j;
richTextBox1.SelectionLength = "<BODY>".Length;
richTextBox1.SelectionColor = Color.Red;
if (errorlist.Items.IndexOf(lineno(richTextBox1.Text,
j).ToString() + " Error-- BODY and FRAME can't come together") ==
-1)
errorlist.Items.Add(lineno(richTextBox1.Text, j).ToString()
+ " Error-- BODY and FRAME can't come together");
compilestatus = 1;
}
}
}
void metatag(string Text)
{
if (j == Text.Length)
break;
}
str1 += ">";
if (str1 == "<BODY>")
break;
}
}
if (str1 == "<BODY>")
{
string str2 = "";
for (int i = 0; i < Text.Length; i++)
{
if (Text.Substring(i, 1) == "<")
{
str2 = "";
j = i;
if (j == Text.Length)
break;
}
str2 += ">";
if (str2 == "</BODY>")
break;
}
}
if (str2 == "</BODY>")
{
string str3 = "";
for (int i = j; i < Text.Length; i++)
{
if (Text.Substring(i, 1) == "<")
{
str3 = "";
j = i;
if (j == Text.Length)
break;
}
str3 += ">";
}
}
}
}
}
}
string[] attribute = new string[20];
int l = 0;
void attributetag(string Text)
{
if (j == Text.Length)
break;
}
if (Text.Substring(j, 1) == " ")
{
attribute[l] = "";
for (int k = j; k < Text.Length; k++)
{
if (Text.Substring(k, 1) == ">")
break;
attribute[l] += Text.Substring(k, 1);
if (Text.Substring(k, 1) == "=")
{
l++;
attribute[l] = "";
for (; Text.Substring(k, 1) != " "; k++)
{
if (Text.Substring(k, 1) == ">")
{
k = k - 1;
break;
}
if (k == Text.Length)
break;
}
}
}
}
str1 += ">";
//MessageBox.Show(str1);
if (attributetagindex(str1) != -1)
{
int r = attributetagindex(str1);
for (int l1 = 0; l1 < l; l1++)
{
attribute[l1] = attribute[l1].Substring(0,
attribute[l1].Length - 1);
attribute[l1] = attribute[l1].Replace("\"", "");
}
else if (attribute[l1].Trim() == "VALIGN" && (str1
== "<TH>" || str1 == "<TR>"))
{
int j1, k1;
string[] valignattrib = { "TOP", "CENTER",
"BOTTOM" };
j1 = richTextBox1.Find("VALIGN", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < valignattrib.Length; x++)
{
if (valignattrib[x] == str2)
break;
if (x == valignattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of VALIGN is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of VALIGN is undefined ");
compilestatus = 1;
}
}
}
if (x == bgcolorattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of BGCOLOR is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of BGCOLOR is undefined ");
compilestatus = 1;
}
}
}
if (x == colorattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of COLOR is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of COLOR is undefined ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "LEFTMARGIN" &&
(str1 == "<BODY>"))
{
int j1, k1;
j1 = richTextBox1.Find("LEFTMARGIN", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
if (Int32.Parse(str2) <= 1 || Int32.Parse(str2) >= 3)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- Range of LEFTMARGIN must be in Between 1 to 3 ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- Range of LEFTMARGIN must be in Between
1 to 3 ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "RIGHTMARGIN"
&& (str1 == "<BODY>"))
{
int j1, k1;
j1 = richTextBox1.Find("RIGHTMARGIN", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
if (Int32.Parse(str2) <= 1 || Int32.Parse(str2) >= 3)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- Range of RIGHTMARGIN must be in Between 1 to 3 ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- Range of RIGHTMARGIN must be in
Between 1 to 3 ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "HEIGHT" && (str1
== "<TABLE>" || str1 == "<IMG>"))
{
int j1, k1;
j1 = richTextBox1.Find("HEIGHT", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
if (Int32.Parse(str2) <= 1 || Int32.Parse(str2) >= 6)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- Range of HEIGHT must be in Between 1 to 6 ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- Range of HEIGHT must be in Between 1 to 6
");
compilestatus = 1;
}
}
if (x == faceattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of FACE is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of FACE is undefined ");
compilestatus = 1;
}
}
if (x == alignattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of ALIGN is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of ALIGN is undefined ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "START" && (str1 ==
"<OL>"))
{
int j1, k1;
j1 = richTextBox1.Find("START", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
if (Int32.Parse(str2) < 1)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- Value of START must be greater than 1 ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- Value of START must be greater than 1 ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "TYPE" && (str1 ==
"<OL>"))
{
int j1, k1;
string[] typeattrib = { "1", "I", "i", "A", "a" };
j1 = richTextBox1.Find("TYPE", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < typeattrib.Length; x++)
{
if (typeattrib[x] == str2)
break;
if (x == typeattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of TYPE is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of TYPE is undefined ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "TYPE" && (str1 ==
"<UL>"))
{
int j1, k1;
string[] typeattrib = { "CIRCLE", "DISC",
"SQUARE" };
j1 = richTextBox1.Find("TYPE", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < typeattrib.Length; x++)
{
if (typeattrib[x] == str2)
break;
if (x == typeattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of TYPE is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of TYPE is undefined ");
compilestatus = 1;
}
}
if (x == backgroundattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of BACKGROUND is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of BACKGROUND is undefined
");
compilestatus = 1;
}
}
}
else if (attribute[l1].Trim() == "COLS" && (str1 ==
"<FRAMESET>"))
{
int j1, k1;
j1 = richTextBox1.Find("COLS", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
if (Int32.Parse(str2) > 100)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- Percentage of COLS must be less than or equal to 100% ") ==
-1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- Percentage of COLS must be less than or
equal to 100% ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "ROWS" && (str1 ==
"<FRAMESET>"))
{
int j1, k1;
j1 = richTextBox1.Find("ROWS", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
if (Int32.Parse(str2) > 100)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- Percentage of ROWS must be less than or equal to 100% ") ==
-1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- Percentage of ROWS must be less than or
equal to 100% ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "METHOD" && (str1
== "<FORM>"))
{
int j1, k1;
string[] methodattrib = { "get", "set" };
j1 = richTextBox1.Find("METHOD", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < methodattrib.Length; x++)
{
if (methodattrib[x] == str2)
break;
if (x == methodattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of METHOD is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of METHOD is undefined ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "TYPE" && (str1 ==
"<INPUT>"))
{
int j1, k1;
string[] typeattrib = { "RADIO", "CHECKBOX",
"SUBMIT", "TEXT" };
j1 = richTextBox1.Find("TYPE", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < typeattrib.Length; x++)
{
if (typeattrib[x] == str2)
break;
if (x == typeattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of TYPE is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of TYPE is undefined ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "CHARSET" && (str1
== "<META>"))
{
int j1, k1;
string[] charsetattrib = { "CHARACTER",
"ENCODING" };
j1 = richTextBox1.Find("CHARSET", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < charsetattrib.Length; x++)
{
if (charsetattrib[x] == str2)
break;
if (x == charsetattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of CHARSET is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of CHARSET is undefined ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "NAME" && (str1 ==
"<META>"))
{
int j1, k1;
string[] nameattrib = { "author", "description",
"keywords", "generator", "revised" };
j1 = richTextBox1.Find("NAME", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < nameattrib.Length; x++)
{
if (nameattrib[x] == str2)
break;
if (x == nameattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of NAME is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of NAME is undefined ");
compilestatus = 1;
}
}
else if (attribute[l1].Trim() == "HTTP-EQUIV" &&
(str1 == "<META>"))
{
int j1, k1;
string[] httpattrib = { "content-type", "expires",
"refresh", "set-cookie" };
j1 = richTextBox1.Find("HTTP-EQUIV", i,
RichTextBoxFinds.None);
j1 = richTextBox1.Find("=", j1,
RichTextBoxFinds.None) + 1;
for (k1 = j1; Text.Substring(k1, 1) != ">" &&
Text.Substring(k1, 1) != " "; k1++)
{}
string str2 = Text.Substring(j1, k1 - j1);
MessageBox.Show(str2);
int x = 0;
for (x = 0; x < httpattrib.Length; x++)
{
if (httpattrib[x] == str2)
break;
if (x == httpattrib.Length)
{
richTextBox1.SelectionStart = j1;
richTextBox1.SelectionLength = str2.Length;
richTextBox1.SelectionColor = Color.Red;
if
(errorlist.Items.IndexOf(lineno(richTextBox1.Text, j1).ToString() + "
Error-- The value of HTTP-EQUIV is undefined ") == -1)
errorlist.Items.Add(lineno(richTextBox1.Text,
j1).ToString() + " Error-- The value of HTTP-EQUIV is undefined ");
compilestatus = 1;
}
}
}
}
}
}
}
return -1;
}
void attributecheck(string Text)
{
}
int attributeindex(string attribute1, int r)
{
for (int i = 0; i < 10; i++)
{
if (attrib[r, i] == attribute1)
return i;
}
return -1;
}
public Form1()
{
this.Text = "untitled";
InitializeComponent();
}
richTextBox1.SelectionColor = Color.Black;
checkTags(richTextBox1.Text);
tagcheck(richTextBox1.Text.ToUpper());
tagordercheck(richTextBox1.Text.ToUpper());
singleentrytags(richTextBox1.Text.ToUpper());
try
{
positioncheck(richTextBox1.Text.ToUpper());
frameset(richTextBox1.Text.ToUpper());
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
commenttag(richTextBox1.Text.ToUpper());
metatag(richTextBox1.Text.ToUpper());
bodytagcheck(richTextBox1.Text.ToUpper());
attributetag(richTextBox1.Text.ToUpper());
MessageBox.Show("Compiled");
}
// richTextBox1.SaveFile(this.Text);
// filename = openFileDialog1.FileName;
savestatus = 1;
}
}
catch (Exception x)
{
MessageBox.Show(x.Message);
}
}
}
}
StringBuilder str = new StringBuilder();
str.Append("<HTML>\n");
str.Append("<HEAD>\n");
str.Append("<TITLE>\n");
str.Append("</TITLE>\n");
str.Append("</HEAD>\n");
str.Append("<BODY>\n");
str.Append("</BODY>\n");
str.Append("</HTML>\n");
richTextBox1.SelectedText = str.ToString();
}
catch(Exception x)
{
MessageBox.Show(x.Message);
}
}
// richTextBox1.SaveFile(saveFileDialog1.FileName);
this.Text = saveFileDialog1.FileName;
filename = saveFileDialog1.FileName;
savestatus = 1;
}
}
catch (Exception x)
{
MessageBox.Show(x.Message);
}
}
if (richTextBox1.Text.IndexOf((char)10, i) != -1)
{
count++;
if (count == line)
break;
i = richTextBox1.Text.IndexOf((char)10, i) + 1;
}
}
richTextBox1.SelectionStart = i;
richTextBox1.Focus();
}
public int lineno(string s,int pos)
{
int count = 0;
for (int i = 0; i <= pos; i++)
{
if (s.IndexOf((char)10, i) != -1 )
{
count++;
i = s.IndexOf((char)10, i) + 1;
}
}
return count;
}
if (compilestatus == 2)
{
if (filename != ""&& savestatus==1)
{
Form2 f = new Form2(filename);
f.Show();
}
else
{
MessageBox.Show("firstly save the file");
}
}
else
{
MessageBox.Show("first compile the file");
}
}
if (compilestatus == 2)
{
try
{
System.Diagnostics.Process p = new
System.Diagnostics.Process();
p.StartInfo.FileName =
@"C:\progra~1\intern~1\IEXPLORE.EXE ";
p.StartInfo.Arguments = filename;
p.Start();
}
catch (Exception ex)
{}
}
else
{
MessageBox.Show("first compile the file");
}
}
private void
internalBrowserToolStripMenuItem_MouseMove(object sender,
MouseEventArgs e)
{
toolStripStatusLabel1.Text = "View in internal browser ";
private void
externalBrowserToolStripMenuItem_MouseMove(object sender,
MouseEventArgs e)
{
toolStripStatusLabel1.Text = "View in external browser ";
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace HTML_DEBUGGER
{
public partial class Form2 : Form
{
String filename;
public Form2()
{
InitializeComponent();
}
public Form2(String s)
{
filename = s;
InitializeComponent();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace HTML_DEBUGGER
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
Form1 f = new Form1();
f.Show();
this.Hide();
timer1.Stop();
//this.Close();
}
private void Form3_Load(object sender, EventArgs e)
{
timer1.Interval = 5000;
timer1.Start();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;
namespace HTML_DEBUGGER
{
partial class AboutBox1 : Form
{
public AboutBox1()
{
InitializeComponent();
}
}
}
}
TEST CASES
1. TAG CHECK:-
To check whether tag is between open angular bracket or close angular
bracket eg. <HTML> if we not apply one of the open or close angular
bracket or make double entry of open/close bracket error is shown.
6. POSITION CHECK :-
In this test cases we checked that there must be no tag between
</BODY> and </HTML> , if any exist it show error as shown:-
On clicking FONT option, the user will be able to select the font
of the text as shown :-
On clicking COLOR option, the user will be able to select the
color of the text as shown :-
TOOLBAR MENU OPTIONS :-
In this we have put some most commonly used tags such as
<BR>, <TABLE> etc. On clicking any of the tag, it will be
appeared in the text window with all its attributes and values of
some specified attributes :-
On clicking the <TABLE> attribute, the following code will
appear :-
DESIGN OF FORM 3 (SPLASH SCREEN)
DESIGN OF FORM 4 (ABOUT BOX)
CHAPTER 6 : LIMITATIONS
use only STATIC pages. As DYNAMIC pages are interactive and have
some links but we have not used any DYNAMIC page means no links
are added here. We have not used ACTIVE pages also means not used
any animations. Moreover we have not added any interaction with user.
and need not have any extra knowledge about it. User can compile the
errors and debug it and can see the output in the web browser.
CHAPTER 8 : SUGGESTION FOR FUTURE
WORK
appearance. We can also add and design borders for your pages and
insert navigation bars, which guide your users around your Web site.
CHAPTER 9 : CONCLUSION
Means here we have made the editor and menus in it like open,
save etc. now we can write simple code in HTML and put any
valid attribute and values of a particular tag, it first save the file,
then compile it and if errors come then debug it and after that it
show output in the browser-either in EXTERNAL BROWSER or
in INTERNAL BROWSER according to demand of user.
CHAPTER 10 : REFERENCES
1) http://www.wikipedia.com/editing.
2) http://www.w3schools.com/htmltags
3) http://www.wikipedia.com/compiling
4) http://www.wikipedia.com/kmpalgo
5) http://www.wikipedia.com/executing
6) http://www.msdnlibrary.com\_net system library - MSDN
Search.mht
7) Pankaj Jalote, AN INTEGRATED APPROCH TO SOFTWARE
PROJECT MANAGEMENT
8) Roger S. Pressman, SOFTWARE ENGINEERING
CHAPTER 11 : GLOSSARY