public ZGraphControl(EngineGui engineGui) { m_EngineID = engineGui.EngineID; InitializeComponent(); m_RegenerateDelegate = new EventHandler(this.Regenerate); }
// ***************************************************************** // **** Members **** // ***************************************************************** // #endregion// members #region Constructors // ***************************************************************** // **** Constructors **** // ***************************************************************** public OrderEngineHud(EngineGui engineGui) : base(engineGui) { InitializeComponent(); pIsUserTradingEnabled.Text = "Trading"; base.Initialize(engineGui); }
// ***************************************************************** // **** Members **** // ***************************************************************** // #endregion// members #region Constructors // ***************************************************************** // **** Constructors **** // ***************************************************************** public TradeEngineHud(EngineGui engineGui) : base(engineGui) { InitializeComponent(); pIsQuoteEnabled.Text = "Quote"; base.Initialize(engineGui); }
// // ***************************************** // **** 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(); }
// ***************************************************************** // **** Constructors **** // ***************************************************************** // public EngineControl(EngineGui engineGui) { m_EngineID = engineGui.EngineID; m_ParamInfoList = engineGui.ParameterList; InitializeComponent(); this.SuspendLayout(); InitializeLayout(); this.ResumeLayout(false); }
// // ************************************************************* // **** 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()
// // // ************************************************* // **** 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()
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); } } } }
// ***************************************************************** // **** 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); }