Está en la página 1de 59

1.

INTRODUCTION
1.1 PROBLEM DEFINITION
As technologies continue to evolve and new content distribution methods are
developed, there still remains a need to be able to handle, parse, manipulate, and
aggregate data. For example, suppose we want to aggregate the local weather for 10
business locations from a website you visit regularly. In order to accomplish such a task,
we would have to open a web browser, connect to the website, and run 10 queries
through the site's front-end in order to obtain the desired data. We handle this problem
with the use of RSS provided by the websites.
Another scenario is searching for contents spread among several million web
pages are common now a day.

Thus the basic unit for search and retrieval is an

individual content or file, even though information on a topic is often spread across
multiple pages. Search Engines list the pages they ranked according to the given
keyword. But the exact link to a file available on a website is not usually provided to the
user. Search Engines usually provide links to the page and the user has to navigate the
webpage and find the link to the file and gets downloaded.

1.2 COMPANY PROFILE


Softech Global Solutions was incorporated in the year 1996, as a software
services company. Since 1996, the company is involved in various activities like
Software Development, Systems Integration, Consultancy

Services and Corporate

Training etc.,. The Company is a high technology driven organization founded and
managed by efficient and highly respected visionaries with wide range of experience and
expertise in the IT related industry. Our company mission is to solve traditional business
problems in new ways and how to address the new set of issues that come with progress.
We have the technology and business expertise to make it a reality.
The company is specializing in the areas like Web development using J2EE
Technologies, .Net Technologies and so on. The company also involves in the areas like
client server technologies, distributed computing, data warehousing and WAP
technologies. The company has a software development centre at Chennai has a 24 X 7
support facility for our clients. The Company has its Corporate Office at: New No: 12,
United India Colony, 3rd Cross Street, Kodambakkam, Chennai - 600 024.
Our company is engaged in the activities of Software Development, Systems
Integration, Consultancy Services and Corporate Training. We have developed many Web
Portals, Application Products, Conversion Projects,

Maintenance Projects and a wide

range of mini ERP solutions to various medium range industries. Also we involved in
migration of applications from DOS based applications to GUI based applications.
We have developed some applications like Automation software for Super
Market, Software for Textile Industries, Software for Travel Industries and Account
Management Software for various companies. We have also set up web based intranet
solutions to its clients.

2. PROBLEM DESCRIPTION
This project entitled BEYOND SINGLE PAGE WEBSEARCH minimizes the
time spent on searching files and information on the internet. This project has been
developed using C#.NET as front end and XML file for storing the links retrieved.
This project has three modules,

Search Engine process

Single page retrieval

Manipulating RSS feeds

Search Engine Process:


The first module search engine process deals with extracting links from the
websites. This desktop based application uses Yahoo API for retrieving links from the
web pages. It gets the query from the user and passes this query to the search engine web
service and retrieves the links. This project accepts file formats like HTTP for web pages,
Video formats, News from various news providers, Images from web pages, local search
and provides spelling and keyword suggestions for exact search query.
Single Page Retrieval:
We usually not satisfy with the information provided by single web page. We refer
so many websites for same sort of information. Presently user has to visit many pages in
order to get the information for same query. This definitely takes more time to load. Our
technique retrieves content from many pages and stitches the information together and
provides to the user. We use threading function to load many pages and work behind so
that user will not identify the performance degrading and he can read information while
another page is loaded.
Manipulating RSS feeds:

RSS (Rich Site Summary) is a format for delivering regularly changing web
content. Many news-related sites, web blogs and other online publishers syndicate their
content as an RSS Feed to whoever wants it. RSS solves a problem for people who
regularly use the web. It allows you to easily stay informed by retrieving the latest
content from the sites you are interested in. You save time by not needing to visit each
site individually. You ensure your privacy, by not needing to join each site's email
newsletter. The number of sites offering RSS feeds is growing rapidly. We use XML file
to store the RSS feeds.
This project also has provision to save the links to the files this might be useful if
the user wants to download the file another time. This project has a internal browser and a
download manager, which downloads file asynchronously.
Downloader and Browser:
This project also has a facility to download a file and view html documents thru
the built in browser. Downloader gets the download link wherever the user selects
download this file and then downloads starts. User can select the download folder.
Browser displays the web pages using the link obtained from the search results.

3. SYSTEM STUDY
3.1 EXISTING SYSTEM
As technologies continue to evolve and new content distribution methods are
developed, there still remains a need to be able to handle, parse, manipulate, and
aggregate data. For example, suppose we want to aggregate the local weather for 10
business locations from a website you visit regularly. In order to accomplish such a task,
we would have to open a web browser, connect to the website, and run 10 queries
through the site's front-end in order to obtain the desired data. Existing system degrades
in search and takes more time.

3.2 PROPOSED SYSTEM


This project handles the uneasiness while searching for information. This project
searches many file types and bring the links directly to the user. It collects information
from many websites and produces to users. It has a built in downloader which handles all
the file downloads and performs asynchronous downloads. This definitely improves the
quality of search results and less time consuming.

3.3 DATAFLOW DIAGRAMS

USER INTERFACE

QUERY

SEARCH ENGINE
PROCESS

RSS FEEDS

PAGE COMPOSING

RSS MANIPULATION

PANEL DISPLAY

3.4 DATA DICTIONARY


SEARCH TYPE
Web
Local
News

URL of HTTP documents


Regional search
Links from various news providing
websites
Links for Video
Links for Images
Integrated content from many websites

Videos
Images
Integrated

SEARCH PARAMETERS
PARAMETERS
APP ID
QUERY
RESULTS
START
FORMAT
LANGUAGE

DATA TYPE
String
String
Short
Int
String
String

DESCRIPTION
Web service identifies our application
Search Query
No of results perpage
Starting No for URL
File Format to be retrieved
Language results will be displayed

WEB RESPONSE
TITLE
SUMMARY
URL
ADDRESS

Title of the WebPage


Short Description found on Meta tags
URL link
Address for Local Search

RSS XML File


Group ID
Feed ID
Feed URL

Represents Similar Rss feeds


Identity for a Feed
URL for a Feed

Feed Created
Feed Viewed

Date feed was created


No of times feed was viewed

4. SYSTEM CONFIGURATION
4.1 HARDWARE SPECIFICATION
Processor

Pentium III and above

Main Memory

256 MB RAM

Processing Speed :

500 MHZ

Hard disk Drive

40 GB

Monitor

15inches CRT Color Monitor

Key Board

104 keys

Mouse

3 Button Serial Mouse

4.2 SOFTWARE SPECIFICATION


Operating System : Microsoft Windows XP
IDE

: Microsoft Visual Studio 2005

Front End

: CSharp 2.0(c#.net)(2005)

5. OVERVIEW OF THE SOFTWARE

THE .NET PLATFORM

Microsoft .NET is Microsoft's new Internet strategy.

.NET was originally called NGWS.

NGWS - Next Generation Windows Services

The Microsoft. NET is Microsoft's new Internet and Web strategy

.NET is a new Internet and Web based infrastructure

.NET delivers software as Web Services

.NET is a framework for universal services

.NET is a server centric computing model

.NET will run in any browser on any platform

.NET is based on the newest Web standards

.NET Internet Standards

.NET is built on the following Internet standards:

HTTP, the communication protocol between Internet Applications

XML, the format for exchanging data between Internet Applications

SOAP, the standard format for requesting Web Services

UDDI, the standard to search and discover Web Services

10

.NET FRAMEWORK

The .NET Framework is the infrastructure for the new Microsoft .NET Platform.

The .NET Framework is a common environment for building, deploying, and


running Web Services and Web Applications.

The .NET Framework contains common class libraries - like ADO.NET,


ASP.NET and Windows Forms - to provide advanced standard services that can
be integrated into a variety of computer systems.

The .NET Framework is language neutral. Currently it supports C++, C#, Visual
Basic, JScript (The Microsoft version of JavaScript) and COBOL. Third-party
languages - like Eiffel, Perl, Python, Smalltalk, and others - will also be available
for building future .NET Framework applications.

The new Visual Studio.NET is a common development environment for the


new .NET Framework. It provides a feature-rich application execution
environment, simplified development and easy integration between a number of
different development languages.

The .NET plan includes a new version of the Windows operating system, a new
version of Office, and a variety of new development software for programmers to
build Web-based applications.

The background for .NET is part of Microsoft's new strategy to keep Windows the
dominant operating system in the market, as computing begins to move away

11

from desktop computers toward Internet enabled devices, such as hand-held


computers and cell phones.
The most visual components of the new .NET framework are the new Internet
Information Server 6.0, with ASP.NET and ADO.NET support, Visual Studio.NET
software tools to build Web-based software, and new XML support in the SQL Server
2000 database.

C#.NET

As part of the lineage of C-based languages, C# has incorporated and exploited


programming language features with a proven record of success and familiarity. To that
end, most syntactic features of C# are borrowed from C/C++, and most of its objectoriented concepts, such as garbage collection, reflection, the root class, and the multiple
inheritance of interfaces, are inspired by Java. Improvements in C# over Java, often with
syntax simplification, have been applied to iteration, properties, events, metadata,
versioning, and the conversion between simple types and objects.
In addition to being syntactically familiar, C# is strongly typed, architecturally
neutral, portable, safe, and multi-threaded. Type security in C# is supported in a
numberof ways, including initializing variables before their use, eliminating dangerous
explicittype conversions, controlling the limits in arrays, and checking the overflow of
type limitsduring arithmetic operations. Its architecturally neutral intermediate format,
implemented as the Common Intermediate Language (CIL) and executed on a virtual
machine, makesC# portable and independent of its running environment. C# is also safe.
It controls access to hardware and memory resources, checks classes at runtime, and does
not allow the implicit usage and manipulation of pointers (as C/C++ do).
12

The explicit use of pointers, on the other hand, is restricted to sections of code
that have been designated as unsafe. With the support of a garbage collector, frustrating
memory leaks and dangling pointers are a non-issue. The C# language also supports
multi-threading in order to promote efficient interactive applications such as graphics,
input/output, and so on. Other modern features in C# include Just-in-Time (JIT)
compilation from bytecode to native code, exceptions for error handling, namespaces for
preventing type collisions, and documentation comments

C# FEATURES

There are no global variables or functions. All methods and members must be
declared within classes. It is possible, however, to use static methods/variables
within public classes instead of global variables/functions.

C# supports a strict boolean type, bool. Statements that take conditions, such as
while and if, require an expression of a boolean type. While C++ also has a
boolean type, it can be freely converted to and from integers, and expressions
such as if(a) require only that a is convertible to bool, allowing a to be an int, or a
pointer.

In C#, memory address pointers can only be used within blocks specifically
marked as unsafe, and programs with unsafe code need appropriate permissions to
run. Most object access is done through safe references, which cannot be made
invalid. An unsafe pointer can point to an instance of a value-type, array, string, or
a block of memory allocated on a stack. Code that is not marked as unsafe can
still store and manipulate pointers through the System.IntPtr type, but cannot
dereference them.

13

Managed memory cannot be explicitly freed, but is automatically garbage


collected. Garbage collection addresses memory leaks. C# also provides direct
support for deterministic finalization with the using statement (supporting the
Resource Acquisition Is Initialization idiom).

Multiple inheritance is not supported, although a class can implement any number
of interfaces. This was a design decision by the language's lead architect to avoid
complication.

C# is more typesafe than C++. The only implicit conversions by default are those
which are considered safe, such as widening of integers and conversion from a
derived type to a base type. This is enforced at compile-time, during JIT, and, in
some cases, at runtime.

C# also support interface, a mean of making a contract with a class for services
that the interface stipulates. C# a class inherits from only a single parent, but a
class can implement multiple interfaces.

C# also provides support for structs, a concept whose meaning has changed
significantly form c++. A struct cant inherit from a class or be inherited form ,
but a struct can implement an interface in the world of Generics.

C# provides full support of delegates to provides invocation of methods through


indirection but delegates are type-safe reference types thus encapsulate methods
with specific signature and return types. Delegates have been extended greatly.

C# provides component-oriented features such as properties, events, declarative,


constructs.

14

6. DESIGN AND DEVELOPMENT


6.1 ARCHITECTURAL DESIGN

15

BEYONG SINGLE PAGE


WEBSEARCH RESULTS

SEARCH

RSS READER
NEW
WEB

EDIT
IMAGES

VIEW
VIDEO

DELETE

NEWS
LOCAL
INTEGRATION

BROWSER

DOWNLOADER

7. IMPLEMENTATION AND TESTING

16

PERFORMANCE TESTING
Performance has always been a great concern and a driving force of computer evolution.
Performance evaluation of a software system usually includes: resource usage,
throughput, stimulus-response time and queue lengths detailing the average or maximum
number of tasks waiting to be serviced by selected resources. Typical resources that need
to be considered include network bandwidth requirements, CPU cycles, disk space, disk
access operations, and memory usage. The goal of performance testing can be
performance bottleneck identification, performance comparison and evaluation, etc.
This project performs well since it uses multithreading to search for information
while the user reads some other information. It uses minimum resources, gives stimulus
responses.
RELIABILITY TESTING
Software reliability refers to the probability of failure-free operation of a system.
It is related to many aspects of software, including the testing process. Directly
estimating software reliability by quantifying its related factors can be difficult. Testing is
an effective sampling method to measure software reliability. Guided by the operational
profile, software testing (usually black-box testing) can be used to obtain failure data, and
an estimation model can be further used to analyze the data to estimate the present
reliability and predict future reliability. Therefore, based on the estimation, the developers
can decide whether to release the software, and the users can decide whether to adopt and
use the software.

17

18

8. CONCLUSION
19

This project entitled BEYOND SINGLEPAGE WEBSEARCH improves search


the performance and the way of producing the results to the users. And the RSS feed
aggregator minimizes the net surfing by providing the immediate changes in the website
to our desktop application. This project can be enhanced to give query to many search
engines and rank them and produce the well refined search results, called Meta Search
Application.

20

REFERENCES

BOOKS

S.NO:
1.
2.

AUTHOR :
Matthew
MacDonald and
Mario Szpuszta,
Andrew Troelsen

TITLE:
Pro ASP.NET 2.0 in Csharp 2005

PUBLICATION:
Apress

Pro.C.Sharp.with.dot.NET.3.0.

Apress

WEBSITE
www.codeproject.com

21

ANNEXURE

A. SOURCE CODE
Main Form
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Text;
System.Windows.Forms;
System.Threading;
System.Collections;
System.Net;
Yahoo.API;

namespace BeyondSinglePage
{
public partial class MainWindow : Form
{
private SearchType searchType;
private Search search;
private DataSet dsResults;
private byte pageno=0;
bool checkInternet;
FileDownloader downloader;
private integrate Integrate;
public MainWindow()
{
InitializeComponent();
dsResults = new DataSet();
searchType = SearchType.web;
btnNext.Enabled = false;
btnPrevious.Enabled = false;
grpResults.Visible = false;
downloader = new FileDownloader();
images1.Visible = false;
Integrate = new integrate();

private void toolStripButtonBack_Click(object sender, EventArgs e)


{
if (this.webBrowser1.CanGoBack)

22

{
}

this.webBrowser1.GoBack();

private void toolStripButtonNext_Click(object sender, EventArgs e)


{
if (this.webBrowser1.CanGoForward)
{
this.webBrowser1.GoForward();
}
}
private void toolStripButtonReload_Click(object sender, EventArgs e)
{
this.webBrowser1.Refresh(WebBrowserRefreshOption.Normal);
}
private void toolStripButtonStop_Click(object sender, EventArgs e)
{
this.webBrowser1.Stop();
}
private void toolStripButtonGo_Click(object sender, EventArgs e)
{
this.webBrowser1.Navigate(toolStripTextBoxAddress.Text);
}
private void toolStripTextBoxAddress_TextChanged(object sender,
EventArgs e)
{
this.webBrowser1.Navigate(toolStripTextBoxAddress.Text);
}
private void toolStripTextBoxAddress_Leave(object sender, EventArgs e)
{
this.webBrowser1.Navigate(toolStripTextBoxAddress.Text);
}
private void webBrowser1_Navigating(object sender,
WebBrowserNavigatingEventArgs e)
{
toolStripStatusLabel1.Text = webBrowser1.StatusText;
}
private void toolStripTextBoxAddress_KeyDown(object sender,
KeyEventArgs e)
{
if(e.KeyCode==Keys.Enter)
this.webBrowser1.Navigate(toolStripTextBoxAddress.Text);
}
private void webBrowser1_Navigated(object sender,
WebBrowserNavigatedEventArgs e)
{
toolStripStatusLabel1.Text = webBrowser1.Url.ToString();

23

}
private void buttonDoSearch_Click(object sender, EventArgs e)
{
if (this.txtSearchTerm.Text != String.Empty)
{
search = new Search();
callSearch();
btnNext.Enabled = true;
grpResults.Visible = true;
}
else
{

MessageBox.Show("Enter Keyword and Try Again",


"Search", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}

private void setFileType(object sender, EventArgs e)


{
switch (int.Parse(((RadioButton)sender).Tag.ToString()))
{
case 1:
searchType = SearchType.web;
break;
case 2:
searchType = SearchType.video;
break;
case 3:
searchType = SearchType.news;
break;
case 4:
searchType = SearchType.images;
break;
case 5:
searchType = SearchType.local;
break;
case 6:
searchType = SearchType.integrated;
break;
}
pageno = 0;
}
private void btnPrevious_Click(object sender, EventArgs e)
{
if (pageno > 0)
{
pageno--;
callSearch();
btnPrevious.Enabled = true;

24

}
else

btnPrevious.Enabled = false;

}
private void btnNext_Click(object sender, EventArgs e)
{
pageno++;
callSearch();
if (pageno > 0)
btnPrevious.Enabled = true;
}
private void callSearch()
{
dsResults = search.GetSearchTerms(txtSearchTerm.Text,
searchType, pageno);
if (searchType == SearchType.images)
images1.getUrls(dsResults.Tables[0]);
else if (searchType == SearchType.integrated)
{
Integrate.getUrls(dsResults.Tables[0]);
this.webBrowser1.Navigate("c:\\a.html");
this.mainTab.SelectedTab = tabBrowser;
}
else
dataGridView1.DataSource = dsResults.Tables[0];
}
private void closeResultsToolStripMenuItem_Click(object sender,
EventArgs e)
{
this.grpResults.Visible = false;
}
private void selectAllToolStripMenuItem_Click(object sender,
EventArgs e)
{
this.dataGridView1.SelectAll();
}
private void downloadSelectedToolStripMenuItem_Click(object sender,
EventArgs e)
{
downloadSelected();
}
private void viewInBrowserToolStripMenuItem_Click(object sender,
EventArgs e)
{
string
url=this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
webBrowser1.Navigate(url);
toolStripTextBoxAddress.Text = url;

25

mainTab.SelectedTab = this.tabBrowser;

private void downloadSelected()


{
int i;
try
{
int[] selectedIndices = new int[10];
for (i = 0; i < dataGridView1.SelectedRows.Count; i++)
selectedIndices[i] =
this.dataGridView1.CurrentRow.Index;
txtFileUrl.Text=
this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
mainTab.SelectedTab = tabDownloads;
}
catch
{
}
}
private void btnDownload_Click(object sender, EventArgs e)
{
try
{
downloader.DownloadCompleted += new
EventHandler<FileDownloadCompletedEventArgs>(downloader_DownloadComplete
d);
downloader.DownloadProgressChanged += new
EventHandler<FileDownloadProgressChangedEventArgs>(downloader_DownloadPr
ogressChanged);
downloader.DownloadStatusChanged += new
EventHandler<FileDownloadStatusChangedEventArgs>(downloader_DownloadStat
usChanged);
downloader.Download(txtFileUrl.Text);
}
catch (Exception ex)
{
txtStatus.Text += ex.Message +
System.Environment.NewLine;
}
}
private void btnAsync_Click(object sender, EventArgs e)
{
try
{
txtStatus.Text = String.Empty;
downloader = new FileDownloader();
downloader.DownloadCompleted += new
EventHandler<FileDownloadCompletedEventArgs>(downloader_DownloadComplete
d);

26

downloader.DownloadProgressChanged += new
EventHandler<FileDownloadProgressChangedEventArgs>(downloader_DownloadPr
ogressChanged);
downloader.DownloadStatusChanged += new
EventHandler<FileDownloadStatusChangedEventArgs>(downloader_DownloadStat
usChanged);
downloader.DownloadAsync(txtFileUrl.Text);
}
catch (Exception ex)
{
txtStatus.Text += ex.Message +
System.Environment.NewLine;
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
try
{
downloader.DownloadAsyncCancel();
}
catch
{
}

private void downloader_DownloadCompleted(object sender,


FileDownloadCompletedEventArgs e)
{
this.progressBar1.Value = 0;
if (e.Canceled)
{
txtStatus.Text += "Download cancelled." +
System.Environment.NewLine;
}
else
{
txtStatus.Text += "Download complete." +
System.Environment.NewLine;
txtStatus.Text += "Downloaded to: " + e.Result +
System.Environment.NewLine;
}
if (e.Error != null)
{
txtStatus.Text += e.Error.Message +
System.Environment.NewLine;
}
txtStatus.Refresh();
}
private void downloader_DownloadProgressChanged(object sender,
FileDownloadProgressChangedEventArgs e)
{
this.progressBar1.Value = e.ProgressPercentage;
}

27

private void downloader_DownloadStatusChanged(object sender,


FileDownloadStatusChangedEventArgs e)
{
txtStatus.Text += e.Message + System.Environment.NewLine;
txtStatus.Refresh();
}
}
}

Search.cs

28

using
using
using
using
using

System;
System.Collections.Generic;
System.Text;
Yahoo.API;
System.Data;

namespace BeyondSinglePage
{
class Search
{
private YahooSearchService yahoo;
public DataSet GetSearchTerms(string searchTerm,SearchType
type,byte pageno)
{
DataSet dsStoreResults = new DataSet();
DataTable dtStoreResults = new DataTable();
dsStoreResults.Tables.Add(dtStoreResults);
DataColumn dcTitle = new
DataColumn("Title",Type.GetType("System.String"));
DataColumn dcSummary = new DataColumn("Summary",
Type.GetType("System.String"));
DataColumn dcUrl = new DataColumn("Url",
Type.GetType("System.String"));
dtStoreResults.Columns.Add(dcTitle);
dtStoreResults.Columns.Add(dcSummary);
dtStoreResults.Columns.Add(dcUrl);
DataRow dr = null;
yahoo = new YahooSearchService();
switch (type)
{
case SearchType.web:
Yahoo.API.WebSearchResponse.ResultSet resultset =
yahoo.WebSearch("sample", searchTerm, "all",10, pageno*10+1, "any",
true, true, "en");
foreach (Yahoo.API.WebSearchResponse.ResultType
resultType in resultset.Result)
{
dr=dtStoreResults.NewRow();
dr[0] = resultType.Title.ToString();
dr[1] = resultType.Summary.ToString();
dr[2] = resultType.Url.ToString();
dtStoreResults.Rows.Add(dr);
}
break;
case SearchType.local:
yahoo = new YahooSearchService();
Yahoo.API.LocalSearchResponse.ResultSet resultSet =
yahoo.LocalSearch("sample", searchTerm, 10, pageno * 10 + 1,
(float)10.0, "", "Trichy", "Tamil Nadu", "", "");
foreach (Yahoo.API.LocalSearchResponse.ResultType
resultType in resultSet.Result)
{
dr = dtStoreResults.NewRow();
dr[0] = resultType.Title.ToString();
dr[1] = resultType.Address.ToString();
dr[2] = resultType.Url.ToString();

29

dtStoreResults.Rows.Add(dr);
}
break;
case SearchType.images:
yahoo = new YahooSearchService();
Yahoo.API.ImageSearchResponse.ResultSet resultSet1 =
yahoo.ImageSearch("sample", searchTerm, "all", 10, pageno * 10, "any",
true);
foreach (Yahoo.API.ImageSearchResponse.ResultType
resultType in resultSet1.Result)
{
dr = dtStoreResults.NewRow();
dr[0] = resultType.Title.ToString();
dr[1] = resultType.Summary.ToString();
dr[2] = resultType.Url.ToString();
dtStoreResults.Rows.Add(dr);
}
break;
case SearchType.video:
yahoo = new YahooSearchService();
Yahoo.API.VideoSearchResponse.ResultSet resultSet2 =
yahoo.VideoSearch("sample", searchTerm, "all", 10, pageno * 10, "any",
true);
foreach (Yahoo.API.VideoSearchResponse.ResultType
resultType in resultSet2.Result)
{
dr = dtStoreResults.NewRow();
dr[0] = resultType.Title.ToString();
dr[1] = resultType.Summary.ToString();
dr[2] = resultType.Url.ToString();
dtStoreResults.Rows.Add(dr);
}
break;
case SearchType.news:
yahoo = new YahooSearchService();
Yahoo.API.NewsSearchResponse.ResultSet resultSet3 =
yahoo.NewsSearch("sample", searchTerm, "all", 10, pageno * 10, "rank",
"en");
foreach (Yahoo.API.NewsSearchResponse.ResultType
resultType in resultSet3.Result)
{
dr = dtStoreResults.NewRow();
dr[0] = resultType.Title.ToString();
dr[1] = resultType.Summary.ToString();
dr[2] = resultType.Url.ToString();
dtStoreResults.Rows.Add(dr);
}
break;
case SearchType.integrated:
Yahoo.API.WebSearchResponse.ResultSet resultset4 =
yahoo.WebSearch("sample", searchTerm, "all", 10, pageno * 10 + 1, "any",
true, true, "en");
foreach (Yahoo.API.WebSearchResponse.ResultType
resultType in resultset4.Result)

30

dr = dtStoreResults.NewRow();
dr[0] = resultType.Title.ToString();
dr[1] = resultType.Summary.ToString();
dr[2] = resultType.Url.ToString();
dtStoreResults.Rows.Add(dr);

}
break;
}
return dsStoreResults;
}

}
}

Image.cs

31

using
using
using
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.ComponentModel;
System.Drawing;
System.Data;
System.Text;
System.Windows.Forms;
System.Net;
System.IO;
System.Threading;

namespace BeyondSinglePage
{
public partial class images : UserControl
{
string[] urls = new string[10];
public images()
{
InitializeComponent();
}
public void getUrls(DataTable dt)
{
for(int i=0;i<10;i++)
urls[i] = dt.Rows[i][2].ToString();
Thread t1 =
Thread t2 =
Thread t3 =
Thread t4 =
Thread t5 =
t1.Start();
t2.Start();
t3.Start();
t4.Start();
t5.Start();

new
new
new
new
new

Thread(new
Thread(new
Thread(new
Thread(new
Thread(new

ThreadStart(getImage));
ThreadStart(getImage1));
ThreadStart(getImage2));
ThreadStart(getImage3));
ThreadStart(getImage4));

}
private void images_Load(object sender, EventArgs e)
{
}
private void getImage()
{
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(urls[0]);
HttpWebResponse response =
(HttpWebResponse)request.GetResponse();
Stream str = response.GetResponseStream();
pictureBox1.Image= Image.FromStream(str);
pictureBox1.Tag = urls[0];
}
private void getImage1()
{

32

HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(urls[1]);
HttpWebResponse response =
(HttpWebResponse)request.GetResponse();
Stream str = response.GetResponseStream();
pictureBox2.Image = Image.FromStream(str);
pictureBox2.Tag = urls[1];
}
private void getImage2()
{
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(urls[2]);
HttpWebResponse response =
(HttpWebResponse)request.GetResponse();
Stream str = response.GetResponseStream();
pictureBox3.Image = Image.FromStream(str);
pictureBox3.Tag = urls[2];
}
private void getImage3()
{
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(urls[3]);
HttpWebResponse response =
(HttpWebResponse)request.GetResponse();
Stream str = response.GetResponseStream();
pictureBox4.Image = Image.FromStream(str);
pictureBox4.Tag = urls[3];
}
private void getImage4()
{
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(urls[4]);
HttpWebResponse response =
(HttpWebResponse)request.GetResponse();
Stream str = response.GetResponseStream();
pictureBox5.Image = Image.FromStream(str);
pictureBox5.Tag = urls[4];
}

RSS FEEDS
public void LoadFeedTree()
{
try

33

int nCurrentGroupNodeIndex=0;
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strBaseDir);
//clear existing nodes
trvFeed.Nodes[0].Nodes.Clear();

for(int
i=0;i<xDoc.DocumentElement.ChildNodes.Count;i++)
{
//Create Group Nodes
TreeNode tnGroup=new
TreeNode(xDoc.DocumentElement.ChildNodes[i].Attributes["id"].Value);
tnGroup.Tag = "Group" +
xDoc.DocumentElement.ChildNodes[i].Attributes["id"].Value;
tnGroup.ImageIndex=4;
tnGroup.SelectedImageIndex=4;
trvFeed.Nodes[0].Nodes.Add(tnGroup);
//trvFeed.Nodes[0].Expand();
//create child nodes for group
string
strSearchXPath="Library/Group[@id='" +
xDoc.DocumentElement.ChildNodes[i].Attributes["id"].Value + "']";
CreateFeedNodes(strSearchXPath,
nCurrentGroupNodeIndex);
nCurrentGroupNodeIndex=nCurrentGroupNodeIndex+1;
}
}
catch(Exception e)
{
MessageBox.Show(e.Message + ":" + e.StackTrace);
}
}
public void CreateFeedNodes(string strSearchXPath, int
nCurrentGroupNodeIndex)
{
try
{
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strBaseDir);
XmlNodeList
xnListFeeds=xDoc.SelectSingleNode(strSearchXPath).ChildNodes;
foreach (XmlNode xNode in xnListFeeds)
{
//Create Feed Nodes
TreeNode tnFeed=new
TreeNode(xNode.Attributes["id"].Value);

34

if(xNode.Attributes[1].Name.Equals("URL"))
{
tnFeed.Tag = "URL:" +

xNode.Attributes["URL"].Value;

tnFeed.ImageIndex=2;
tnFeed.SelectedImageIndex=2;
}
else
if(xNode.Attributes[1].Name.Equals("SITE"))
{
tnFeed.Tag = "SITE:" +
xNode.Attributes["SITE"].Value;
tnFeed.ImageIndex=3;
tnFeed.SelectedImageIndex=3;
}
trvFeed.Nodes[0].Nodes[nCurrentGroupNodeIndex].Nodes.Add(tnFeed);
//trvFeed.Nodes[0].Nodes[nCurrentGroupNode
Index].Expand();
trvFeed.Nodes[0].Nodes[nCurrentGroupNodeIndex].EnsureVisible();
}
trvFeed.Nodes[0].Nodes[nCurrentGroupNodeIndex].Text =
trvFeed.Nodes[0].Nodes[nCurrentGroupNodeIndex].Text + " (" +
trvFeed.Nodes[0].Nodes[nCurrentGroupNodeIndex].Nodes.Count.ToString() +
")";
}
catch(Exception e)
{
MessageBox.Show(e.Message + ":" + e.StackTrace);
}
}
e)

private void mnuGroup_Click(object sender, System.EventArgs


{

try
{

frmAddGroup frmGroup=new frmAddGroup();

if(frmGroup.ShowDialog().Equals(DialogResult.OK))
{
if(!strNewGroup.Trim().Equals(""))
{
bool bFound=false;
for(int
i=0;i<trvFeed.Nodes[0].Nodes.Count;i++)
{

if(trvFeed.Nodes[0].Nodes[i].Text.ToLower().Equals(strNewGroup.Trim().To
Lower()))

35

{
}

bFound=true;
break;

}
if(!bFound)
{
//Filtering the Unwanted chars
to make the node text XML coplient
strNewGroup=strNewGroup.Trim(strGroupTextFilter.ToCharArray());
TreeNode tnGroup=new

TreeNode(strNewGroup);

tnGroup.Tag="Group" +

strNewGroup.Trim();

tnGroup.ImageIndex=4;
tnGroup.SelectedImageIndex=4;
trvFeed.Nodes[0].Nodes.Add(tnGroup);
trvFeed.Nodes[0].Expand();
trvFeed.Nodes[0].EnsureVisible();
AddGroupNodeToXMLLibrary(strNewGroup.Trim());
}

ex.StackTrace);
}

}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message + ":" +
}

private void mnuNewFeed_Click(object sender,


System.EventArgs e)
{
try
{
frmAddFeed frmFeed=new frmAddFeed();
if(frmFeed.ShowDialog().Equals(DialogResult.OK))
{
if(!strNewFeed.Trim().Equals(""))
{
bool bFound=false;
for(int
i=0;i<trvFeed.SelectedNode.Nodes.Count;i++)
{

36

if(trvFeed.SelectedNode.Nodes[i].Text.ToLower().Equals(strNewFeed.Trim()
.ToLower()))
{
bFound=true;
break;
}
}

to make the node text XML coplient

if(!bFound)
{
//Filtering the Unwanted chars

strNewFeed=strNewFeed.Trim(strFeedTextFilter.ToCharArray());
TreeNode tnFeed=new
TreeNode(strNewFeed);

tnFeed.Tag="URL:" +

strNewFeedURL.Trim();

tnFeed.ImageIndex=2;
tnFeed.SelectedImageIndex=2;

trvFeed.SelectedNode.Nodes.Add(tnFeed);
trvFeed.SelectedNode.Expand();
trvFeed.SelectedNode.EnsureVisible();
strCurrentSelectedNodeTag="URL:" + strNewFeedURL.Trim();
int
nFilterCharIndex=trvFeed.SelectedNode.Text.LastIndexOf(" (");
string
strGroupNodeText=trvFeed.SelectedNode.Text;
if(nFilterCharIndex>=0)
{
strGroupNodeText=trvFeed.SelectedNode.Text.Substring(0,nFilterCharIndex)
;
}
AddFeedNodeToXMLLibrary(strGroupNodeText,strNewFeed.Trim(),strNewFeedURL
.Trim());
trvFeed.SelectedNode.Text =
strGroupNodeText + " (" + trvFeed.SelectedNode.Nodes.Count.ToString() +
")";
FetchFeedInfo(strNewFeedURL.Trim(),"item");
}
}
}
}

37

ex.StackTrace);
}

catch(Exception ex)
{
MessageBox.Show(ex.Message + ":" +
}

private void trvFeed_AfterSelect(object sender,


System.Windows.Forms.TreeViewEventArgs e)
{
if(e.Node.Tag.ToString().IndexOf("Main")!=-1)
{
mnuGroup.Enabled=true;
}
else
{
mnuGroup.Enabled=false;
}
if(e.Node.Tag.ToString().IndexOf("Group")!=-1)
{
mnuNewFeed.Enabled=true;
mnuNewSite.Enabled=true;
}
else
{
mnuNewFeed.Enabled=false;
mnuNewSite.Enabled=false;
}
if(e.Node.Tag.ToString().IndexOf("URL:")!=-1)
{
if(!
strCurrentSelectedNodeTag.Equals(e.Node.Tag.ToString()))
{
strCurrentSelectedNodeTag=e.Node.Tag.ToString();

FetchFeedInfo(e.Node.Tag.ToString().Substring(e.Node.Tag.ToString().Inde
xOf("URL:")+4) ,"item");
//update the view History for the node begin
//feed
int
nFilterCharIndex=e.Node.Parent.Text.LastIndexOf(" (");
string strGroupText=e.Node.Parent.Text;
if(nFilterCharIndex>=0)
{
strGroupText=strGroupText.Substring(0,nFilterCharIndex);
}
string strChildText=e.Node.Text;
UpdateNodeViewHistory(strGroupText,
strChildText,true);

38

//update the view History for the node -

end

}
}
if(e.Node.Tag.ToString().IndexOf("SITE:")!=-1)
{
if(!
strCurrentSelectedNodeTag.Equals(e.Node.Tag.ToString()))
{
strCurrentSelectedNodeTag=e.Node.Tag.ToString();

FetchSiteInfo(e.Node.Text,e.Node.Tag.ToString().Substring(e.Node.Tag.ToS
tring().IndexOf("SITE:")+5));
//update the view History for the node begin
//site
int
nFilterCharIndex=e.Node.Parent.Text.LastIndexOf(" (");
string strGroupText=e.Node.Parent.Text;
if(nFilterCharIndex>=0)
{
strGroupText=strGroupText.Substring(0,nFilterCharIndex);
}
string strChildText=e.Node.Text;
UpdateNodeViewHistory(strGroupText,
strChildText,false);
//update the view History for the node end
//Load the view History to the Listviewbegin
LoadNodeViewHistory(strGroupText,
strChildText,false);
//Load the view History to the Listviewend
}
}
}
private void dgFeed_DoubleClick(object sender,
System.EventArgs e)
{
}
public void FetchFeedInfo(string strFeedURL, string
SearchNodeText)
{
try
{
if(!SearchNodeText.Trim().Equals(""))
{
ClearFeedList();

39

this.Cursor=Cursors.WaitCursor;
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strFeedURL);
//xDoc.Load("http://msdn.microsoft.com/rss
.xml");

//xDoc.Load("http://surya.somee.com/rss/rs

s.xml");

XmlNodeList xnList=
xDoc.DocumentElement["channel"].SelectNodes(SearchNodeText);
foreach(XmlNode xNode in xnList)
{
ListViewItem lstFeedItem=new
ListViewItem();
for(int
i=0;i<xNode.ChildNodes.Count;i++)
{
//lstFeedItem.Text=Convert.ToS
tring(lstvFeed.Items.Count+1);
lstFeedItem.ImageIndex=0;
if(i==0)
{
lstFeedItem.SubItems.Add(xNode.ChildNodes[0].InnerText);
lstFeedItem.SubItems.Add("");
lstFeedItem.SubItems.Add("");
lstFeedItem.SubItems.Add("");
}
if(i==1)
{
lstFeedItem.SubItems.Add(xNode.ChildNodes[1].InnerText.Substring(0,10));
}
if(i==2)
{
lstFeedItem.SubItems.Add(xNode.ChildNodes[2].InnerText);
lstFeedItem.Tag=
xNode.ChildNodes[2].InnerText;
}
}
lstvFeed.Items.Add(lstFeedItem);
}
this.Cursor=Cursors.Default;
//navigate to the first item
if(lstvFeed.Items.Count>0)
{
Object o=null;
lstvFeed.Items[0].Selected=true;

40

axWebBrowserFeed.Navigate(lstvFeed.SelectedItems[0].Tag.ToString(),ref
o,ref o,ref o,ref o);
}
}
else
{

//

}
catch(Exception ex)
{
this.Cursor=Cursors.Default;
MessageBox.Show(ex.Message + " : " +
ex.StackTrace);

strSiteURL)

public void FetchSiteInfo(string strSiteName, string


{

o,ref o,ref o);

ex.StackTrace);

try
{

ClearFeedList();
this.Cursor=Cursors.WaitCursor;
//navigate to the first item
Object o=null;
axWebBrowserFeed.Navigate(strSiteURL,ref o,ref

this.Cursor=Cursors.Default;
}
catch(Exception ex)
{
this.Cursor=Cursors.Default;
MessageBox.Show(ex.Message + " : " +
}

}
private void lstvFeed_DoubleClick(object sender,
System.EventArgs e)
{
Object o=null;

axWebBrowserFeed.Navigate(lstvFeed.SelectedItems[0].Tag.ToString(),ref
o,ref o,ref o,ref o);
}

public void ClearFeedList()

41

lstvFeed.Items.Clear();

public void AddGroupNodeToXMLLibrary(string strNodeText)


{
try
{
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strBaseDir);
XmlElement eGroup=xDoc.CreateElement("Group");
xDoc.DocumentElement.AppendChild(eGroup);
//attribute - id
XmlAttribute xaId=xDoc.CreateAttribute("id");
xaId.Value=strNodeText;
eGroup.SetAttributeNode(xaId);
xDoc.Save(strBaseDir);
}
catch(Exception e)
{
MessageBox.Show(e.Message + ":" + e.StackTrace);
}
}
public void AddFeedNodeToXMLLibrary(string strGroupNodeText,
string strFeedNodeText,string strURL)
{
try
{
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strBaseDir);
string strSearchXPath="Library/Group[@id='" +
strGroupNodeText + "']";

XmlElement eFeed=xDoc.CreateElement("Feed");

xDoc.SelectSingleNode(strSearchXPath).AppendChild(eFeed);
//attribute - Id
XmlAttribute xaId=xDoc.CreateAttribute("id");
xaId.Value=strFeedNodeText;
eFeed.SetAttributeNode(xaId);
//attribute - URL
XmlAttribute xaURL=xDoc.CreateAttribute("URL");
xaURL.Value=strURL;
eFeed.SetAttributeNode(xaURL);
//attribute - created
XmlAttribute
xaCreated=xDoc.CreateAttribute("created");

42

xaCreated.Value=DateTime.Now.ToShortDateString();
eFeed.SetAttributeNode(xaCreated);
//attribute - Viewed
XmlAttribute
xaViewed=xDoc.CreateAttribute("viewed");
xaViewed.Value="1";
eFeed.SetAttributeNode(xaViewed);
xDoc.Save(strBaseDir);
}
catch(Exception e)
{
MessageBox.Show(e.Message + ":" + e.StackTrace);
}
}
public void AddSiteNodeToXMLLibrary(string
strGroupNodeText,string strSiteNodeText,string strSiteURL)
{
try
{
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strBaseDir);
string strSearchXPath="Library/Group[@id='" +
strGroupNodeText.Substring(strGroupNodeText.IndexOf(" (")+1) + "']";
XmlElement eSite=xDoc.CreateElement("Site");
xDoc.SelectSingleNode(strSearchXPath).AppendChild(eSite);
//attribute - Id
XmlAttribute xaId=xDoc.CreateAttribute("id");
xaId.Value=strSiteNodeText;
eSite.SetAttributeNode(xaId);
//attribute - URL
XmlAttribute xaURL=xDoc.CreateAttribute("SITE");
xaURL.Value=strSiteURL;
eSite.SetAttributeNode(xaURL);
//attribute - created
XmlAttribute
xaCreated=xDoc.CreateAttribute("created");
xaCreated.Value=DateTime.Now.ToShortDateString();
eSite.SetAttributeNode(xaCreated);
//attribute - Viewed
XmlAttribute
xaViewed=xDoc.CreateAttribute("viewed");
xaViewed.Value="1";
eSite.SetAttributeNode(xaViewed);

43

xDoc.Save(strBaseDir);
}
catch(Exception e)
{
MessageBox.Show(e.Message + ":" + e.StackTrace);
}
}
e)

private void lstvFeed_Click(object sender, System.EventArgs


{

if(!
lstvFeed.SelectedItems[0].Tag.ToString().Trim().Equals(""))
{
Object o=null;

axWebBrowserFeed.Navigate(lstvFeed.SelectedItems[0].Tag.ToString(),ref
o,ref o,ref o,ref o);
}
}
private void mnuNewSite_Click(object sender,
System.EventArgs e)
{
try
{
frmAddSite frmSite=new frmAddSite();
if(frmSite.ShowDialog().Equals(DialogResult.OK))
{
if(!strNewSite.Trim().Equals(""))
{
bool bFound=false;
for(int
i=0;i<trvFeed.SelectedNode.Nodes.Count;i++)
{

if(trvFeed.SelectedNode.Nodes[i].Text.ToLower().Equals(strNewSite.Trim()
.ToLower()))
{
bFound=true;
break;
}
}

to make the node text XML coplient

if(!bFound)
{
//Filtering the Unwanted chars

strNewSite=strNewSite.Trim(strSiteTextFilter.ToCharArray());

44

TreeNode tnSite=new
TreeNode(strNewSite);

tnSite.Tag="SITE:" +

strNewSiteURL.Trim();

tnSite.ImageIndex=3;
tnSite.SelectedImageIndex=3;

trvFeed.SelectedNode.Nodes.Add(tnSite);
trvFeed.SelectedNode.Expand();
trvFeed.SelectedNode.EnsureVisible();
strCurrentSelectedNodeTag="SITE:" + strNewSiteURL.Trim();
int
nFilterCharIndex=trvFeed.SelectedNode.Text.LastIndexOf(" (");
string
strGroupNodeText=trvFeed.SelectedNode.Text;
if(nFilterCharIndex>=0)
{
strGroupNodeText=trvFeed.SelectedNode.Text.Substring(0,nFilterCharIndex)
;
}
AddSiteNodeToXMLLibrary(strGroupNodeText
,strNewSite.Trim(),strNewSiteURL.Trim());
trvFeed.SelectedNode.Text =
strGroupNodeText + " (" + trvFeed.SelectedNode.Nodes.Count.ToString() +
")";
FetchSiteInfo(strNewSite,strNewSiteURL.Trim());
//Load the view History to the
Listview- begin
LoadNodeViewHistory(strGroupNodeText, strNewSite,false);
//Load the view History to the
Listview- end
}
}
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message + " : " +
ex.StackTrace);
}
}
public void UpdateNodeViewHistory(string GroupText, string
ChildText, bool IsFeed)
{
try

45

XmlDocument xDoc=new XmlDocument();


xDoc.Load(strBaseDir);

string strSearchXPath;
if(IsFeed)
{
strSearchXPath="Library/Group[@id='" +
GroupText + "']/Feed[@id='" + ChildText + "']";
}
else
{
strSearchXPath="Library/Group[@id='" +
GroupText + "']/Site[@id='" + ChildText + "']";
}
int
nUpdatedViewCount=Convert.ToInt32(xDoc.SelectSingleNode(strSearchXPath).
Attributes["viewed"].Value) + 1;
xDoc.SelectSingleNode(strSearchXPath).Attributes["viewed"].Value =
nUpdatedViewCount.ToString();
xDoc.Save(strBaseDir);
}
catch(Exception e)
{
MessageBox.Show(e.Message + ":" + e.StackTrace);
}
}

public void LoadNodeViewHistory(string GroupText, string


ChildText, bool IsFeed)
{
try
{
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strBaseDir);
string strSearchXPath;
if(!IsFeed)
{
strSearchXPath="Library/Group[@id='" +
GroupText + "']/Site[@id='" + ChildText + "']";
ListViewItem lstFeedItem=new
ListViewItem();
lstFeedItem.ImageIndex=1;
lstFeedItem.SubItems.Add(ChildText);

lstFeedItem.SubItems.Add(xDoc.SelectSingleNode(strSearchXPath).Attribute
s["created"].Value);

46

lstFeedItem.SubItems.Add(xDoc.SelectSingleNode(strSearchXPath).Attribute
s["viewed"].Value + " times");
lstFeedItem.SubItems.Add("");
lstFeedItem.SubItems.Add("");

lstFeedItem.SubItems.Add(xDoc.SelectSingleNode(strSearchXPath).Attribute
s["SITE"].Value);
lstFeedItem.Tag="";
lstvFeed.Items.Add(lstFeedItem);
}

e)

}
catch(Exception e)
{
MessageBox.Show(e.Message + ":" + e.StackTrace);
}

private void mnuImport_Click(object sender, System.EventArgs


{

ImportLibrary();

}
public void ImportLibrary()
{
if(openFlDlg.ShowDialog().Equals(DialogResult.OK))
{
SetLibrary(Path.GetFullPath(openFlDlg.FileName));
LoadFeedTree();
}
}

public static void GetLocalIP()


{
// Get host name
IPHostEntry ie=new IPHostEntry();
ie=Dns.Resolve("vsdt0999");
string strIP=ie.AddressList.GetValue(0).ToString();

String strHostName = Dns.GetHostName();


Console.WriteLine("Host Name: " + strHostName);
// Find host by name
IPHostEntry iphostentry =
Dns.GetHostByName(strHostName);
// Enumerate IP addresses

47

int nIP = 0;
foreach(IPAddress ipaddress in
iphostentry.AddressList)
{
//Console.WriteLine("IP #" + ++nIP + ": " +
ipaddress.ToString());
MessageBox.Show("IP #" + ++nIP + ": " +
ipaddress.ToString());
}
}
private void trvFeed_AfterExpand(object sender,
System.Windows.Forms.TreeViewEventArgs e)
{
if(e.Node.Tag.ToString().IndexOf("Group")!=-1)
{
if(e.Node.IsExpanded)
{
e.Node.ImageIndex =1;
//trvFeed.SelectedNode.SelectedImageIndex=
1;
}
else
{
e.Node.ImageIndex=4;
//trvFeed.SelectedNode.SelectedImageIndex=
1;
}
}
}
private void trvFeed_AfterCollapse(object sender,
System.Windows.Forms.TreeViewEventArgs e)
{
if(e.Node.Tag.ToString().IndexOf("Group")!=-1)
{
if(e.Node.IsExpanded)
{
e.Node.ImageIndex =1;
//trvFeed.SelectedNode.SelectedImageIndex=
1;
}
else
{
e.Node.ImageIndex=4;
//trvFeed.SelectedNode.SelectedImageIndex=
1;
}
}
}
private void cMenuTrv_Popup(object sender, System.EventArgs
e)

{
if(trvFeed.SelectedNode.Tag.ToString().IndexOf("SITE")!=-1)

48

else
}

menuItem12.Enabled=true;
menuItem12.Enabled=false;

private void menuItem12_Click(object sender,


System.EventArgs e)
{
try
{
XmlDocument xDoc=new XmlDocument();
xDoc.Load(strBaseDir);
xDoc.DocumentElement.Attributes["startupSite"].Value
=trvFeed.SelectedNode.Tag.ToString().Substring(trvFeed.SelectedNode.Tag.
ToString().IndexOf("SITE:")+5);
xDoc.Save(strBaseDir);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message + ":" +
ex.StackTrace);
}
}

49

B. SCREEN INTERFACES
Main Window

50

Web Search For the term Computer Network

51

Showing Right Click Options

52

URL is viewed in Internal Browser

53

Video Search for the term Computer Network

54

Downloading a file

55

Image Search For the Term Circle

56

57

RSS FEEDs

58

59

También podría gustarte