In my previous article
http://www.c-sharpcorner.com/UploadFile/Mahadesh/8330/ I had start
with developed a simple windows tool for Search . I thought of extending the
tool and this time I would be using WPF .
Lets start off .
Created a new WPF Project.
Created a DataModel as shown below :
Scripts for the Table Creation:
WinSearchEngine_Dictionary Table :
/****** Object: Table [dbo].[WinSearchEngine_Dictionary] Script Date: 07/30/2011
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE [dbo].[WinSearchEngine_Dictionary](
[id] [int] IDENTITY(1,1) NOT NULL,
CategoryId int CONSTRAINT fk_MainCategory_cid FOREIGN KEY REFERENCES
[topic] [varchar](200) NULL,
[site_adress] [varchar](200) NULL,
PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
SET ANSI_PADDING OFF
create table MainCategory(
CategoryId int IDENTITY(1,1) not null primary key,
[MainCategory] [varchar](200) NULL)
The UI of the search tool has been modified . I have added another field called
MainCategory which tells us in which Category do I want to create a new entry.
Let me give a Demo how it works :
Let me hit a F5.
Add Category Tab:
In this tab I can simple add a new Category â€“ which would later help me Filter
links better . Add a Category say Multi Threading and Hit the Button.
Category gets added .
Add Item :
In this tab I can go and check the Category Combo box and find that the added
Category pops up .
Simply go ahead and add a new entry .
Entry is added to database .
Search Tab :
In this tab I can check on the Search Category Combo and choose the Main
Depending on the Main category , the sub titles would pop up in the Search Combo
Select the Sub Topic and click on Search . Note that the Url comes up as a
Hyperlink Button now so just go ahead and click on it . The page should open up
Great . Happy Coding .
In this article we have just extended the Windows Tool we created earlier . I
would want to add some other features to it . Guys let me know the ideas which