Client.ProjectView Class Reference

What shows the user data about projects, and allows them to edit that data. More...

List of all members.

Public Member Functions

 ProjectView (IAccessHandler accessHandler)
 Constructs a new empty projectview used for creating a new project.
 ProjectView (IAccessHandler accessHandler, ProjectInfo projectinfo)
 Constructs a new projectview and fills it with the information in the projectinfo parameter. This is used for editing an existing project.

Protected Member Functions

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

Properties

ProjectInfo Projectinfo [get, set]
 Gets and sets the information for the project. Read by the MainWindow upon closing.
bool Saved [get]
 Was the project created as new? Used by the MainWindow upon closing.

Private Member Functions

void tabControl1_Selected (object sender, TabControlEventArgs e)
 Updates the roles or references if the tab ref. or rols are in are selected.
void tabControl1_Deselecting (object sender, TabControlCancelEventArgs e)
 If the Main tab er deselected and if the project is not saved.
void setDirty (object sender, EventArgs e)
 Marks the form as dirty. Done to catch unsaved changes.
bool Save ()
 Attempts to save changes.
void btnClose_Click (object sender, EventArgs e)
void btnSave_Click (object sender, EventArgs e)
void ProjectView_FormClosing (object sender, FormClosingEventArgs e)
void tagContainer1_TagAdded (object sender, TagControls.TagContainerEventArgs e)
 This add the tag add from the tagcontainer.
void tagContainer1_TagRemoved (object sender, TagControls.TagContainerEventArgs e)
 This removes the tag form the data.
void UpdateTagContainer ()
 Updates the tag container.
void UpdateReferenceTable ()
 Updates the grid of references.
void btnAddReference_Click (object sender, EventArgs e)
void btnExportBibliography_Click (object sender, EventArgs e)
void exportBibliography_Click (object sender, EventArgs e)
void dgvLiterature_CellContentClick (object sender, DataGridViewCellEventArgs e)
void dgvLiterature_SelectionChanged (object sender, EventArgs e)
void btnRemoveSelectedBib_Click (object sender, EventArgs e)
void UpdateRoleTable ()
 Updates the table containing roles.
void btnAddMember_Click (object sender, EventArgs e)
void btnRemoveMember_Click (object sender, EventArgs e)
void dgvMembers_SelectionChanged (object sender, EventArgs e)
void lnkSubmit_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e)
void theDisAndEnabler (bool submitted)
 Disables buttons if the project is submitted.
void dgvLiterature_CellMouseDoubleClick (object sender, DataGridViewCellMouseEventArgs e)
 If the used double clicks on one of the elements in the literature gridview the literature clicked is opened.
void btnReview_Click (object sender, EventArgs e)
void ProjectView_Shown (object sender, EventArgs e)
void contextPeople_Opening (object sender, CancelEventArgs e)
void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor.

Private Attributes

IAccessHandler accessHandler
 The access handler instance, passed on by the MainWindow.
ProjectInfo projectinfo
 The information for the project we are currently working with.
bool created = false
 Used for determing whether the create or update method should be used.
bool dirty = false
 Used for determining wether the project details have been edited.
RoleInfo currentRole
 Who is editing this project?
System.ComponentModel.IContainer components = null
 Required designer variable.
System.Windows.Forms.Button btnClose
System.Windows.Forms.Button btnSave
System.Windows.Forms.TableLayoutPanel tableLayoutPanel1
System.Windows.Forms.Panel panel1
System.Windows.Forms.TabControl tabControl1
System.Windows.Forms.TabPage tabPage1
TagControls.TagContainer tagContainer1
System.Windows.Forms.Label label10
System.Windows.Forms.TextBox txtPISynopsis
System.Windows.Forms.DateTimePicker datePIStartDate
System.Windows.Forms.TextBox txtPITitle
System.Windows.Forms.Label label4
System.Windows.Forms.TextBox txtPIDepartment
System.Windows.Forms.Label label3
System.Windows.Forms.Label label5
System.Windows.Forms.Label label2
System.Windows.Forms.TextBox txtPISubject
System.Windows.Forms.TabPage tabPage3
System.Windows.Forms.TabPage tabPage4
System.Windows.Forms.DataGridView dgvLiterature
System.Windows.Forms.Panel panel7
System.Windows.Forms.Panel panLayout
System.Windows.Forms.Button btnAddMember
System.Windows.Forms.Button btnRemoveMember
System.Windows.Forms.DataGridView dgvMembers
System.Windows.Forms.LinkLabel lnkSubmit
System.Windows.Forms.Button btnAddReference
System.Windows.Forms.ToolTip toolTip1
System.Windows.Forms.ContextMenuStrip cmExportBibliography
System.Windows.Forms.Button btnRemoveSelectedBib
System.Windows.Forms.Button btnExportBibliography
System.Windows.Forms.Panel panInfoLiterature
System.Windows.Forms.TextBox txtInfoLiterature
System.Windows.Forms.Label lblInfoLiterature
System.Windows.Forms.Button btnReview
System.Windows.Forms.ContextMenuStrip contextPeople


Detailed Description

What shows the user data about projects, and allows them to edit that data.

Definition at line 16 of file ProjectView.cs.


Constructor & Destructor Documentation

Client.ProjectView.ProjectView ( IAccessHandler  accessHandler  ) 

Constructs a new empty projectview used for creating a new project.

Parameters:
accessHandler An accessHandler

Definition at line 45 of file ProjectView.cs.

References Client.ProjectView.accessHandler, Client.ProjectView.btnSave, Client.ProjectView.InitializeComponent(), Client.ProjectView.lnkSubmit, Client.ProjectView.tagContainer1, and Client.ProjectView.txtPITitle.

Here is the call graph for this function:

Client.ProjectView.ProjectView ( IAccessHandler  accessHandler,
ProjectInfo  projectinfo 
)

Constructs a new projectview and fills it with the information in the projectinfo parameter. This is used for editing an existing project.

Parameters:
accessHandler An accessHandler
projectinfo A ProjectInfo struct with the information to be displayed.

Definition at line 62 of file ProjectView.cs.

References Client.ProjectView.accessHandler, Client.ProjectView.btnAddMember, Client.ProjectView.btnAddReference, Client.ProjectView.btnRemoveMember, Client.ProjectView.btnRemoveSelectedBib, Client.ProjectView.btnReview, Client.ProjectView.btnSave, Client.ProjectView.currentRole, Client.ProjectView.datePIStartDate, Shared.ProjectInfo.department, Client.ProjectView.dirty, Shared.IAccessHandler.GetRoles(), Shared.ProjectInfo.id, Client.ProjectView.InitializeComponent(), Client.ProjectView.lnkSubmit, Client.ProjectView.panLayout, Client.ProjectView.projectinfo, Shared.ProjectInfo.startDate, Shared.ProjectInfo.subject, Shared.ProjectInfo.submitted, Shared.ProjectInfo.synopsis, Client.ProjectView.theDisAndEnabler(), Shared.ProjectInfo.Title, Client.ProjectView.txtPIDepartment, Client.ProjectView.txtPISubject, Client.ProjectView.txtPISynopsis, Client.ProjectView.txtPITitle, Shared.RoleInfo.Type, Client.ProjectView.UpdateTagContainer(), Shared.RoleInfo.UserName, and Shared.IAccessHandler.WhoAmI.

Here is the call graph for this function:


Member Function Documentation

void Client.ProjectView.tabControl1_Selected ( object  sender,
TabControlEventArgs  e 
) [private]

Updates the roles or references if the tab ref. or rols are in are selected.

Parameters:
sender Not used.
e Not used.

Definition at line 127 of file ProjectView.cs.

References Client.ProjectView.tabControl1, Client.ProjectView.tabPage3, Client.ProjectView.tabPage4, Client.ProjectView.UpdateReferenceTable(), and Client.ProjectView.UpdateRoleTable().

Referenced by Client.ProjectView.InitializeComponent().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.ProjectView.tabControl1_Deselecting ( object  sender,
TabControlCancelEventArgs  e 
) [private]

If the Main tab er deselected and if the project is not saved.

Parameters:
sender Not used.
e Not used.

Definition at line 144 of file ProjectView.cs.

References Client.ProjectView.created, Client.ProjectView.Save(), and Client.ProjectView.tabPage1.

Referenced by Client.ProjectView.InitializeComponent().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.ProjectView.setDirty ( object  sender,
EventArgs  e 
) [private]

Marks the form as dirty. Done to catch unsaved changes.

Parameters:
sender 
e 

Definition at line 160 of file ProjectView.cs.

References Client.ProjectView.btnSave, and Client.ProjectView.dirty.

Referenced by Client.ProjectView.InitializeComponent().

Here is the caller graph for this function:

bool Client.ProjectView.Save (  )  [private]

Attempts to save changes.

Returns:

Definition at line 170 of file ProjectView.cs.

References Client.ProjectView.accessHandler, Client.ProjectView.btnSave, Client.ProjectView.created, Shared.IAccessHandler.CreateProject(), Client.ProjectView.datePIStartDate, Client.ProjectView.dirty, Shared.ProjectInfo.id, Client.ProjectView.projectinfo, Client.ProjectView.tagContainer1, Client.ProjectView.txtPIDepartment, Client.ProjectView.txtPISubject, Client.ProjectView.txtPISynopsis, Client.ProjectView.txtPITitle, and Shared.IAccessHandler.UpdateProject().

Referenced by Client.ProjectView.btnSave_Click(), Client.ProjectView.ProjectView_FormClosing(), and Client.ProjectView.tabControl1_Deselecting().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.ProjectView.tagContainer1_TagAdded ( object  sender,
TagControls.TagContainerEventArgs  e 
) [private]

This add the tag add from the tagcontainer.

Parameters:
sender Not used.
e Not used.

Definition at line 257 of file ProjectView.cs.

References Client.ProjectView.accessHandler, Shared.IAccessHandler.AddTag(), Shared.ProjectInfo.id, Client.ProjectView.Projectinfo, and Client.ProjectView.tagContainer1.

Referenced by Client.ProjectView.InitializeComponent().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.ProjectView.tagContainer1_TagRemoved ( object  sender,
TagControls.TagContainerEventArgs  e 
) [private]

This removes the tag form the data.

Parameters:
sender Not used.
e Not used.

Definition at line 267 of file ProjectView.cs.

References Shared.ProjectInfo.id, Client.ProjectView.Projectinfo, and Client.ProjectView.tagContainer1.

Referenced by Client.ProjectView.InitializeComponent().

Here is the caller graph for this function:

void Client.ProjectView.UpdateTagContainer (  )  [private]

Updates the tag container.

Definition at line 275 of file ProjectView.cs.

References Client.ProjectView.accessHandler, Shared.IAccessHandler.GetTags(), Shared.ProjectInfo.id, Client.ProjectView.projectinfo, and Client.ProjectView.tagContainer1.

Referenced by Client.ProjectView.ProjectView().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.ProjectView.UpdateReferenceTable (  )  [private]

Updates the grid of references.

Definition at line 298 of file ProjectView.cs.

References Client.ProjectView.accessHandler, Shared.LiteratureInfo.author, Client.ProjectView.btnRemoveSelectedBib, Client.ProjectView.dgvLiterature, Shared.IAccessHandler.GetLiteratureInfo(), Shared.ProjectInfo.id, Shared.IAccessHandler.ListReferences(), Shared.IAccessHandler.ListReviews(), Shared.IAccessHandler.ListSuggestions(), Client.ProjectView.panInfoLiterature, Client.ProjectView.projectinfo, and Shared.LiteratureInfo.title.

Referenced by Client.ProjectView.btnAddReference_Click(), Client.ProjectView.btnRemoveSelectedBib_Click(), Client.ProjectView.btnReview_Click(), and Client.ProjectView.tabControl1_Selected().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.ProjectView.UpdateRoleTable (  )  [private]

Updates the table containing roles.

Definition at line 529 of file ProjectView.cs.

References Client.ProjectView.accessHandler, Client.ProjectView.dgvMembers, Shared.IAccessHandler.GetRoles(), Shared.ProjectInfo.id, and Client.ProjectView.projectinfo.

Referenced by Client.ProjectView.btnAddMember_Click(), Client.ProjectView.btnRemoveMember_Click(), Client.ProjectView.contextPeople_Opening(), and Client.ProjectView.tabControl1_Selected().

Here is the call graph for this function:

Here is the caller graph for this function:

void Client.ProjectView.theDisAndEnabler ( bool  submitted  )  [private]

Disables buttons if the project is submitted.

Parameters:
submitted 

Definition at line 615 of file ProjectView.cs.

References Client.ProjectView.btnAddMember, Client.ProjectView.btnRemoveMember, Client.ProjectView.btnSave, Client.ProjectView.datePIStartDate, Client.ProjectView.lnkSubmit, Client.ProjectView.txtPIDepartment, Client.ProjectView.txtPISubject, Client.ProjectView.txtPISynopsis, and Client.ProjectView.txtPITitle.

Referenced by Client.ProjectView.lnkSubmit_LinkClicked(), and Client.ProjectView.ProjectView().

Here is the caller graph for this function:

void Client.ProjectView.dgvLiterature_CellMouseDoubleClick ( object  sender,
DataGridViewCellMouseEventArgs  e 
) [private]

If the used double clicks on one of the elements in the literature gridview the literature clicked is opened.

Parameters:
sender 
e 

Definition at line 635 of file ProjectView.cs.

References Client.ProjectView.accessHandler, and Client.ProjectView.dgvLiterature.

Referenced by Client.ProjectView.InitializeComponent().

Here is the caller graph for this function:

override void Client.ProjectView.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 ProjectView.Designer.cs.

References Client.ProjectView.components.

void Client.ProjectView.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 ProjectView.Designer.cs.

References Client.ProjectView.btnAddMember, Client.ProjectView.btnAddMember_Click(), Client.ProjectView.btnAddReference, Client.ProjectView.btnAddReference_Click(), Client.ProjectView.btnClose, Client.ProjectView.btnClose_Click(), Client.ProjectView.btnExportBibliography, Client.ProjectView.btnExportBibliography_Click(), Client.ProjectView.btnRemoveMember, Client.ProjectView.btnRemoveMember_Click(), Client.ProjectView.btnRemoveSelectedBib, Client.ProjectView.btnRemoveSelectedBib_Click(), Client.ProjectView.btnReview, Client.ProjectView.btnReview_Click(), Client.ProjectView.btnSave, Client.ProjectView.btnSave_Click(), Client.ProjectView.components, Client.ProjectView.contextPeople_Opening(), Client.ProjectView.datePIStartDate, Client.ProjectView.dgvLiterature, Client.ProjectView.dgvLiterature_CellContentClick(), Client.ProjectView.dgvLiterature_CellMouseDoubleClick(), Client.ProjectView.dgvLiterature_SelectionChanged(), Client.ProjectView.dgvMembers, Client.ProjectView.dgvMembers_SelectionChanged(), Client.ProjectView.label10, Client.ProjectView.label2, Client.ProjectView.label3, Client.ProjectView.label4, Client.ProjectView.label5, Client.ProjectView.lblInfoLiterature, Client.ProjectView.lnkSubmit, Client.ProjectView.lnkSubmit_LinkClicked(), Client.ProjectView.panel1, Client.ProjectView.panel7, Client.ProjectView.panInfoLiterature, Client.ProjectView.panLayout, Client.ProjectView.ProjectView_FormClosing(), Client.ProjectView.ProjectView_Shown(), Client.ProjectView.setDirty(), Client.ProjectView.tabControl1, Client.ProjectView.tabControl1_Deselecting(), Client.ProjectView.tabControl1_Selected(), Client.ProjectView.tableLayoutPanel1, Client.ProjectView.tabPage1, Client.ProjectView.tabPage3, Client.ProjectView.tabPage4, Client.ProjectView.tagContainer1, Client.ProjectView.tagContainer1_TagAdded(), Client.ProjectView.tagContainer1_TagRemoved(), Client.ProjectView.txtInfoLiterature, Client.ProjectView.txtPIDepartment, Client.ProjectView.txtPISubject, Client.ProjectView.txtPISynopsis, and Client.ProjectView.txtPITitle.

Referenced by Client.ProjectView.ProjectView().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

IAccessHandler Client.ProjectView.accessHandler [private]

The access handler instance, passed on by the MainWindow.

Definition at line 19 of file ProjectView.cs.

Referenced by Client.ProjectView.btnAddMember_Click(), Client.ProjectView.btnAddReference_Click(), Client.ProjectView.btnRemoveMember_Click(), Client.ProjectView.btnRemoveSelectedBib_Click(), Client.ProjectView.btnReview_Click(), Client.ProjectView.contextPeople_Opening(), Client.ProjectView.dgvLiterature_CellContentClick(), Client.ProjectView.dgvLiterature_CellMouseDoubleClick(), Client.ProjectView.exportBibliography_Click(), Client.ProjectView.lnkSubmit_LinkClicked(), Client.ProjectView.ProjectView(), Client.ProjectView.Save(), Client.ProjectView.tagContainer1_TagAdded(), Client.ProjectView.UpdateReferenceTable(), Client.ProjectView.UpdateRoleTable(), and Client.ProjectView.UpdateTagContainer().

ProjectInfo Client.ProjectView.projectinfo [private]

The information for the project we are currently working with.

Definition at line 21 of file ProjectView.cs.

Referenced by Client.ProjectView.btnAddMember_Click(), Client.ProjectView.btnAddReference_Click(), Client.ProjectView.btnReview_Click(), Client.ProjectView.exportBibliography_Click(), Client.ProjectView.lnkSubmit_LinkClicked(), Client.ProjectView.ProjectView(), Client.ProjectView.Save(), Client.ProjectView.UpdateReferenceTable(), Client.ProjectView.UpdateRoleTable(), and Client.ProjectView.UpdateTagContainer().

bool Client.ProjectView.created = false [private]

Used for determing whether the create or update method should be used.

Definition at line 23 of file ProjectView.cs.

Referenced by Client.ProjectView.Save(), and Client.ProjectView.tabControl1_Deselecting().

bool Client.ProjectView.dirty = false [private]

Used for determining wether the project details have been edited.

Definition at line 25 of file ProjectView.cs.

Referenced by Client.ProjectView.ProjectView(), Client.ProjectView.ProjectView_FormClosing(), Client.ProjectView.Save(), and Client.ProjectView.setDirty().

RoleInfo Client.ProjectView.currentRole [private]

Who is editing this project?

Definition at line 27 of file ProjectView.cs.

Referenced by Client.ProjectView.btnAddReference_Click(), Client.ProjectView.btnRemoveSelectedBib_Click(), and Client.ProjectView.ProjectView().

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

Required designer variable.

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

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


Property Documentation

ProjectInfo Client.ProjectView.Projectinfo [get, set]

Gets and sets the information for the project. Read by the MainWindow upon closing.

Definition at line 31 of file ProjectView.cs.

Referenced by Client.MainWindow.AddNewProject(), Client.LiteratureEntryView.llblProjectLink_LinkClicked(), Client.MainWindow.mainGridView_CellMouseDoubleClick(), Client.ProjectView.tagContainer1_TagAdded(), and Client.ProjectView.tagContainer1_TagRemoved().

bool Client.ProjectView.Saved [get]

Was the project created as new? Used by the MainWindow upon closing.

Definition at line 37 of file ProjectView.cs.

Referenced by Client.MainWindow.AddNewProject().


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