private void AemInstanceDialog_Load(object sender, EventArgs e)
{
// init instance type selectbox
int selectedAemInstanceType = 0;
cboAemInstanceType.DisplayMember = "Key";
cboAemInstanceType.ValueMember = "Value";
int i = 0;
foreach (AemInstanceType aemInstanceType in Enum.GetValues(typeof(AemInstanceType))) {
string name = AemInstanceTypeUtil.GetLabel(aemInstanceType);
cboAemInstanceType.Items.Add(new KeyValuePair<string, AemInstanceType>(name, aemInstanceType));
if (aemInstanceType == mInstance.AemInstanceType) {
selectedAemInstanceType = i;
}
i++;
}
// init iconset selectbox
int selectedIconSet = 0;
cboIconSet.DisplayMember = "Key";
cboIconSet.ValueMember = "Value";
i = 0;
foreach (IconSet iconset in Enum.GetValues(typeof(IconSet))) {
string name = iconset.ToString().ToLower();
if (iconset == IconSet.DEFAULT) {
name = "Default";
}
else if (iconset.ToString().StartsWith("NUM")) {
name = "Number #" + iconset.ToString().Substring(3);
}
else if (iconset.ToString().StartsWith("INV_NUM")) {
name = "Number #" + iconset.ToString().Substring(7) + " (inverted)";
}
else if (iconset.ToString().StartsWith("Q")) {
name = "Square #" + iconset.ToString().Substring(1);
}
else if (iconset.ToString().StartsWith("INV_Q")) {
name = "Square #" + iconset.ToString().Substring(5) + " (inverted)";
}
cboIconSet.Items.Add(new KeyValuePair<string, IconSet>(name, iconset));
if (iconset == mInstance.IconSet) {
selectedIconSet = i;
}
i++;
}
cboAemInstanceType.SelectedIndex = selectedAemInstanceType;
txtName.Text = mInstance.Name;
txtHostname.Text = mInstance.Hostname;
txtPort.Text = mInstance.Port.ToString();
txtContextPath.Text = mInstance.ContextPath;
txtPath.Text = mInstance.Path;
txtJavaExecutable.Text = mInstance.JavaExecutable;
txtUsername.Text = mInstance.Username;
txtPassword.Text = mInstance.Password;
chkRunmodeAuthor.Checked = (mInstance.Runmode == Runmode.AUTHOR);
chkRunmodePublish.Checked = (mInstance.Runmode == Runmode.PUBLISH);
txtAdditionalRunmodes.Text = mInstance.AdditionalRunmodes;
chkRunmodeSampleContent.Checked = mInstance.RunmodeSampleContent;
cboIconSet.SelectedIndex = selectedIconSet;
txtCustomIconPath.Text = mInstance.CustomIconPath;
txtHeapMinSizeMb.Text = mInstance.HeapMinSizeMb.ToString();
txtHeapMaxSizeMb.Text = mInstance.HeapMaxSizeMb.ToString();
txtMaxPermSizeMb.Text = mInstance.MaxPermSizeMb.ToString();
chkJVMDebug.Checked = mInstance.JVMDebug;
txtDebugPort.Text = mInstance.DebugPort.ToString();
txtDebugPort.Enabled = chkJVMDebug.Checked;
chkJProfiler.Checked = mInstance.JProfiler;
txtJProfilerPort.Text = mInstance.JProfilerPort.ToString();
txtJProfilerPort.Enabled = chkJProfiler.Checked;
chkJConsole.Checked = mInstance.JConsole;
txtJConsolePort.Text = mInstance.JConsolePort.ToString();
txtJConsolePort.Enabled = chkJConsole.Checked;
chkHideConfigWizards.Checked = mInstance.HideConfigWizard;
chkShowInstanceWindow.Checked = mInstance.ShowInstanceWindow;
chkOpenBrowser.Checked = mInstance.OpenBrowser;
chkRemoteProcess.Checked = mInstance.RemoteProcess;
chkShowInTaskbar.Checked = mInstance.ShowInTaskbar;
chkCustomJVMParam1Active.Checked = mInstance.CustomJVMParam1Active;
txtCustomJVMParam1.Text = mInstance.CustomJVMParam1;
txtCustomJVMParam1.Enabled = chkCustomJVMParam1Active.Checked;
chkCustomJVMParam2Active.Checked = mInstance.CustomJVMParam2Active;
txtCustomJVMParam2.Text = mInstance.CustomJVMParam2;
txtCustomJVMParam2.Enabled = chkCustomJVMParam2Active.Checked;
chkCustomJVMParam3Active.Checked = mInstance.CustomJVMParam3Active;
txtCustomJVMParam3.Text = mInstance.CustomJVMParam3;
txtCustomJVMParam3.Enabled = chkCustomJVMParam3Active.Checked;
txtBrowserExecutable.Text = mInstance.BrowserExecutable;
}