コード例 #1
0
        public ZGraphControl(EngineGui engineGui)
        {
            m_EngineID = engineGui.EngineID;
            InitializeComponent();

            m_RegenerateDelegate = new EventHandler(this.Regenerate);
        }
コード例 #2
0
        // *****************************************************************
        // ****                     Members                             ****
        // *****************************************************************
        //
        #endregion// members


        #region Constructors
        // *****************************************************************
        // ****                     Constructors                        ****
        // *****************************************************************
        public OrderEngineHud(EngineGui engineGui) : base(engineGui)
        {
            InitializeComponent();

            pIsUserTradingEnabled.Text = "Trading";
            base.Initialize(engineGui);
        }
コード例 #3
0
        // *****************************************************************
        // ****                     Members                             ****
        // *****************************************************************
        //
        #endregion// members


        #region Constructors
        // *****************************************************************
        // ****                     Constructors                        ****
        // *****************************************************************
        public TradeEngineHud(EngineGui engineGui) : base(engineGui)
        {
            InitializeComponent();

            pIsQuoteEnabled.Text = "Quote";
            base.Initialize(engineGui);
        }
コード例 #4
0
        //
        // *****************************************
        // ****     Setup Initialize()          ****
        // *****************************************
        protected override void SetupInitialize(IEngineHub myEngineHub, IEngineContainer engineContainer, int engineID, bool setupGui)
        {
            base.SetupInitialize(myEngineHub, engineContainer, engineID, false);
            EngineGui engineGui = base.SetupGuiTemplates();

            if (engineContainer is Strategy)
            {
                ParentStrategy = (Strategy)engineContainer;
                Log            = ParentStrategy.StrategyHub.Log;
            }
            m_Services = AppServices.GetInstance();
        }
コード例 #5
0
        // *****************************************************************
        // ****                     Constructors                        ****
        // *****************************************************************
        //
        public EngineControl(EngineGui engineGui)
        {
            m_EngineID      = engineGui.EngineID;
            m_ParamInfoList = engineGui.ParameterList;


            InitializeComponent();

            this.SuspendLayout();
            InitializeLayout();
            this.ResumeLayout(false);
        }
コード例 #6
0
        //
        // *************************************************************
        // ****                 Setup Initialize()                  ****
        // *************************************************************
        /// <summary>
        /// Since I depend critically on an OrderBookHub, I will look for them now.
        /// </summary>
        /// <param name="myEngineHub"></param>
        /// <param name="engineContainer"></param>
        /// <param name="engineID"></param>
        /// <param name="setupGui"></param>
        protected override void SetupInitialize(IEngineHub myEngineHub, IEngineContainer engineContainer, int engineID, bool setupGui)
        {
            base.SetupInitialize(myEngineHub, engineContainer, engineID, false);
            EngineGui engineGui = base.SetupGuiTemplates();

            engineGui.LowerHudFullName = typeof(OrderEngineHud).FullName;


            // Collect services that I need.
            m_Hub                = (Hub)myEngineHub;
            this.Log             = m_Hub.Log;
            m_ExecutionContainer = (ThreadContainer)engineContainer;
        }// SetupInitialize()
コード例 #7
0
ファイル: Engine.cs プロジェクト: nagyist/mkbiltek.trading
        //
        //
        // *************************************************
        // ****         Setup Gui Templates()           ****
        // *************************************************
        /// <summary>
        /// Creates a collection of templates to describe guis associated
        /// with this particular engine.
        /// </summary>
        protected EngineGui SetupGuiTemplates()
        {
            // Create the basic Engine Gui Template first

            EngineGui engineGui = new EngineGui();

            engineGui.EngineID       = this.EngineID;
            engineGui.DisplayName    = this.EngineName;
            engineGui.EngineFullName = this.GetType().FullName;
            engineGui.ParameterList.AddRange(this.m_PInfo);

            m_EngineGuis.Add(engineGui);
            return(engineGui);
        }// SetupGuiTemplates()
コード例 #8
0
 public void Initialize(EngineGui engineGui)
 {
     foreach (ParameterInfo pInfo in engineGui.ParameterList)
     {
         foreach (Control c in this.Controls)
         {
             if (c is ParamControlBase && c.Name.Contains(pInfo.Name))
             {
                 ParamControlBase controlBase = (ParamControlBase)c;
                 m_ParamControl.Add(pInfo.ParameterID, controlBase);
                 controlBase.InitializeParameter(pInfo);
             }
         }
     }
 }
コード例 #9
0
        // *****************************************************************
        // ****                     Constructors                        ****
        // *****************************************************************
        public HudPanel(EngineGui engineGui) : this()
        {
            InitializeComponent();
            this.EngineId = engineGui.EngineID;

            // Automatically add ParamBaseControls not already added by user.
            //foreach (Control control in this.Controls)
            //{
            //   if (control is ParamControlBase)
            //    {
            //        ParamControlBase controlBase = (ParamControlBase) control;
            //        if (m_ParamControl.ContainsKey(controlBase.m_ParameterInfo.EngineID) == false)
            //            m_ParamControl.Add(controlBase.m_ParameterInfo.EngineID, controlBase);
            //    }
            //}

            // Load controls into this page TODO: Move this to base class
            //Dictionary<string, Control> controls = new Dictionary<string, Control>();
            //foreach (Control c in this.Controls)
            //    controls.Add(c.Name, c);
        }