public Fibonacci_Levels_Calculator()
{
pnlInput = new Fancy_Panel(Language.T("Input Values"));
pnlOutput = new Fancy_Panel(Language.T("Output Values"));
alblInputNames = new Label[2];
atbxInputValues = new TextBox[2];
alblOutputNames = new Label[10];
alblOutputValues = new Label[10];
font = this.Font;
colorText = LayoutColors.ColorControlText;
MaximizeBox = false;
MinimizeBox = false;
Icon = Data.Icon;
BackColor = LayoutColors.ColorFormBack;
FormBorderStyle = FormBorderStyle.FixedDialog;
Text = Language.T("Fibonacci Levels");
// Input
pnlInput.Parent= this;
// Output
pnlOutput.Parent= this;
// Input Names
string[] asInputNames = new string[] {
Language.T("First price"),
Language.T("Second price"),
};
int number = 0;
foreach (string sName in asInputNames)
{
alblInputNames[number] = new Label();
alblInputNames[number].Parent = pnlInput;
alblInputNames[number].ForeColor = colorText;
alblInputNames[number].BackColor = Color.Transparent;
alblInputNames[number].AutoSize = true;
alblInputNames[number].Text = sName;
atbxInputValues[number] = new TextBox();
atbxInputValues[number].Parent = pnlInput;
atbxInputValues[number].TextChanged += new EventHandler(TbxInput_TextChanged);
number++;
}
// Output Names
number = 0;
foreach (float fn in afLevels)
{
alblOutputNames[number] = new Label();
alblOutputNames[number].Parent = pnlOutput;
alblOutputNames[number].ForeColor = colorText;
alblOutputNames[number].BackColor = Color.Transparent;
alblOutputNames[number].AutoSize = true;
alblOutputNames[number].Text = fn.ToString("F1") + " %";
alblOutputValues[number] = new Label();
alblOutputValues[number].Parent = pnlOutput;
alblOutputValues[number].ForeColor = colorText;
alblOutputValues[number].BackColor = Color.Transparent;
alblOutputValues[number].AutoSize = true;
number++;
}
alblOutputNames[2].Font = new Font(Font.FontFamily, Font.Size, FontStyle.Bold);
alblOutputNames[3].Font = new Font(Font.FontFamily, Font.Size, FontStyle.Bold);
alblOutputNames[4].Font = new Font(Font.FontFamily, Font.Size, FontStyle.Bold);
alblOutputValues[2].Font = new Font(Font.FontFamily, Font.Size, FontStyle.Bold);
alblOutputValues[3].Font = new Font(Font.FontFamily, Font.Size, FontStyle.Bold);
alblOutputValues[4].Font = new Font(Font.FontFamily, Font.Size, FontStyle.Bold);
}