protected Small_Indicator_Chart smallIndicatorChart; //Indicator chart /// <summary> /// Initialize the controls in panel pnlMarket /// </summary> void InitializeMarket() { // Symbol tscbSymbol = new ToolStripComboBox(); tscbSymbol.Name = "tscbSymbol"; tscbSymbol.AutoSize = false; tscbSymbol.Items.AddRange(Instruments.SymbolList); tscbSymbol.DropDownStyle = ComboBoxStyle.DropDownList; tscbSymbol.SelectedIndex = 0; tscbSymbol.ToolTipText = Language.T("Symbol"); tscbSymbol.Overflow = ToolStripItemOverflow.Never; tscbSymbol.SelectedIndexChanged += new EventHandler(SelectedIndexChanged); tsMarket.Items.Add(tscbSymbol); // Period tscbPeriod = new ToolStripComboBox(); tscbPeriod.Name = "tscbPeriod"; tscbPeriod.AutoSize = false; tscbPeriod.DropDownStyle = ComboBoxStyle.DropDownList; tscbPeriod.Items.AddRange(new string [] { " 1 " + Language.T("Minute"), " 5 " + Language.T("Minutes"), "15 " + Language.T("Minutes"), "30 " + Language.T("Minutes"), " 1 " + Language.T("Hour"), " 4 " + Language.T("Hours"), " 1 " + Language.T("Day"), " 1 " + Language.T("Week") }); tscbPeriod.SelectedIndex = 6; tscbPeriod.ToolTipText = Language.T("Data time frame."); tscbPeriod.Overflow = ToolStripItemOverflow.Never; tscbPeriod.SelectedIndexChanged += new EventHandler(SelectedIndexChanged); tsMarket.Items.Add(tscbPeriod); // Button Market Properties tsbtnCharges = new ToolStripButton(); tsbtnCharges.Text = Language.T("Charges"); tsbtnCharges.Name = "Charges"; tsbtnCharges.ToolTipText = Language.T("Spread, Swap numbers, Slippage."); tsbtnCharges.Overflow = ToolStripItemOverflow.Never; tsbtnCharges.Click += new EventHandler(BtnTools_OnClick); tsMarket.Items.Add(tsbtnCharges); tsMarket.Resize += new EventHandler(tsMarket_Resize); // Info Panel Market Statistics infpnlMarketStatistics = new Info_Panel(); infpnlMarketStatistics.Parent = pnlMarket; infpnlMarketStatistics.Dock = DockStyle.Fill; // Splitter Splitter splitter = new Splitter(); splitter.Parent = pnlMarket; splitter.Dock = DockStyle.Bottom; splitter.BorderStyle = BorderStyle.None; splitter.Height = space; // Small Indicator Chart smallIndicatorChart = new Small_Indicator_Chart(); smallIndicatorChart.Parent = pnlMarket; smallIndicatorChart.Cursor = Cursors.Hand; smallIndicatorChart.Dock = DockStyle.Bottom; smallIndicatorChart.MinimumSize = new Size(100, 50); smallIndicatorChart.ShowDynamicInfo = true; smallIndicatorChart.MouseUp += new MouseEventHandler(SmallIndicatorChart_MouseUp); smallIndicatorChart.MouseMove += new MouseEventHandler(SmallIndicatorChart_MouseMove); smallIndicatorChart.MouseLeave += new EventHandler(SmallIndicatorChart_MouseLeave); toolTip.SetToolTip(smallIndicatorChart, Language.T("Click to view the full chart.")); pnlMarket.Resize += new EventHandler(pnlMarket_Resize); return; }
protected Small_Balance_Chart smallBalanceChart; // Small Balance Chart /// <summary> /// Initializes the controls in panel pnlOverview /// </summary> void InitializeAccount() { string[] asMethods = Enum.GetNames(typeof(InterpolationMethod)); for (int i = 0; i < asMethods.Length; i++) { asMethods[i] = Language.T(asMethods[i]); } Graphics g = CreateGraphics(); int iLongestMethod = 0; foreach (string sMethod in asMethods) { if ((int)g.MeasureString(sMethod, Font).Width > iLongestMethod) { iLongestMethod = (int)g.MeasureString(sMethod, Font).Width; } } g.Dispose(); // ComboBox Interpolation Methods tscbInterpolationMethod = new ToolStripComboBox(); tscbInterpolationMethod.Name = "tscbInterpolationMethod"; tscbInterpolationMethod.AutoSize = false; tscbInterpolationMethod.DropDownStyle = ComboBoxStyle.DropDownList; tscbInterpolationMethod.Items.AddRange(asMethods); tscbInterpolationMethod.SelectedIndex = 0; tscbInterpolationMethod.Width = iLongestMethod + (int)(18 * Data.HorizontalDLU); tscbInterpolationMethod.ToolTipText = Language.T("Bar interpolation method."); tscbInterpolationMethod.SelectedIndexChanged += new EventHandler(SelectedIndexChanged); tsAccount.Items.Add(tscbInterpolationMethod); // Button Comparator tsbtComparator = new ToolStripButton(); tsbtComparator.Text = Language.T("Comparator"); tsbtComparator.Name = "Comparator"; tsbtComparator.Click += new EventHandler(BtnTools_OnClick); tsbtComparator.ToolTipText = Language.T("Compare the interpolating methods."); tsAccount.Items.Add(tsbtComparator); // Button Scanner tsbtScanner = new ToolStripButton(); tsbtScanner.Text = Language.T("Scanner"); tsbtScanner.Name = "Scanner"; tsbtScanner.Click += new EventHandler(BtnTools_OnClick); tsbtScanner.ToolTipText = Language.T("Perform a deep intrabar scan.") + Environment.NewLine + Language.T("Quick scan") + " - F6."; tsAccount.Items.Add(tsbtScanner); // Button Analyzer tsbtAnalyzer = new ToolStripButton(); tsbtAnalyzer.Text = Language.T("Analyzer"); tsbtAnalyzer.Name = "Analyzer"; tsbtAnalyzer.Click += new EventHandler(BtnTools_OnClick); tsAccount.Items.Add(tsbtAnalyzer); // Info Panel Account Statistics infpnlAccountStatistics = new Info_Panel(); infpnlAccountStatistics.Parent = pnlAccount; infpnlAccountStatistics.Dock = DockStyle.Fill; Splitter spliter = new Splitter(); spliter.Parent = pnlAccount; spliter.Dock = DockStyle.Bottom; spliter.BorderStyle = BorderStyle.None; spliter.Height = space; // Small Balance Chart smallBalanceChart = new Small_Balance_Chart(); smallBalanceChart.Parent = pnlAccount; smallBalanceChart.Cursor = Cursors.Hand; smallBalanceChart.Dock = DockStyle.Bottom; smallBalanceChart.MinimumSize = new Size(100, 50); smallBalanceChart.ShowDynamicInfo = true; smallBalanceChart.MouseMove += new MouseEventHandler(SmallBalanceChart_MouseMove); smallBalanceChart.MouseLeave += new EventHandler(SmallBalanceChart_MouseLeave); smallBalanceChart.MouseUp += new MouseEventHandler(SmallBalanceChart_MouseUp); toolTip.SetToolTip(smallBalanceChart, Language.T("Click to view the full chart.") + Environment.NewLine + Language.T("Right click to detach chart.")); pnlAccount.Resize += new EventHandler(pnlAccount_Resize); return; }
/// <summary> /// Initialize the controls in panel pnlMarket /// </summary> void InitializeMarket() { // Symbol tscbSymbol = new ToolStripComboBox(); tscbSymbol.Name = "tscbSymbol"; tscbSymbol.AutoSize = false; tscbSymbol.Items.AddRange(Instruments.SymbolList); tscbSymbol.DropDownStyle = ComboBoxStyle.DropDownList; tscbSymbol.SelectedIndex = 0; tscbSymbol.ToolTipText = Language.T("Symbol"); tscbSymbol.Overflow = ToolStripItemOverflow.Never; tscbSymbol.SelectedIndexChanged += new EventHandler(SelectedIndexChanged); tsMarket.Items.Add(tscbSymbol); // Period tscbPeriod = new ToolStripComboBox(); tscbPeriod.Name = "tscbPeriod"; tscbPeriod.AutoSize = false; tscbPeriod.DropDownStyle = ComboBoxStyle.DropDownList; tscbPeriod.Items.AddRange(new string [] { " 1 " + Language.T("Minute"), " 5 " + Language.T("Minutes"), "15 " + Language.T("Minutes"), "30 " + Language.T("Minutes"), " 1 " + Language.T("Hour"), " 4 " + Language.T("Hours"), " 1 " + Language.T("Day"), " 1 " + Language.T("Week") }); tscbPeriod.SelectedIndex = 6; tscbPeriod.ToolTipText = Language.T("Data time frame."); tscbPeriod.Overflow = ToolStripItemOverflow.Never; tscbPeriod.SelectedIndexChanged += new EventHandler(SelectedIndexChanged); tsMarket.Items.Add(tscbPeriod); // Button Market Properties tsbtnCharges = new ToolStripButton(); tsbtnCharges.Text = Language.T("Charges"); tsbtnCharges.Name = "Charges"; tsbtnCharges.ToolTipText = Language.T("Spread, Swap numbers, Slippage."); tsbtnCharges.Overflow = ToolStripItemOverflow.Never; tsbtnCharges.Click += new EventHandler(BtnTools_OnClick); tsMarket.Items.Add(tsbtnCharges); tsMarket.Resize += new EventHandler(tsMarket_Resize); // Info Panel Market Statistics infpnlMarketStatistics = new Info_Panel(); infpnlMarketStatistics.Parent = pnlMarket; infpnlMarketStatistics.Dock = DockStyle.Fill; // Splitter Splitter splitter = new Splitter(); splitter.Parent = pnlMarket; splitter.Dock = DockStyle.Bottom; splitter.BorderStyle = BorderStyle.None; splitter.Height = space; // Small Indicator Chart smallIndicatorChart = new Small_Indicator_Chart(); smallIndicatorChart.Parent = pnlMarket; smallIndicatorChart.Cursor = Cursors.Hand; smallIndicatorChart.Dock = DockStyle.Bottom; smallIndicatorChart.MinimumSize = new Size(100, 50); smallIndicatorChart.ShowDynamicInfo = true; smallIndicatorChart.MouseUp += new MouseEventHandler(SmallIndicatorChart_MouseUp); smallIndicatorChart.MouseMove += new MouseEventHandler(SmallIndicatorChart_MouseMove); smallIndicatorChart.MouseLeave += new EventHandler(SmallIndicatorChart_MouseLeave); toolTip.SetToolTip(smallIndicatorChart, Language.T("Click to view the full chart.")); pnlMarket.Resize += new EventHandler(pnlMarket_Resize); return; }
/// <summary> /// Initializes the controls in panel pnlOverview /// </summary> void InitializeAccount() { string[] asMethods = Enum.GetNames(typeof(InterpolationMethod)); for (int i = 0; i < asMethods.Length; i++) asMethods[i] = Language.T(asMethods[i]); Graphics g = CreateGraphics(); int iLongestMethod = 0; foreach (string sMethod in asMethods) if ((int)g.MeasureString(sMethod, Font).Width > iLongestMethod) iLongestMethod = (int)g.MeasureString(sMethod, Font).Width; g.Dispose(); // ComboBox Interpolation Methods tscbInterpolationMethod = new ToolStripComboBox(); tscbInterpolationMethod.Name = "tscbInterpolationMethod"; tscbInterpolationMethod.AutoSize = false; tscbInterpolationMethod.DropDownStyle = ComboBoxStyle.DropDownList; tscbInterpolationMethod.Items.AddRange(asMethods); tscbInterpolationMethod.SelectedIndex = 0; tscbInterpolationMethod.Width = iLongestMethod + (int)(18 * Data.HorizontalDLU); tscbInterpolationMethod.ToolTipText = Language.T("Bar interpolation method."); tscbInterpolationMethod.SelectedIndexChanged += new EventHandler(SelectedIndexChanged); tsAccount.Items.Add(tscbInterpolationMethod); // Button Comparator tsbtComparator = new ToolStripButton(); tsbtComparator.Text = Language.T("Comparator"); tsbtComparator.Name = "Comparator"; tsbtComparator.Click += new EventHandler(BtnTools_OnClick); tsbtComparator.ToolTipText = Language.T("Compare the interpolating methods."); tsAccount.Items.Add(tsbtComparator); // Button Scanner tsbtScanner = new ToolStripButton(); tsbtScanner.Text = Language.T("Scanner"); tsbtScanner.Name = "Scanner"; tsbtScanner.Click += new EventHandler(BtnTools_OnClick); tsbtScanner.ToolTipText = Language.T("Perform a deep intrabar scan.") + Environment.NewLine + Language.T("Quick scan") + " - F6."; tsAccount.Items.Add(tsbtScanner); // Button Analyzer tsbtAnalyzer = new ToolStripButton(); tsbtAnalyzer.Text = Language.T("Analyzer"); tsbtAnalyzer.Name = "Analyzer"; tsbtAnalyzer.Click += new EventHandler(BtnTools_OnClick); tsAccount.Items.Add(tsbtAnalyzer); // Info Panel Account Statistics infpnlAccountStatistics = new Info_Panel(); infpnlAccountStatistics.Parent = pnlAccount; infpnlAccountStatistics.Dock = DockStyle.Fill; Splitter spliter = new Splitter(); spliter.Parent = pnlAccount; spliter.Dock = DockStyle.Bottom; spliter.BorderStyle = BorderStyle.None; spliter.Height = space; // Small Balance Chart smallBalanceChart = new Small_Balance_Chart(); smallBalanceChart.Parent = pnlAccount; smallBalanceChart.Cursor = Cursors.Hand; smallBalanceChart.Dock = DockStyle.Bottom; smallBalanceChart.MinimumSize = new Size(100, 50); smallBalanceChart.ShowDynamicInfo = true; smallBalanceChart.MouseMove += new MouseEventHandler(SmallBalanceChart_MouseMove); smallBalanceChart.MouseLeave += new EventHandler(SmallBalanceChart_MouseLeave); smallBalanceChart.MouseUp += new MouseEventHandler(SmallBalanceChart_MouseUp); toolTip.SetToolTip(smallBalanceChart, Language.T("Click to view the full chart.") + Environment.NewLine + Language.T("Right click to detach chart.")); pnlAccount.Resize += new EventHandler(pnlAccount_Resize); return; }