Offline Dictionary Project Report

  • 1,304 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,304
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
89
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. SCHOOL OF COMPUTER ENGINEERING KIIT 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
  • 2. CERTIFICATE This is to certify that the project entitled “wDictionary” is being carried out by Gourav Kumar Gupta (1105409), MD Shahid (1105418), Bipin Kumar (1105407), Aditya Kumar (1105402) in partial fulfillment for degree of Bachelor of Technology in Computer Science and Engineering at School of Computer Engineering, KIIT University, Bhubaneswar during the academic year 2013 – 2014 under my supervision. The matter embodied in this project is original and has not been submitted for the award of any other degree. NAME………..…………….. Designation…………………….. Signature………………………… SEAL…………………………… Date……………………………….. 2
  • 3. ACKNOWLEDGEMENT Achievement 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. 3
  • 4. ABSTRACT wDictionary 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. 4
  • 5. CONTENT 1 INTRODUCTION................................................................................. 6 1.1 Purpose....................................................................................... 7 1.2 Method....................................................................................... 7 1.3 Scope.......................................................................................... 7 1.4 Tools....................................................................................... 7 1.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 5
  • 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. 6
  • 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) 7
  • 8. 2. REQUIREMENT SPECIFICATION 2.1 Functional Requirements R1: some beginning characters of any word Input: Type some characters in provided box Output: 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 according to the input if available. 3. Input can be altered any time. 4. As input is altered Suggestion should be changed accordingly. 8
  • 9. 3 Goal of Implementation 1. 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 Requirements 1. A PC with Windows operating system. 2. RAM 20 MB 3. Processor 4. Secondary Memory 20 MB 5 Software Requirements 1. Windows Operating System (XP or higher version) 9
  • 10. 6. DIAGRAMS 6.1 Use Case Model Use Case Model Enter Word Find Word in DataBase Display Meaning User 10
  • 11. USE CASE DESCRIPTION Use case name wDictionary Scenario Show meaning of Words Triggering Event Type some character of any word Brief Description Actors This wDictionary software takes input as some character from user, search matched words from Database. Provide some suggestion to user, and after selection from suggestion shows meaning of that word in appropriate column. The user who clicks on the app Related use cases None Stake holders User Preconditions User must use the software in windows platform. 11
  • 12. 6.2 Class Diagram Dictionary Word Meaning getInput(); searchInput(); showSuggestion(); showMeaning(); 12
  • 13. 6.3Process Flow Diagram START Enter Word Search in Database NO YES Display Suggestion Select Any Suggestion or Alter Alter Select Show Meaning END 13
  • 14. 6.4 Data Flow Diagram Data Flow Diagram Level 0: Word Dictionary USER 0.0 Meaning Level 1: word Meaning Search Input Selection 0.1 0.2 Meaning 0.3 Word DataBase Suggestion 14
  • 15. 6.5 Sequence Diagram Sequence Diagram Data Base :Dictionary inputWord searchMatchedWords displaySuggestion selectWord Word Selected Find displayMeaning Meaning 15
  • 16. 7. Snapshots 16
  • 17. 17
  • 18. 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(); } 19
  • 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 = new System.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(); 20
  • 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); 21
  • 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); 22
  • 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 GrouprnAll Right Reserved Copyright 2013"; this.Footer.Click += new System.EventHandler(this.label1_Click); // // Exit // 23
  • 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))); 24
  • 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"; // 25
  • 26. // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.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 += new System.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 += new System.EventHandler(this.aboutUsToolStripMenuItem_Click); 26
  • 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 += new System.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 27
  • 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 += new System.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); 28
  • 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; 29
  • 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; 30
  • 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(); 31
  • 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(); } 32
  • 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) { } 33
  • 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.00nThis Application is designed and developed by CSE Groupn"); } 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 wordn2.1 Type first letter of your word in dictionary search box for which you have to find the meaning.n2.2 Dictionary will show all the related words.n3. Finding the meaningn3.1 Select the word for which you will need a hindi meaning.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); 34
  • 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()) { 35
  • 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 36
  • 37. { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Edictionary()); } } } 37
  • 38. 9 References     Professional c# 2nd Edition .NET v1.0 by Robinson www.google.co.in www.dotnetfunda.com www.w3school.com 38