View
2.834
Download
0
Category
Tags:
Preview:
Citation preview
1
SCHOOL OF COMPUTER ENGINEERINGKIIT UNIVERSITY
PROJECT REPORT ON
An offline English to Hindi Wdictionary
Mentor – Dr. Sriram Chaudhary
Submitted by:
BIPIN KUMAR 1105407 CS1
GOURAV KUMAR GUPTA 1105409 CS2
MD SHAHID 1105418 CS3
ADITYA KUMAR 1105402 CS1
1
SCHOOL OF COMPUTER ENGINEERINGKIIT UNIVERSITY
PROJECT REPORT ON
An offline English to Hindi Wdictionary
Mentor – Dr. Sriram Chaudhary
Submitted by:
BIPIN KUMAR 1105407 CS1
GOURAV KUMAR GUPTA 1105409 CS2
MD SHAHID 1105418 CS3
ADITYA KUMAR 1105402 CS1
1
SCHOOL OF COMPUTER ENGINEERINGKIIT UNIVERSITY
PROJECT REPORT ON
An offline English to Hindi Wdictionary
Mentor – Dr. Sriram Chaudhary
Submitted by:
BIPIN KUMAR 1105407 CS1
GOURAV KUMAR GUPTA 1105409 CS2
MD SHAHID 1105418 CS3
ADITYA KUMAR 1105402 CS1
2
CERTIFICATE
This is to certify that the project entitled “wDictionary” isbeing carried out by
Gourav Kumar Gupta (1105409), MD Shahid (1105418),Bipin Kumar (1105407), Aditya Kumar (1105402)
in partial fulfillment for degree of Bachelor of Technologyin Computer Science and Engineering at School ofComputer Engineering, KIIT University, Bhubaneswarduring the academic year 2013 – 2014 under mysupervision. The matter embodied in this project is originaland has not been submitted for the award of any otherdegree.
NAME………..…………….. Designation……………………..
Signature…………………………
SEAL…………………………… Date………………………………..
2
CERTIFICATE
This is to certify that the project entitled “wDictionary” isbeing carried out by
Gourav Kumar Gupta (1105409), MD Shahid (1105418),Bipin Kumar (1105407), Aditya Kumar (1105402)
in partial fulfillment for degree of Bachelor of Technologyin Computer Science and Engineering at School ofComputer Engineering, KIIT University, Bhubaneswarduring the academic year 2013 – 2014 under mysupervision. The matter embodied in this project is originaland has not been submitted for the award of any otherdegree.
NAME………..…………….. Designation……………………..
Signature…………………………
SEAL…………………………… Date………………………………..
2
CERTIFICATE
This is to certify that the project entitled “wDictionary” isbeing carried out by
Gourav Kumar Gupta (1105409), MD Shahid (1105418),Bipin Kumar (1105407), Aditya Kumar (1105402)
in partial fulfillment for degree of Bachelor of Technologyin Computer Science and Engineering at School ofComputer Engineering, KIIT University, Bhubaneswarduring the academic year 2013 – 2014 under mysupervision. The matter embodied in this project is originaland has not been submitted for the award of any otherdegree.
NAME………..…………….. Designation……………………..
Signature…………………………
SEAL…………………………… Date………………………………..
3
ACKNOWLEDGEMENTAchievement of this task would have been impossible without
the help and constant guidance of certain people.
We hereby take the opportunity of thanking few people for their
support, guidance and encouragement for the successful
completion of our project.
We would like to thank Dr. Achyuta Samanta, Hon’ble Founder,
KISS & KIIT University. It’s due to his efforts that we are able to
experience a platform like KIIT for our under graduate degree.
We would like to express our sincere thanks to Dr. Sriram
Chaudhary, who provided us his valuable guidance and support.
Each of us would also like to thank our respective parents who
have been a constant motivation for us during the course of this
project.
4
ABSTRACTwDictionary is windows software which can be useful for various
types of people. Imagine that a vocabulary tutor is always
available on your PC or Laptop. You can find meaning of all words
in just few seconds. This dream comes true with this windows
software. In this fast pace world we are mostly dependant on
electronic media.
Many times when we get some words which meaning is not
known to us then the problem comes, but the problem is not that
tuff now, meaning of these typical words is now in the gap of few
clicks. We open the wDictionary then type the words and answer
is provided offline. Yes this wDictionary doesn’t need internet
connectivity. So whenever you wish to know meaning of words
just click on our software and type words BINGO! Meaning is
known.
5
CONTENT
1 INTRODUCTION................................................................................. 61.1 Purpose....................................................................................... 7
1.2 Method....................................................................................... 7
1.3 Scope.......................................................................................... 7
1.4 Tools....................................................................................... 71.4.2Front End.............................................................. 7
1.4.2 Back End........................................................................ 7
2. REQUIREMENT SPECIFICATION........................................................ 8
2.1 Functional Requirements....................................................... 8
2.2 Non – Functional Requirements............................................. 8
3 Goal of Implementation..................................................................... 9
4 Hardware Requirement..................................................................... 9
5 Software Requirements..................................................................... 9
6. Diagrams.......................................................................................... 10
6.1 Use Case Model.................................................................. 10
6.2 Class Diagram..................................................................... 12
6.3 Process Flow Diagram........................................................ 13
6.4 Data Flow Diagram............................................................. 14
6.5 Sequence Diagram.............................................................. 15
7. Snapshots............................................................................................ 16
8. Source Code........................................................................................ 20
8.1 GUI Form Design Code
8.2 Form Business Logic Code
8.3 Driver Program
9. References......................................................................................... 40
6
1 INTRODUCTION
The wDictionary software has been developed for all windows
operating system which is most popular OS now days.
This is offline software which does not need internet
connectivity. You can know the meaning of words without
internet connection. Lots of similar suggestion is also provided in
suggestion box where you can know the meaning of some more
similar words. So basically wDictionary is an offline wDictionary
for windows platform.
1.1 Purpose
The wDictionary software is developed to solve user’s
vocabulary confusion or problem. Just few clicks and the
meaning is known.
1.2 Method
The approach is to use a database where meaning with
respective words is available. wDictionary is retrieving it
according to user’s need.
7
1.3 Scope
The software target any type of computer user who ever get
a word which meaning is not known to him.
1.4 Tools
1.4.1 Front End
Visual Studio 2012
1.4.2 Back End
SQL Server
Install Shield (To build set up)
8
2. REQUIREMENT SPECIFICATION2.1 Functional Requirements
R1: some beginning characters of any word
Input: Type some characters in provided boxOutput: Suggestion of words starting with given character
R2: Selection of appropriate word
Input: Select the word which you are interested in.Output: Meaning of the selected word.
2.2 Non – Functional Requirements
1. The software should work properly in offline mode.
2. Suggestion should be shown in ascending order accordingto the input if available.
3. Input can be altered any time.
4. As input is altered Suggestion should be changedaccordingly.
9
3 Goal of Implementation1. The ability to show suggestion of words according to input
characters in ascending order.2. Meaning of words must be shown properly after
selection.
4 Hardware Requirements1. A PC with Windows operating system.2. RAM 20 MB3. Processor4. Secondary Memory 20 MB
5 Software Requirements1. Windows Operating System (XP or higher version)
10
6. DIAGRAMS6.1 Use Case Model
User
Enter Word
Find Word in DataBase
Display Meaning
Use Case Model
11
USE CASE DESCRIPTIONUse case name wDictionary
Scenario Show meaning of Words
Triggering Event Type some character of any word
Brief Description This wDictionary software takes input assome character from user, searchmatched words from Database. Providesome suggestion to user, and afterselection from suggestion shows meaningof that word in appropriate column.
Actors The user who clicks on the app
Related use cases None
Stake holders User
Preconditions User must use the software in windowsplatform.
12
6.2 Class Diagram
Dictionary
WordMeaning
getInput();searchInput();
showSuggestion();showMeaning();
13
START
Search in Database
Display Suggestion
Select Any Suggestion or Alter
Show Meaning
Enter Word
YES
Alter
Select
NO
END
6.3Process Flow Diagram
14
6.4 Data Flow Diagram
Dictionary
0.0
USER
Word
Meaning
Level 0:
Level 1:
Search Input
0.1
word
Suggestion
Meaning
0.3Selection
0.2
DataBase
Word
Meaning
Data Flow Diagram
15
6.5 Sequence Diagram
inputWord
searchMatchedWords
displaySuggestion
:Dictionary
selectWord
displayMeaning
Word Selected
MeaningFind
Sequence Diagram
Data Base
16
7. Snapshots
17
18
19
8. Source Code
8.1 GUI Form Design Code
namespace Dictionary_final_yr_project
{
partial class Edictionary
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise,false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
20
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = newSystem.ComponentModel.ComponentResourceManager(typeof(Edictionary));
this.InputWord = new System.Windows.Forms.TextBox();
this.SelectedWord = new System.Windows.Forms.TextBox();
this.Meaning = new System.Windows.Forms.TextBox();
this.Footer = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.toolTip2 = new System.Windows.Forms.ToolTip(this.components);
this.toolTip3 = new System.Windows.Forms.ToolTip(this.components);
this.toolTip4 = new System.Windows.Forms.ToolTip(this.components);
this.toolTip5 = new System.Windows.Forms.ToolTip(this.components);
this.Exit = new System.Windows.Forms.Button();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
21
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutUsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.listBox1 = new System.Windows.Forms.ListBox();
this.listBox2 = new System.Windows.Forms.ListBox();
this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// InputWord
//
this.InputWord.BackColor = System.Drawing.Color.White;
this.InputWord.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.InputWord.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.InputWord.Location = new System.Drawing.Point(3, 32);
this.InputWord.Multiline = true;
this.InputWord.Name = "InputWord";
this.InputWord.Size = new System.Drawing.Size(299, 45);
this.InputWord.TabIndex = 0;
this.InputWord.Text = "Type few letter of word";
this.toolTip1.SetToolTip(this.InputWord, "Enter few letter of word");
this.InputWord.Click += new System.EventHandler(this.InputWord_Click);
22
this.InputWord.TextChanged += new System.EventHandler(this.InputWord_TextChanged);
//
// SelectedWord
//
this.SelectedWord.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))),((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.SelectedWord.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.SelectedWord.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SelectedWord.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))),((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.SelectedWord.Location = new System.Drawing.Point(3, 274);
this.SelectedWord.Multiline = true;
this.SelectedWord.Name = "SelectedWord";
this.SelectedWord.ReadOnly = true;
this.SelectedWord.Size = new System.Drawing.Size(299, 79);
this.SelectedWord.TabIndex = 3;
this.toolTip4.SetToolTip(this.SelectedWord, "Selected wrod");
//
// Meaning
//
this.Meaning.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))),((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.Meaning.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Meaning.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Meaning.Location = new System.Drawing.Point(3, 359);
23
this.Meaning.Multiline = true;
this.Meaning.Name = "Meaning";
this.Meaning.ReadOnly = true;
this.Meaning.Size = new System.Drawing.Size(590, 75);
this.Meaning.TabIndex = 4;
this.toolTip5.SetToolTip(this.Meaning, "Meaning of selected word");
//
// Footer
//
this.Footer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))),((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.Footer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.Footer.Font = new System.Drawing.Font("Times New Roman", 14.25F,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Footer.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))),((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.Footer.Location = new System.Drawing.Point(3, 437);
this.Footer.Name = "Footer";
this.Footer.Size = new System.Drawing.Size(492, 46);
this.Footer.TabIndex = 5;
this.Footer.Text = "Designed And Developed By CSE Group\r\nAll Right Reserved Copyright2013";
this.Footer.Click += new System.EventHandler(this.label1_Click);
//
// Exit
//
24
this.Exit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))),((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.Exit.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Exit.ForeColor = System.Drawing.Color.Blue;
this.Exit.Location = new System.Drawing.Point(499, 437);
this.Exit.Name = "Exit";
this.Exit.Size = new System.Drawing.Size(94, 46);
this.Exit.TabIndex = 6;
this.Exit.Text = "EXIT";
this.Exit.UseVisualStyleBackColor = false;
this.Exit.Click += new System.EventHandler(this.button1_Click);
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1,
this.toolStripStatusLabel2});
this.statusStrip1.Location = new System.Drawing.Point(0, 490);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(605, 22);
this.statusStrip1.TabIndex = 7;
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Font = new System.Drawing.Font("Segoe UI", 12F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
25
this.toolStripStatusLabel1.ForeColor = System.Drawing.Color.Fuchsia;
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(0, 17);
//
// toolStripStatusLabel2
//
this.toolStripStatusLabel2.Font = new System.Drawing.Font("Segoe UI", 12F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.toolStripStatusLabel2.ForeColor = System.Drawing.Color.Fuchsia;
this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
this.toolStripStatusLabel2.Size = new System.Drawing.Size(0, 17);
//
// menuStrip1
//
this.menuStrip1.Font = new System.Drawing.Font("Segoe UI", 12F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.aboutUsToolStripMenuItem,
this.toolStripMenuItem1});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(605, 29);
this.menuStrip1.TabIndex = 8;
this.menuStrip1.Text = "menuStrip1";
//
26
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(newSystem.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F10;
this.fileToolStripMenuItem.Size = new System.Drawing.Size(46, 25);
this.fileToolStripMenuItem.Text = "File";
this.fileToolStripMenuItem.ToolTipText = "File";
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(104, 26);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += newSystem.EventHandler(this.exitToolStripMenuItem_Click);
// aboutUsToolStripMenuItem
this.aboutUsToolStripMenuItem.Name = "aboutUsToolStripMenuItem";
this.aboutUsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F11;
this.aboutUsToolStripMenuItem.Size = new System.Drawing.Size(86, 25);
this.aboutUsToolStripMenuItem.Text = "About Us";
this.aboutUsToolStripMenuItem.ToolTipText = "About Us";
this.aboutUsToolStripMenuItem.Click += newSystem.EventHandler(this.aboutUsToolStripMenuItem_Click);
27
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F12;
this.toolStripMenuItem1.Size = new System.Drawing.Size(54, 25);
this.toolStripMenuItem1.Text = "Help";
this.toolStripMenuItem1.ToolTipText = "Help";
this.toolStripMenuItem1.Click += newSystem.EventHandler(this.toolStripMenuItem1_Click);
//
// listBox1
//
this.listBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))),((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.listBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 24;
this.listBox1.Location = new System.Drawing.Point(308, 31);
this.listBox1.Name = "listBox1";
this.listBox1.ScrollAlwaysVisible = true;
this.listBox1.SelectionMode = System.Windows.Forms.SelectionMode.None;
this.listBox1.Size = new System.Drawing.Size(285, 316);
this.listBox1.TabIndex = 9;
//
// listBox2
28
//
this.listBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))),((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.listBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listBox2.FormattingEnabled = true;
this.listBox2.ItemHeight = 24;
this.listBox2.Location = new System.Drawing.Point(8, 82);
this.listBox2.Name = "listBox2";
this.listBox2.Size = new System.Drawing.Size(290, 172);
this.listBox2.TabIndex = 10;
this.listBox2.SelectedIndexChanged += newSystem.EventHandler(this.listBox2_SelectedIndexChanged);
//
// Edictionary
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(605, 512);
this.Controls.Add(this.listBox2);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.Exit);
this.Controls.Add(this.Footer);
this.Controls.Add(this.Meaning);
29
this.Controls.Add(this.SelectedWord);
this.Controls.Add(this.InputWord);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false;
this.Name = "Edictionary";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "E-Dictionary English To Hindi";
this.Load += new System.EventHandler(this.Form1_Load);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox InputWord;
private System.Windows.Forms.TextBox SelectedWord;
private System.Windows.Forms.TextBox Meaning;
private System.Windows.Forms.Label Footer;
30
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.ToolTip toolTip2;
private System.Windows.Forms.ToolTip toolTip3;
private System.Windows.Forms.ToolTip toolTip4;
private System.Windows.Forms.ToolTip toolTip5;
private System.Windows.Forms.Button Exit;
private System.Windows.Forms.NotifyIcon EDICTIONARY;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem aboutUsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.ListBox listBox2;
}
}
8.2 Form Business Logic Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
31
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Data.SqlClient;
namespace Dictionary_final_yr_project
{
public partial class Edictionary : Form
{
public Edictionary()
{
InitializeComponent();
}
private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
private void InputWord_TextChanged(object sender, EventArgs e)
{
try
{
listBox2.Items.Clear();
32
string inputword =InputWord.Text+"%";
SqlConnection con = new SqlConnection("server=(LocalDB)\\v11.0;database=Edictionary;Integrated Security=true");
string s1 = "select word from Edictionary where word like '"+inputword+"'";
con.Open();
SqlCommand cmd = new SqlCommand(s1, con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
listBox2.Items.Add(dr[0].ToString() + "\n");
}
}
catch (Exception ex )
{
}
}
private void Form1_Load(object sender, EventArgs e)
{
InputWord.AppendText(" ");
toolStripStatusLabel1.Text = "You are about to begin";
myconnect();
}
33
private string DateTime()
{
throw new NotImplementedException();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = "Fetching suggested words from DataBase";
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
34
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void aboutUsToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("E-Dictionary English To Hindi Version 1.00.00\nThis Application isdesigned and developed by CSE Group\n");
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
MessageBox.Show("1.How can you use this dictionary?\n1.1. Searching the word.\n1.2.Finding the Meaning.\n2. Searching the word\n2.1 Type first letter of your word in dictionarysearch box for which you have to find the meaning.\n2.2 Dictionary will show all the relatedwords.\n3. Finding the meaning\n3.1 Select the word for which you will need a hindimeaning.\n3.2 HIndi meaning of related word will show in the text area in hindi font.");
}
public void myconnect()
{
try
{
SqlConnection con = new SqlConnection("server=(LocalDB)\\v11.0;database=Edictionary;Integrated Security=true");
string s1 = "select word from Edictionary ORDER BY word";
con.Open();
SqlCommand cmd = new SqlCommand(s1, con);
35
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
listBox1.Items.Add(dr[0].ToString()+"\n");
}
}
catch (Exception e)
{
}
InputWord.Focus();
}
private void listBox2_SelectedIndexChanged(object sender, EventArgs e)
{
string word=listBox2.SelectedItem.ToString().Trim();
try
{
SqlConnection con = new SqlConnection("server=(LocalDB)\\v11.0;database=Edictionary;Integrated Security=true");
con.Open();
string sql = "select meaning from Edictionary where word like'" + word + "'";
SqlCommand cmd = new SqlCommand(sql, con);
SqlDataReader dr = cmd.ExecuteReader();
if(dr.Read())
{
36
Meaning.Text = dr[0].ToString();
SelectedWord.Text = word;
}
}
catch (Exception ex)
{
}
}
private void InputWord_Click(object sender, EventArgs e)
{
InputWord.Text = "";
}
}
}
8.3 Driver Program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms
namespace Dictionary_final_yr_project
{
static class Program
37
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Edictionary());
}
}
}
38
9 References
Professional c# 2nd Edition .NET v1.0 by Robinson www.google.co.in www.dotnetfunda.com www.w3school.com
Recommended