Prompt for import settings
This commit is contained in:
parent
ceba92f3d2
commit
8fdefcaabc
@ -830,7 +830,7 @@ namespace EduNetworkBuilder
|
|||||||
if (theIcon != null)
|
if (theIcon != null)
|
||||||
CheckInputForm.Icon = theIcon;
|
CheckInputForm.Icon = theIcon;
|
||||||
|
|
||||||
int startx = 150;
|
int startx = 20;
|
||||||
|
|
||||||
int y = 0;
|
int y = 0;
|
||||||
int lastY = 0;
|
int lastY = 0;
|
||||||
@ -845,9 +845,11 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
//Put it in the appropriate location
|
//Put it in the appropriate location
|
||||||
cb.Location = new Point(startx, (y * (cb.Height + yspace)) + yspace);
|
cb.Location = new Point(startx, (y * (cb.Height + yspace)) + yspace);
|
||||||
|
cb.AutoSize = true;
|
||||||
lastY = cb.Location.Y;
|
lastY = cb.Location.Y;
|
||||||
lastHeight = cb.Height;
|
lastHeight = cb.Height;
|
||||||
CheckInputForm.Controls.Add(cb);
|
CheckInputForm.Controls.Add(cb);
|
||||||
|
y++;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckInputForm.AutoSize = true;
|
CheckInputForm.AutoSize = true;
|
||||||
@ -867,11 +869,12 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
CheckInputForm.AcceptButton = btnAccept;
|
CheckInputForm.AcceptButton = btnAccept;
|
||||||
CheckInputForm.CancelButton = btnCancel;
|
CheckInputForm.CancelButton = btnCancel;
|
||||||
|
CheckInputForm.Height = btnCancel.Location.Y + btnCancel.Height + 10;
|
||||||
|
|
||||||
CheckInputForm.ShowDialog();
|
CheckInputForm.ShowDialog();
|
||||||
foreach (KeyValuePair<string, bool> entry in Checks)
|
foreach (KeyValuePair<string, bool> entry in Checks)
|
||||||
{
|
{
|
||||||
if(CheckInputForm.Controls[entry.Key] != null && CheckInputForm.Controls[entry.Key] is CheckBox)
|
if(responses != null && CheckInputForm.Controls[entry.Key] != null && CheckInputForm.Controls[entry.Key] is CheckBox)
|
||||||
{
|
{
|
||||||
CheckBox One = (CheckBox)CheckInputForm.Controls[entry.Key];
|
CheckBox One = (CheckBox)CheckInputForm.Controls[entry.Key];
|
||||||
responses.Add(One.Name, One.Checked);
|
responses.Add(One.Name, One.Checked);
|
||||||
|
16
EduNetworkBuilder/NetworkBuilder.Designer.cs
generated
16
EduNetworkBuilder/NetworkBuilder.Designer.cs
generated
@ -44,6 +44,7 @@
|
|||||||
this.changeLanguageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.changeLanguageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.classSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.classSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.profileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.profileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.addToClassworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.allToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.allToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.dHCPRequestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.dHCPRequestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.clearArpTableToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.clearArpTableToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@ -82,7 +83,6 @@
|
|||||||
this.HelpPanel = new System.Windows.Forms.Panel();
|
this.HelpPanel = new System.Windows.Forms.Panel();
|
||||||
this.cbViewTitles = new System.Windows.Forms.CheckBox();
|
this.cbViewTitles = new System.Windows.Forms.CheckBox();
|
||||||
this.myProgressBar = new System.Windows.Forms.ProgressBar();
|
this.myProgressBar = new System.Windows.Forms.ProgressBar();
|
||||||
this.addToClassworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.msMainMenuStrip.SuspendLayout();
|
this.msMainMenuStrip.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit();
|
||||||
this.HelpPanel.SuspendLayout();
|
this.HelpPanel.SuspendLayout();
|
||||||
@ -219,6 +219,13 @@
|
|||||||
this.profileToolStripMenuItem.Text = "Profile";
|
this.profileToolStripMenuItem.Text = "Profile";
|
||||||
this.profileToolStripMenuItem.Click += new System.EventHandler(this.profileToolStripMenuItem_Click);
|
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.Text = "Add To Classwork";
|
||||||
|
this.addToClassworkToolStripMenuItem.Click += new System.EventHandler(this.addToClassworkToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// allToolStripMenuItem
|
// allToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.allToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.allToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
@ -573,13 +580,6 @@
|
|||||||
this.myProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
this.myProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
||||||
this.myProgressBar.TabIndex = 11;
|
this.myProgressBar.TabIndex = 11;
|
||||||
//
|
//
|
||||||
// addToClassworkToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.addToClassworkToolStripMenuItem.Name = "addToClassworkToolStripMenuItem";
|
|
||||||
this.addToClassworkToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
|
|
||||||
this.addToClassworkToolStripMenuItem.Text = "Add To Classwork";
|
|
||||||
this.addToClassworkToolStripMenuItem.Click += new System.EventHandler(this.addToClassworkToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// BuilderWindow
|
// BuilderWindow
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||||
|
@ -1945,5 +1945,6 @@ namespace EduNetworkBuilder
|
|||||||
UpdateMenu();
|
UpdateMenu();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
1
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
1
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
@ -408,6 +408,7 @@
|
|||||||
this.btnImportStudents.TabIndex = 2;
|
this.btnImportStudents.TabIndex = 2;
|
||||||
this.btnImportStudents.Text = "Import Students";
|
this.btnImportStudents.Text = "Import Students";
|
||||||
this.btnImportStudents.UseVisualStyleBackColor = true;
|
this.btnImportStudents.UseVisualStyleBackColor = true;
|
||||||
|
this.btnImportStudents.Click += new System.EventHandler(this.btnImportStudents_Click);
|
||||||
//
|
//
|
||||||
// PersonProfileForm
|
// PersonProfileForm
|
||||||
//
|
//
|
||||||
|
@ -521,12 +521,21 @@ namespace EduNetworkBuilder
|
|||||||
DialogResult result = mydialog.ShowDialog();
|
DialogResult result = mydialog.ShowDialog();
|
||||||
if (result == System.Windows.Forms.DialogResult.Cancel) return;
|
if (result == System.Windows.Forms.DialogResult.Cancel) return;
|
||||||
|
|
||||||
|
//Prompt for import settings.
|
||||||
|
Dictionary<string, bool> Checks = new Dictionary<string, bool>();
|
||||||
|
Checks.Add(NB.Translate("PPF_AutoGenPW"), AutoCreatePWs);
|
||||||
|
Checks.Add(NB.Translate("PPF_ForcePWChange"), ForcePWChange);
|
||||||
|
|
||||||
|
Dictionary<string, bool> Response = NB.CheckPromptBox(Checks, NB.Translate("PPF_ImportSettings"),Properties.Resources.NBIco);
|
||||||
|
if (Response == null) return; //We canceled out
|
||||||
|
if (Response.ContainsKey(NB.Translate("PPF_AutoGenPW"))) AutoCreatePWs = Response[NB.Translate("PPF_AutoGenPW")];
|
||||||
|
if (Response.ContainsKey(NB.Translate("PPF_ForcePWChange"))) ForcePWChange = Response[NB.Translate("PPF_ForcePWChange")];
|
||||||
|
|
||||||
List<StudentHolder> tList = new List<StudentHolder>();
|
List<StudentHolder> tList = new List<StudentHolder>();
|
||||||
List<string> InvalidUsers = new List<string>();
|
List<string> InvalidUsers = new List<string>();
|
||||||
List<string> InvalidFullName = new List<string>();
|
List<string> InvalidFullName = new List<string>();
|
||||||
List<string> InvalidPasswords = new List<string>();
|
List<string> InvalidPasswords = new List<string>();
|
||||||
|
|
||||||
|
|
||||||
//Now we have a csv file. Try to parse it
|
//Now we have a csv file. Try to parse it
|
||||||
bool HadError = false;
|
bool HadError = false;
|
||||||
try
|
try
|
||||||
@ -637,5 +646,6 @@ namespace EduNetworkBuilder
|
|||||||
message += "\n" + one;
|
message += "\n" + one;
|
||||||
MessageBox.Show(message);
|
MessageBox.Show(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1769,10 +1769,22 @@
|
|||||||
<value>You must load a user profile before you can open a homework file.</value>
|
<value>You must load a user profile before you can open a homework file.</value>
|
||||||
<comment>NB_LoadUserFirst = You must load a user profile before you can open a homework file.</comment>
|
<comment>NB_LoadUserFirst = You must load a user profile before you can open a homework file.</comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PPF_AutoGenPW" xml:space="preserve">
|
||||||
|
<value>Auto Generate Passwords</value>
|
||||||
|
<comment>PPF_AutoGenPW = Auto Generate Passwords</comment>
|
||||||
|
</data>
|
||||||
<data name="PPF_ChangePassword" xml:space="preserve">
|
<data name="PPF_ChangePassword" xml:space="preserve">
|
||||||
<value>Change Password</value>
|
<value>Change Password</value>
|
||||||
<comment>PPF_ChangePassword = Change Password</comment>
|
<comment>PPF_ChangePassword = Change Password</comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PPF_ForcePWChange" xml:space="preserve">
|
||||||
|
<value>Change password at first login</value>
|
||||||
|
<comment>PPF_ForcePWChange = Change password at first login</comment>
|
||||||
|
</data>
|
||||||
|
<data name="PPF_ImportSettings" xml:space="preserve">
|
||||||
|
<value>Specify Import Settings</value>
|
||||||
|
<comment>PPF_ImportSettings = Specify Import Settings</comment>
|
||||||
|
</data>
|
||||||
<data name="PPF_ImportStudents" xml:space="preserve">
|
<data name="PPF_ImportStudents" xml:space="preserve">
|
||||||
<value>Import Students</value>
|
<value>Import Students</value>
|
||||||
<comment>PPF_ImportStudents = Import Students</comment>
|
<comment>PPF_ImportStudents = Import Students</comment>
|
||||||
|
Loading…
Reference in New Issue
Block a user