Add submit / update menu items for the network

This commit is contained in:
Tim Young 2017-08-02 09:15:28 -05:00
parent 8fdefcaabc
commit fef2d80981
2 changed files with 64 additions and 12 deletions

View File

@ -83,6 +83,8 @@
this.HelpPanel = new System.Windows.Forms.Panel();
this.cbViewTitles = new System.Windows.Forms.CheckBox();
this.myProgressBar = new System.Windows.Forms.ProgressBar();
this.updateClassworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.submitHomeworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.msMainMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit();
this.HelpPanel.SuspendLayout();
@ -162,7 +164,9 @@
this.changeLanguageToolStripMenuItem,
this.classSetupToolStripMenuItem,
this.profileToolStripMenuItem,
this.addToClassworkToolStripMenuItem});
this.addToClassworkToolStripMenuItem,
this.updateClassworkToolStripMenuItem,
this.submitHomeworkToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24);
this.editToolStripMenuItem.Text = "Edit";
@ -170,59 +174,59 @@
// cutToolStripMenuItem
//
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
this.cutToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.cutToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.cutToolStripMenuItem.Text = "Cut";
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.copyToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.copyToolStripMenuItem.Text = "Copy";
//
// pasteToolStripMenuItem
//
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.pasteToolStripMenuItem.Text = "Paste";
//
// undoToolStripMenuItem
//
this.undoToolStripMenuItem.Name = "undoToolStripMenuItem";
this.undoToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.undoToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.undoToolStripMenuItem.Text = "Undo";
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.optionsToolStripMenuItem.Text = "Options";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
//
// changeLanguageToolStripMenuItem
//
this.changeLanguageToolStripMenuItem.Name = "changeLanguageToolStripMenuItem";
this.changeLanguageToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.changeLanguageToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.changeLanguageToolStripMenuItem.Text = "Change Language";
this.changeLanguageToolStripMenuItem.Click += new System.EventHandler(this.changeLanguageToolStripMenuItem_Click);
//
// classSetupToolStripMenuItem
//
this.classSetupToolStripMenuItem.Name = "classSetupToolStripMenuItem";
this.classSetupToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.classSetupToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.classSetupToolStripMenuItem.Text = "Class Setup";
this.classSetupToolStripMenuItem.Click += new System.EventHandler(this.classSetupToolStripMenuItem_Click);
//
// profileToolStripMenuItem
//
this.profileToolStripMenuItem.Name = "profileToolStripMenuItem";
this.profileToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.profileToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.profileToolStripMenuItem.Text = "Profile";
this.profileToolStripMenuItem.Click += new System.EventHandler(this.profileToolStripMenuItem_Click);
//
// addToClassworkToolStripMenuItem
//
this.addToClassworkToolStripMenuItem.Name = "addToClassworkToolStripMenuItem";
this.addToClassworkToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.addToClassworkToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.addToClassworkToolStripMenuItem.Text = "Add To Classwork";
this.addToClassworkToolStripMenuItem.Click += new System.EventHandler(this.addToClassworkToolStripMenuItem_Click);
//
@ -580,6 +584,20 @@
this.myProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.myProgressBar.TabIndex = 11;
//
// updateClassworkToolStripMenuItem
//
this.updateClassworkToolStripMenuItem.Name = "updateClassworkToolStripMenuItem";
this.updateClassworkToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.updateClassworkToolStripMenuItem.Text = "Update Classwork";
this.updateClassworkToolStripMenuItem.Click += new System.EventHandler(this.updateClassworkToolStripMenuItem_Click);
//
// submitHomeworkToolStripMenuItem
//
this.submitHomeworkToolStripMenuItem.Name = "submitHomeworkToolStripMenuItem";
this.submitHomeworkToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.submitHomeworkToolStripMenuItem.Text = "Submit Homework";
this.submitHomeworkToolStripMenuItem.Click += new System.EventHandler(this.submitHomeworkToolStripMenuItem_Click);
//
// BuilderWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
@ -670,6 +688,8 @@
private System.Windows.Forms.ToolStripMenuItem classSetupToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem profileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem addToClassworkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateClassworkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem submitHomeworkToolStripMenuItem;
}
}

View File

@ -401,9 +401,32 @@ namespace EduNetworkBuilder
this.Text = "EduNetworkBuilder : " + CurrentUser.FullName;
}
if (CurrentUser == null || !CurrentUser.isAdmin)
{
addToClassworkToolStripMenuItem.Visible = false;
submitHomeworkToolStripMenuItem.Visible = false;
updateClassworkToolStripMenuItem.Visible = false;
}
else
addToClassworkToolStripMenuItem.Visible = true;
{
if (CurrentUser.isAdmin)
{
submitHomeworkToolStripMenuItem.Visible = false;
if (myNetwork.WhatFrom == null)
{
//If this is not part of homework yet, we can add it
addToClassworkToolStripMenuItem.Visible = true;
updateClassworkToolStripMenuItem.Visible = false;
}
else
{
//If this is homework, we can update it
addToClassworkToolStripMenuItem.Visible = false;
updateClassworkToolStripMenuItem.Visible = true;
}
}
else if (myNetwork.WhatFrom != null) //we are a student doing homework
submitHomeworkToolStripMenuItem.Visible = true;
}
List<string> tLoadList = new List<string>();
loadToolStripMenuItem.DropDownItems.Clear();
@ -1946,5 +1969,14 @@ namespace EduNetworkBuilder
}
private void updateClassworkToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void submitHomeworkToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}