Validation for passwords, username and fullname

This commit is contained in:
Tim Young 2017-08-01 17:04:02 -05:00
parent f749914338
commit 8907ba1597
2 changed files with 22 additions and 20 deletions

View File

@ -40,6 +40,7 @@
this.tabClass = new System.Windows.Forms.TabPage(); this.tabClass = new System.Windows.Forms.TabPage();
this.btnImportStudents = new System.Windows.Forms.Button(); this.btnImportStudents = new System.Windows.Forms.Button();
this.TabHomework = new System.Windows.Forms.TabPage(); this.TabHomework = new System.Windows.Forms.TabPage();
this.btnLaunch = new System.Windows.Forms.Button();
this.btnHWDelete = new System.Windows.Forms.Button(); this.btnHWDelete = new System.Windows.Forms.Button();
this.lblHWSubmitted = new System.Windows.Forms.Label(); this.lblHWSubmitted = new System.Windows.Forms.Label();
this.tbHWSubmitted = new System.Windows.Forms.TextBox(); this.tbHWSubmitted = new System.Windows.Forms.TextBox();
@ -54,7 +55,6 @@
this.TabStudent = new System.Windows.Forms.TabPage(); this.TabStudent = new System.Windows.Forms.TabPage();
this.tvClasswork = new System.Windows.Forms.TreeView(); this.tvClasswork = new System.Windows.Forms.TreeView();
this.btnExit = new System.Windows.Forms.Button(); this.btnExit = new System.Windows.Forms.Button();
this.btnLaunch = new System.Windows.Forms.Button();
this.tcTabControl.SuspendLayout(); this.tcTabControl.SuspendLayout();
this.TabProfile.SuspendLayout(); this.TabProfile.SuspendLayout();
this.TabClasswork.SuspendLayout(); this.TabClasswork.SuspendLayout();
@ -173,7 +173,7 @@
// //
this.btnImportStudents.Location = new System.Drawing.Point(6, 6); this.btnImportStudents.Location = new System.Drawing.Point(6, 6);
this.btnImportStudents.Name = "btnImportStudents"; this.btnImportStudents.Name = "btnImportStudents";
this.btnImportStudents.Size = new System.Drawing.Size(164, 23); this.btnImportStudents.Size = new System.Drawing.Size(152, 23);
this.btnImportStudents.TabIndex = 0; this.btnImportStudents.TabIndex = 0;
this.btnImportStudents.Text = "Import Students"; this.btnImportStudents.Text = "Import Students";
this.btnImportStudents.UseVisualStyleBackColor = true; this.btnImportStudents.UseVisualStyleBackColor = true;
@ -201,6 +201,16 @@
this.TabHomework.Text = "Homework"; this.TabHomework.Text = "Homework";
this.TabHomework.UseVisualStyleBackColor = true; this.TabHomework.UseVisualStyleBackColor = true;
// //
// btnLaunch
//
this.btnLaunch.Location = new System.Drawing.Point(10, 177);
this.btnLaunch.Name = "btnLaunch";
this.btnLaunch.Size = new System.Drawing.Size(75, 23);
this.btnLaunch.TabIndex = 11;
this.btnLaunch.Text = "Launch";
this.btnLaunch.UseVisualStyleBackColor = true;
this.btnLaunch.Click += new System.EventHandler(this.btLaunch_Click);
//
// btnHWDelete // btnHWDelete
// //
this.btnHWDelete.Location = new System.Drawing.Point(175, 177); this.btnHWDelete.Location = new System.Drawing.Point(175, 177);
@ -323,16 +333,6 @@
this.btnExit.UseVisualStyleBackColor = true; this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click); this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
// //
// btnLaunch
//
this.btnLaunch.Location = new System.Drawing.Point(10, 177);
this.btnLaunch.Name = "btnLaunch";
this.btnLaunch.Size = new System.Drawing.Size(75, 23);
this.btnLaunch.TabIndex = 11;
this.btnLaunch.Text = "Launch";
this.btnLaunch.UseVisualStyleBackColor = true;
this.btnLaunch.Click += new System.EventHandler(this.btLaunch_Click);
//
// PersonProfileForm // PersonProfileForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);

View File

@ -14,14 +14,6 @@ namespace EduNetworkBuilder
{ {
//A temporary holding structure when loading in students from CSV for validation. //A temporary holding structure when loading in students from CSV for validation.
//Once loaded and parsed, we then make actual students from them. //Once loaded and parsed, we then make actual students from them.
class StudentHolder
{
public string Name = "";
public string Password = "";
public string FullName = "";
public bool ForceToChangePass = true;
}
public partial class PersonProfileForm : Form public partial class PersonProfileForm : Form
{ {
enum TopTab { profiletab=0, classworktab=1} enum TopTab { profiletab=0, classworktab=1}
@ -31,6 +23,16 @@ namespace EduNetworkBuilder
PersonClass ViewedUser = null; PersonClass ViewedUser = null;
SchoolworkClass ViewedSchoolwork = null; SchoolworkClass ViewedSchoolwork = null;
class StudentHolder
{
public string Name = "";
public string Password = "";
public string FullName = "";
public bool ForceToChangePass = true;
}
public PersonProfileForm(string filename = "") public PersonProfileForm(string filename = "")
{ {
InitializeComponent(); InitializeComponent();