More translation window basics
This commit is contained in:
parent
82a06495df
commit
eca5aef396
@ -439,7 +439,7 @@ namespace EduNetworkBuilder
|
|||||||
if(ModifierKeys == Keys.Control && e.Button == MouseButtons.Left)
|
if(ModifierKeys == Keys.Control && e.Button == MouseButtons.Left)
|
||||||
{
|
{
|
||||||
//ctrl-click -- open translators window
|
//ctrl-click -- open translators window
|
||||||
TranslationWindow TW = new TranslationWindow();
|
TranslationWindow TW = new TranslationWindow(myNet);
|
||||||
TW.Show();
|
TW.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,31 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
public partial class TranslationWindow : Form
|
public partial class TranslationWindow : Form
|
||||||
{
|
{
|
||||||
public TranslationWindow()
|
Network myNet = null;
|
||||||
|
public TranslationWindow(Network ToEdit)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.KeyPreview = true;
|
this.KeyPreview = true;
|
||||||
|
myNet = ToEdit;
|
||||||
|
|
||||||
|
LocalSetup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LocalSetup()
|
||||||
|
{
|
||||||
|
string[,] LanguageChoices = NB.LanguageChoices;
|
||||||
|
cb1Language.Items.Clear();
|
||||||
|
cb2Language.Items.Clear();
|
||||||
|
for (int i = 0; i < LanguageChoices.GetLength(0); i++)
|
||||||
|
{
|
||||||
|
cb1Language.Items.Add(LanguageChoices[i, 0]);
|
||||||
|
cb2Language.Items.Add(LanguageChoices[i, 0]);
|
||||||
|
}
|
||||||
|
if (LanguageChoices.Length > 0)
|
||||||
|
cb1Language.SelectedIndex = 0;
|
||||||
|
if (LanguageChoices.Length > 1)
|
||||||
|
cb1Language.SelectedIndex = 1;
|
||||||
|
Icon = Properties.Resources.NBIco;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnClose_Click(object sender, EventArgs e)
|
private void btnClose_Click(object sender, EventArgs e)
|
||||||
|
Loading…
Reference in New Issue
Block a user