Client.MainWindow Class Reference

The program's main interface. The start point for all activities in the system. More...

Collaboration diagram for Client.MainWindow:

Collaboration graph
[legend]
List of all members.

Public Types

enum  SearchTypes { FreeText, ByTag, Relevance }
 The different types of possible searches. More...

Public Member Functions

 MainWindow (IAccessHandler accessHandler)
 The default MainWindow constructor. Launched from the Login window, which passes the access handler.
void UpdateStats ()
 Update statistics information shown in the sidebarTree.
void ShowProjects ()
 Overloaded function which shows all projects by calling ShowProjects(null).
void ShowProjects (string query, bool userSearch)
 Show all projects matching the string query.
void ShowLiterature ()
 Overloaded function to show all literature by calling ShowLiterature(null).
void ShowLiterature (string query, bool userSearch)
 Show all literature matching the string query.
void ShowUsers ()
 Overloaded function to show all users by calling ShowUsers(null).
void ShowUsers (string query)
 Show all users matching the string query.
void ShowTags ()
 Overloaded function to show all tags by calling ShowTags(null).
void ShowTags (string query)
 Show all tags matching the string query.
void ShowSearch ()
 Show everything in the system, by calling ShowSearch(null, everything, not by tags).
void ShowSearch (string query, ResultType type, SearchTypes searchType)
 Show everything in the system which matches the three parameters.
void ShowSearch (string query, ResultType type, SearchTypes searchType, object tag)
 Show everything in the system which matches the four parameters.
void ShowRelated (int id)
 Show everything in the system which matches the three parameters.

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used.

Private Types

enum  GridFormats {
  Project, Literature, Search, User,
  Tag, None
}
 The different types of grid formats that exist for the MainWindow datagridview. More...

Private Member Functions

void MainWindow_Shown (object sender, EventArgs e)
 This updats the main window when it is showen.
void searhBox_Enter (object sender, EventArgs e)
void searchBox_Leave (object sender, EventArgs e)
void searchBox_KeyDown (object sender, KeyEventArgs e)
void Search (object sender, EventArgs ea)
void cmdTagCloud_Click (object sender, EventArgs e)
 This it executed when the user presses on the tag cloud icon.
void tagCloud1_Leave (object sender, EventArgs e)
 This is executed when the used leaves(click on something else) the tag cloud.
void tagCloud1_TagSelected (object sender, TagCloudEventArgs e)
 This is executed when the used clicks on one of the tags on the cloud.
void tagUpdater ()
 This function updates and adds the infomation in the tag cloud.
void toolStripButton3_Click (object sender, EventArgs e)
 Tagbar > Edit button.
void deletePressed (object sender, EventArgs e)
void exitToolStripMenuItem_Click (object sender, EventArgs e)
void profileToolStripMenuItem_Click (object sender, EventArgs e)
void helpToolStripMenuItem1_Click (object sender, EventArgs e)
 Tagbar > Delete button.
void sidebarTree_SelectedIndexChanged (object sender, EventArgs e)
void mainGridView_KeyDown (object sender, KeyEventArgs e)
 This is executed when the used presses delete on one of the elements in the gridview.
void mainGridView_CellMouseDoubleClick (object sender, DataGridViewCellMouseEventArgs e)
 This is executed when the used double click on one of the elements in the gridview.
void mainGridView_CellMouseDown (object sender, DataGridViewCellMouseEventArgs e)
 This opens the context menu if the user right clicks on one of the elements i the gridview.
void contextMenuStrip1_Opening (object sender, CancelEventArgs e)
 This looks the the element the user have right clicked on and edits the context menu.
void literaturToolStripMenuItem_Click (object sender, EventArgs e)
 Menu > File > New > literature.
void projectToolStripMenuItem_Click (object sender, EventArgs e)
 Menu > File > New > Project.
void editToolStripMenuItem_Click (object sender, EventArgs e)
 Edit something...
void showToolStripMenuItem_Click (object sender, EventArgs e)
void AddNewProject ()
 Request creation of a new project.
void AddNewLiterature ()
 Request creation of a new piece of literature.
void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor.
void SetProjectGrid ()
 Sets the MainGridView up to show projects.
void SetLiteratureGrid ()
 Sets the MainGridView up to show literature.
void SetUsersGrid ()
 Sets the MainGridView up to show users.
void SetTagGrid ()
 Sets the MainGridView up to show tags.
void SetSearchGrid ()
 Sets the MainGridView up to show search results.

Private Attributes

IAccessHandler accessHandler
 The access handler which was passed from Login.
System.ComponentModel.IContainer components = null
 Required designer variable.
System.Windows.Forms.DataGridView mainGridView
System.Windows.Forms.SplitContainer splitContainer1
TagControls.TagCloud tagCloud1
System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem
System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem
System.Windows.Forms.ToolStripMenuItem literaturToolStripMenuItem
System.Windows.Forms.ToolStripMenuItem projectToolStripMenuItem
System.Windows.Forms.ToolStripSeparator toolStripMenuItem1
System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem
System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem1
System.Windows.Forms.MenuStrip menuStrip1
System.Windows.Forms.ImageList imageList1
System.Windows.Forms.ListView sidebarTree
System.Windows.Forms.ToolStrip toolStrip2
System.Windows.Forms.ToolStripDropDownButton toolStripSplitButton1
System.Windows.Forms.ToolStripMenuItem projectToolStripMenuItem1
System.Windows.Forms.ToolStripMenuItem literatureToolStripMenuItem1
System.Windows.Forms.ToolStripButton toolStripButton3
System.Windows.Forms.ToolStripSeparator toolStripSeparator1
System.Windows.Forms.ToolStripButton toolStripButton4
System.Windows.Forms.ToolStripButton cmdTagCloud
System.Windows.Forms.ToolStripButton cmdSearch
System.Windows.Forms.ToolStripTextBox searchBox
System.Windows.Forms.ToolStripButton toolStripButton1
System.Windows.Forms.ToolStripSeparator toolStripSeparator2
System.Windows.Forms.ContextMenuStrip contextMenuStrip1
System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem
System.Windows.Forms.ToolStripSeparator toolStripMenuItem2
System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem
System.Windows.Forms.ToolStripSeparator toolStripMenuItem3
System.Windows.Forms.ToolStripMenuItem showToolStripMenuItem
GridFormats gridFormat = GridFormats.None
 Describes which format the maingridview is in now.
DataTable currentData = null
List< ListViewItem > previousSearches = new List<ListViewItem>()
bool IsSearching = false

Classes

struct  PreviousSearch

Detailed Description

The program's main interface. The start point for all activities in the system.

Definition at line 16 of file MainWindow.cs.


Member Enumeration Documentation

enum Client::MainWindow::GridFormats [private]

The different types of grid formats that exist for the MainWindow datagridview.

Definition at line 21 of file MainWindowGridController.cs.

enum Client::MainWindow::SearchTypes

The different types of possible searches.

Enumerator:
FreeText  Search by free text.

ByTag  Search by way of tag.

Relevance  Search for relevance between items.

Definition at line 33 of file MainWindowGridController.cs.


Constructor & Destructor Documentation

Client.MainWindow.MainWindow ( IAccessHandler  accessHandler  ) 

The default MainWindow constructor. Launched from the Login window, which passes the access handler.

Parameters:
accessHandler An access handler

Definition at line 25 of file MainWindow.cs.

References Client.MainWindow.accessHandler, Shared.IAccessHandler.GetPersonInfo(), Client.MainWindow.InitializeComponent(), Shared.PersonInfo.name, Client.MainWindow.toolStripButton1, Client.MainWindow.UpdateStats(), and Shared.IAccessHandler.WhoAmI.

Here is the call graph for this function:


Member Function Documentation

void Client.MainWindow.MainWindow_Shown ( object  sender,
EventArgs  e 
) [private]

This updats the main window when it is showen.

Parameters:
sender Not used.
e Not used.

Definition at line 40 of file MainWindow.cs.

References Client.MainWindow.sidebarTree, and Client.MainWindow.UpdateStats().

Here is the call graph for this function:

void Client.MainWindow.cmdTagCloud_Click ( object  sender,
EventArgs  e 
) [private]

This it executed when the user presses on the tag cloud icon.

Parameters:
sender Not used.
e Not used.

Definition at line 94 of file MainWindow.cs.

References Client.MainWindow.tagCloud1, and Client.MainWindow.tagUpdater().

Here is the call graph for this function:

void Client.MainWindow.tagCloud1_Leave ( object  sender,
EventArgs  e 
) [private]

This is executed when the used leaves(click on something else) the tag cloud.

Parameters:
sender Not used.
e Not used.

Definition at line 111 of file MainWindow.cs.

References Client.MainWindow.tagCloud1.

void Client.MainWindow.tagCloud1_TagSelected ( object  sender,
TagCloudEventArgs  e 
) [private]

This is executed when the used clicks on one of the tags on the cloud.

Parameters:
sender Not used.
e Not used.

Definition at line 121 of file MainWindow.cs.

References Client.MainWindow.mainGridView, TagControls.TagCloud.SelectedTag, Client.MainWindow.ShowSearch(), and Client.MainWindow.tagCloud1.

Here is the call graph for this function:

void Client.MainWindow.tagUpdater (  )  [private]

This function updates and adds the infomation in the tag cloud.

Definition at line 130 of file MainWindow.cs.

References Client.MainWindow.accessHandler, Shared.IAccessHandler.GetTags(), Client.MainWindow.tagCloud1, TagControls.TagCloud.Tags, TagControls.TagCloud.Updater(), and TagControls.TagCloud.Username.

Referenced by Client.MainWindow.cmdTagCloud_Click().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.MainWindow.toolStripButton3_Click ( object  sender,
EventArgs  e 
) [private]

Tagbar > Edit button.

Parameters:
sender 
e 

Definition at line 148 of file MainWindow.cs.

References Client.MainWindow.mainGridView_CellMouseDoubleClick().

Here is the call graph for this function:

void Client.MainWindow.helpToolStripMenuItem1_Click ( object  sender,
EventArgs  e 
) [private]

Tagbar > Delete button.

Parameters:
sender Who is firing the event?
e Why are they firing it?

Definition at line 231 of file MainWindow.cs.

void Client.MainWindow.UpdateStats (  ) 

Update statistics information shown in the sidebarTree.

Definition at line 245 of file MainWindow.cs.

References Client.MainWindow.accessHandler, Shared.IAccessHandler.GetStatistics(), Shared.IAccessHandler.ListItems(), Shared.StatisticsInfo.LiteratureCount, Shared.StatisticsInfo.ProjectCount, Client.MainWindow.sidebarTree, Shared.StatisticsInfo.TagCount, Shared.StatisticsInfo.UserCount, and Shared.IAccessHandler.WhoAmI.

Referenced by Client.MainWindow.MainWindow(), Client.MainWindow.MainWindow_Shown(), Client.MainWindow.ShowRelated(), and Client.MainWindow.ShowSearch().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.MainWindow.mainGridView_KeyDown ( object  sender,
KeyEventArgs  e 
) [private]

This is executed when the used presses delete on one of the elements in the gridview.

Parameters:
sender The object deleted
e Key event args

Definition at line 372 of file MainWindow.cs.

Referenced by Client.MainWindow.InitializeComponent().

Here is the caller graph for this function:

void Client.MainWindow.mainGridView_CellMouseDoubleClick ( object  sender,
DataGridViewCellMouseEventArgs  e 
) [private]

This is executed when the used double click on one of the elements in the gridview.

Parameters:
sender Not used
e Not used.

Definition at line 385 of file MainWindow.cs.

References Shared.LiteratureInfo.author, Shared.LiteratureInfo.Date, Shared.ProjectInfo.Date, Shared.ProjectInfo.department, Shared.LiteratureInfo.Description, Shared.ProjectInfo.Description, Shared.LiteratureInfo.isbn, Shared.ReviewInfo.literature, Client.LiteratureEntryView.LiteratureInfo, Shared.ReviewInfo.project, Client.ProjectView.Projectinfo, Shared.ProjectInfo.subject, Shared.LiteratureInfo.title, Shared.LiteratureInfo.Title, Shared.ProjectInfo.Title, Shared.LiteratureInfo.Type, and Shared.ProjectInfo.Type.

Referenced by Client.MainWindow.InitializeComponent(), and Client.MainWindow.toolStripButton3_Click().

Here is the caller graph for this function:

void Client.MainWindow.mainGridView_CellMouseDown ( object  sender,
DataGridViewCellMouseEventArgs  e 
) [private]

This opens the context menu if the user right clicks on one of the elements i the gridview.

Parameters:
sender Not used
e Data grid view cell mouse event args

Definition at line 462 of file MainWindow.cs.

Referenced by Client.MainWindow.InitializeComponent().

Here is the caller graph for this function:

void Client.MainWindow.contextMenuStrip1_Opening ( object  sender,
CancelEventArgs  e 
) [private]

This looks the the element the user have right clicked on and edits the context menu.

Parameters:
sender Not used.
e Not used.

Definition at line 477 of file MainWindow.cs.

void Client.MainWindow.literaturToolStripMenuItem_Click ( object  sender,
EventArgs  e 
) [private]

Menu > File > New > literature.

Parameters:
sender 
e 

Definition at line 513 of file MainWindow.cs.

void Client.MainWindow.projectToolStripMenuItem_Click ( object  sender,
EventArgs  e 
) [private]

Menu > File > New > Project.

Parameters:
sender 
e 

Definition at line 523 of file MainWindow.cs.

void Client.MainWindow.editToolStripMenuItem_Click ( object  sender,
EventArgs  e 
) [private]

Edit something...

Parameters:
sender Not used.
e Not used.

Definition at line 533 of file MainWindow.cs.

void Client.MainWindow.AddNewProject (  )  [private]

Request creation of a new project.

Definition at line 571 of file MainWindow.cs.

References Shared.ProjectInfo.id, Client.ProjectView.Projectinfo, Client.ProjectView.Saved, and Shared.ISearchable.SearchType.

void Client.MainWindow.AddNewLiterature (  )  [private]

Request creation of a new piece of literature.

Definition at line 603 of file MainWindow.cs.

References Shared.LiteratureInfo.id, Client.LiteratureEntryView.LiteratureInfo, and Shared.ISearchable.SearchType.

override void Client.MainWindow.Dispose ( bool  disposing  )  [protected]

Clean up any resources being used.

Parameters:
disposing true if managed resources should be disposed; otherwise, false.

Definition at line 14 of file MainWindow.Designer.cs.

References Client.MainWindow.components.

void Client.MainWindow.InitializeComponent (  )  [private]

Required method for Designer support - do not modify the contents of this method with the code editor.

Definition at line 29 of file MainWindow.Designer.cs.

References Client.MainWindow.components, Client.MainWindow.mainGridView, Client.MainWindow.mainGridView_CellMouseDoubleClick(), Client.MainWindow.mainGridView_CellMouseDown(), and Client.MainWindow.mainGridView_KeyDown().

Referenced by Client.MainWindow.MainWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.MainWindow.SetProjectGrid (  )  [private]

Sets the MainGridView up to show projects.

Definition at line 89 of file MainWindowGridController.cs.

References Client.MainWindow.currentData, Client.MainWindow.gridFormat, and Client.MainWindow.mainGridView.

Referenced by Client.MainWindow.ShowProjects().

Here is the caller graph for this function:

void Client.MainWindow.ShowProjects (  ) 

Overloaded function which shows all projects by calling ShowProjects(null).

Definition at line 129 of file MainWindowGridController.cs.

void Client.MainWindow.ShowProjects ( string  query,
bool  userSearch 
)

Show all projects matching the string query.

Parameters:
query Search terms
userSearch If this is true and query is a username, function gets all users projects

Definition at line 138 of file MainWindowGridController.cs.

References Client.MainWindow.accessHandler, Client.MainWindow.currentData, Shared.ProjectInfo.Date, Shared.ProjectInfo.department, Client.MainWindow.gridFormat, Shared.IAccessHandler.ListItems(), Shared.IAccessHandler.ListProjects(), Shared.IAccessHandler.Search(), Client.MainWindow.SetProjectGrid(), Shared.ProjectInfo.subject, and Shared.ProjectInfo.Title.

Here is the call graph for this function:

void Client.MainWindow.SetLiteratureGrid (  )  [private]

Sets the MainGridView up to show literature.

Definition at line 182 of file MainWindowGridController.cs.

References Client.MainWindow.currentData, Client.MainWindow.gridFormat, and Client.MainWindow.mainGridView.

Referenced by Client.MainWindow.ShowLiterature().

Here is the caller graph for this function:

void Client.MainWindow.ShowLiterature (  ) 

Overloaded function to show all literature by calling ShowLiterature(null).

Definition at line 223 of file MainWindowGridController.cs.

void Client.MainWindow.ShowLiterature ( string  query,
bool  userSearch 
)

Show all literature matching the string query.

Parameters:
query Search terms
userSearch If this is true and query is a username, function gets all users literature

Definition at line 232 of file MainWindowGridController.cs.

References Client.MainWindow.accessHandler, Shared.LiteratureInfo.author, Client.MainWindow.currentData, Shared.LiteratureInfo.Date, Client.MainWindow.gridFormat, Shared.LiteratureInfo.isbn, Shared.IAccessHandler.ListItems(), Shared.IAccessHandler.ListLiterature(), Shared.IAccessHandler.Search(), Client.MainWindow.SetLiteratureGrid(), and Shared.LiteratureInfo.Title.

Here is the call graph for this function:

void Client.MainWindow.SetUsersGrid (  )  [private]

Sets the MainGridView up to show users.

Definition at line 277 of file MainWindowGridController.cs.

References Client.MainWindow.currentData, Client.MainWindow.gridFormat, and Client.MainWindow.mainGridView.

Referenced by Client.MainWindow.ShowUsers().

Here is the caller graph for this function:

void Client.MainWindow.ShowUsers (  ) 

Overloaded function to show all users by calling ShowUsers(null).

Definition at line 313 of file MainWindowGridController.cs.

void Client.MainWindow.ShowUsers ( string  query  ) 

Show all users matching the string query.

Parameters:
query Search terms

Definition at line 321 of file MainWindowGridController.cs.

References Client.MainWindow.accessHandler, Client.MainWindow.currentData, Shared.PersonInfo.department, Client.MainWindow.gridFormat, Shared.IAccessHandler.ListItems(), Shared.PersonInfo.name, Shared.IAccessHandler.Search(), Client.MainWindow.SetUsersGrid(), and Shared.PersonInfo.username.

Here is the call graph for this function:

void Client.MainWindow.SetTagGrid (  )  [private]

Sets the MainGridView up to show tags.

Definition at line 361 of file MainWindowGridController.cs.

References Client.MainWindow.currentData, Client.MainWindow.gridFormat, and Client.MainWindow.mainGridView.

Referenced by Client.MainWindow.ShowTags().

Here is the caller graph for this function:

void Client.MainWindow.ShowTags (  ) 

Overloaded function to show all tags by calling ShowTags(null).

Definition at line 394 of file MainWindowGridController.cs.

void Client.MainWindow.ShowTags ( string  query  ) 

Show all tags matching the string query.

Parameters:
query Search terms

Definition at line 402 of file MainWindowGridController.cs.

References Client.MainWindow.accessHandler, Shared.TagInfo.Count, Client.MainWindow.currentData, Shared.IAccessHandler.GetAllTags(), Client.MainWindow.gridFormat, Client.MainWindow.mainGridView, Shared.TagInfo.Name, and Client.MainWindow.SetTagGrid().

Here is the call graph for this function:

void Client.MainWindow.SetSearchGrid (  )  [private]

Sets the MainGridView up to show search results.

Definition at line 439 of file MainWindowGridController.cs.

References Client.MainWindow.currentData, Client.MainWindow.gridFormat, and Client.MainWindow.mainGridView.

Referenced by Client.MainWindow.ShowRelated(), and Client.MainWindow.ShowSearch().

Here is the caller graph for this function:

void Client.MainWindow.ShowSearch (  ) 

Show everything in the system, by calling ShowSearch(null, everything, not by tags).

Definition at line 484 of file MainWindowGridController.cs.

Referenced by Client.MainWindow.Search(), Client.MainWindow.ShowSearch(), and Client.MainWindow.tagCloud1_TagSelected().

Here is the caller graph for this function:

void Client.MainWindow.ShowSearch ( string  query,
ResultType  type,
SearchTypes  searchType 
)

Show everything in the system which matches the three parameters.

Parameters:
query Search terms
type Which type of data you wish to search for
searchType Which type of search you wish to perform

Definition at line 494 of file MainWindowGridController.cs.

References Client.MainWindow.ShowSearch().

Here is the call graph for this function:

void Client.MainWindow.ShowSearch ( string  query,
ResultType  type,
SearchTypes  searchType,
object  tag 
)

Show everything in the system which matches the four parameters.

Parameters:
query Search terms
type Which type of data you wish to search for
searchType Which type of search you wish to perform
tag The tag you wish to search for in addition to the above

Definition at line 506 of file MainWindowGridController.cs.

References Client.MainWindow.accessHandler, Client.MainWindow.currentData, Shared.ISearchable.Date, Client.MainWindow.gridFormat, Client.MainWindow.IsSearching, Shared.IAccessHandler.ListItems(), Client.MainWindow.previousSearches, Client.MainWindow.PreviousSearch.query, Client.MainWindow.PreviousSearch.resultCount, Shared.IAccessHandler.Search(), Shared.IAccessHandler.SearchByTag(), Client.MainWindow.SetSearchGrid(), Shared.IAccessHandler.ShowRelated(), Client.MainWindow.sidebarTree, and Client.MainWindow.UpdateStats().

Here is the call graph for this function:

void Client.MainWindow.ShowRelated ( int  id  ) 

Show everything in the system which matches the three parameters.

Parameters:
id Reference Point

Definition at line 605 of file MainWindowGridController.cs.

References Client.MainWindow.accessHandler, Client.MainWindow.currentData, Shared.ISearchable.Date, Client.MainWindow.gridFormat, Client.MainWindow.IsSearching, Client.MainWindow.SetSearchGrid(), Shared.IAccessHandler.ShowRelated(), and Client.MainWindow.UpdateStats().

Here is the call graph for this function:


Member Data Documentation

IAccessHandler Client.MainWindow.accessHandler [private]

The access handler which was passed from Login.

Definition at line 19 of file MainWindow.cs.

Referenced by Client.MainWindow.deletePressed(), Client.MainWindow.MainWindow(), Client.MainWindow.profileToolStripMenuItem_Click(), Client.MainWindow.ShowLiterature(), Client.MainWindow.ShowProjects(), Client.MainWindow.ShowRelated(), Client.MainWindow.ShowSearch(), Client.MainWindow.ShowTags(), Client.MainWindow.ShowUsers(), Client.MainWindow.tagUpdater(), and Client.MainWindow.UpdateStats().

System.ComponentModel.IContainer Client.MainWindow.components = null [private]

Required designer variable.

Definition at line 8 of file MainWindow.Designer.cs.

Referenced by Client.MainWindow.Dispose(), and Client.MainWindow.InitializeComponent().

GridFormats Client.MainWindow.gridFormat = GridFormats.None [private]

Describes which format the maingridview is in now.

Definition at line 16 of file MainWindowGridController.cs.

Referenced by Client.MainWindow.SetLiteratureGrid(), Client.MainWindow.SetProjectGrid(), Client.MainWindow.SetSearchGrid(), Client.MainWindow.SetTagGrid(), Client.MainWindow.SetUsersGrid(), Client.MainWindow.ShowLiterature(), Client.MainWindow.ShowProjects(), Client.MainWindow.ShowRelated(), Client.MainWindow.ShowSearch(), Client.MainWindow.ShowTags(), and Client.MainWindow.ShowUsers().


The documentation for this class was generated from the following files:
Generated on Thu Dec 21 06:23:43 2006 for SCRAML by  doxygen 1.5.1-p1