Added ctrl-s to save, and removed wireless ports showing mac addresses

This commit is contained in:
Tim Young 2015-08-09 20:09:17 -06:00
parent 33e9a61efd
commit 4b0b06fb65
5 changed files with 39 additions and 17 deletions

View File

@ -202,7 +202,7 @@ namespace EduNetworkBuilder
public void Save()
{
Save(@"C:\Users\tyoung\Desktop\Test.enbx");
Save(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Test.enbx"));
}
public void Save(string filename)

View File

@ -163,6 +163,10 @@ namespace EduNetworkBuilder
pbNetworkView_Delete_Click(sender, e);
ItemClickedOn = null;
}
if(e.KeyCode == Keys.S && e.Modifiers == Keys.Control)
{
doSave(true);
}
//MessageBox.Show(e.KeyCode.ToString());
}
@ -882,8 +886,14 @@ namespace EduNetworkBuilder
UpdateForm();
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
public void doSave(bool TrySkipPrompt = false)
{
if (TrySkipPrompt && myNetwork.NetworkFilename != null && File.Exists(myNetwork.NetworkFilename))
{
//Just save over it
myNetwork.Save(myNetwork.NetworkFilename);
}
else
{
SaveFileDialog mydialog = new SaveFileDialog();
mydialog.AddExtension = true;
@ -901,6 +911,13 @@ namespace EduNetworkBuilder
LastPath = mydialog.FileName;
myNetwork.Save(mydialog.FileName);
}
lblStatus.Text = NB.Translate("_Saved");
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
doSave(false);
}
private void BuilderWindow_Resize(object sender, EventArgs e)
{

View File

@ -152,7 +152,7 @@ namespace EduNetworkBuilder
{
string connected = " ";
if (isConnected(true)) connected = "*";
if (myNicType == NicType.port)
if (myNicType == NicType.port || myNicType == NicType.wport)
return NicName() + connected;
return NicName() + connected + " " + MAC;
}

View File

@ -2,6 +2,7 @@
{\*\generator Riched20 6.3.9600}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9 Version 1.0.20\par
* wports do not display on tooltips or when printing the device info\par
* Added ctrl-s to quick-save a network we are working on\par
Version 1.0.19 08/08/2015\par
*Updated context help for most puzzles that introduce new ideas.\par
* Sorted Help topics when adding them in net-tests.\par

View File

@ -705,4 +705,8 @@
<value>Router</value>
<comment>Text used in the program on buttons and the like</comment>
</data>
<data name="_Saved" xml:space="preserve">
<value>Saved</value>
<comment>String used when we have successfully saved the network.</comment>
</data>
</root>