Ejemplo n.º 1
0
        private void ChooseStrategy(DialogResult result, GuideGoblinBat guide, Yield yield, SelectStatisticalData data)
        {
            splitContainerStrategy.Panel1.Controls.Add(yield);
            splitContainerStrategy.Panel2.Controls.Add(data);
            splitContainerGuide.Panel1.Controls.Add(guide);
            yield.Dock = DockStyle.Fill;
            data.Dock  = DockStyle.Fill;
            guide.Dock = DockStyle.Fill;
            Choice     = result;
            Size       = new Size(1241, 491);
            splitContainerStrategy.SplitterDistance = 127;
            splitContainerStrategy.Panel1.BackColor = Color.FromArgb(121, 133, 130);
            splitContainerStrategy.Panel2.BackColor = Color.FromArgb(121, 133, 130);
            splitContainerGuide.Panel1.BackColor    = Color.FromArgb(121, 133, 130);
            yield.SendHermes  += data.OnReceiveHermes;
            data.SendStrategy += yield.OnReceiveStrategy;
            data.SendClose    += OnReceiveClose;
            Dictionary <string, int> param = new Dictionary <string, int>(1024);

            foreach (string[] temp in yield)
            {
                for (int i = 0; i < temp.Length; i++)
                {
                    param[string.Concat(i, ';', temp[i])] = i;
                }
            }

            data.StartProgress(param);
            SetControlsChangeFont(result, Controls, new Font("Consolas", Font.Size + 0.75F, FontStyle.Regular));
            ResumeLayout();
            Show();
            CenterToScreen();
            Application.DoEvents();
            data.GetStrategy(yield.SetStrategy(TimerBox.Show("Click 'No' to Edit the Automatically generated Strategy.\n\nIf No Selection is made for 20 Seconds,\nTrading Starts with an Automatically Generated Strategy.", "Notice", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, 21753)));
        }
Ejemplo n.º 2
0
 private void ChooseStrategy(DialogResult result, GuideGoblinBat guide, ChooseAnalysis analysis, SelectStrategies strategy)
 {
     analysis.SendClose += strategy.OnReceiveClose;
     strategy.OnReceiveClose(analysis.Key.Split('^'));
     splitContainerStrategy.Panel1.Controls.Add(analysis);
     splitContainerStrategy.Panel2.Controls.Add(strategy);
     splitContainerGuide.Panel1.Controls.Add(guide);
     analysis.Dock = DockStyle.Fill;
     strategy.Dock = DockStyle.Fill;
     guide.Dock    = DockStyle.Fill;
     font          = result;
     Size          = new Size(1650, 920);
     splitContainerStrategy.SplitterDistance = 287;
     splitContainerStrategy.BackColor        = Color.FromArgb(121, 133, 130);
     splitContainerGuide.Panel1.BackColor    = Color.FromArgb(121, 133, 130);
     strategy.SendClose += OnReceiveClose;
     strategy.OnReceiveColor(analysis.ColorFactory);
     SetControlsChangeFont(result, Controls, new Font("Consolas", Font.Size, FontStyle.Regular));
     ResumeLayout();
     ShowDialog();
 }