Exemple #1
0
        //--------------------------------------------------------------------------------


        public ViewPositionForm(RealTimePositionCalculator c)
        {
            InitializeComponent();

            calc = c;

            helper.Add(new DgvHelper(dgvRealTimePosition, Name, true));
            dgvRealTimePosition.DataSource = AllRealTimePositions;

            helper.handleCellSelected += new CellSelectEventHandler(h_handleCellSelected);

            handleDtcMessageReceived = new IncomingDtcMessageEventHandler(DtcMessageReceived);
            handleCusipSelected      = new CusipSelectEventHandler(Instance_handleCusipSelected);
            handleStockInfoUpdated   = new StockInfoUpdateEventHandler(Instance_handleStockInfoUpdated);
            handleStockPriceUpdated  = new StockPriceUpdateEventHandler(Instance_handleStockPriceUpdated);

            DtcChannel.Instance.handleDtcMessageReceived += handleDtcMessageReceived;
            DtcChannel.Instance.handleCusipSelected      += handleCusipSelected;
            DtcChannel.Instance.handleStockInfoUpdated   += handleStockInfoUpdated;
            DtcChannel.Instance.handleStockPriceUpdated  += handleStockPriceUpdated;

            ToolTip ToolTipBtnPledge = new ToolTip();

            ToolTipBtnPledge.SetToolTip(btnPledge, "Pledge the highlighted rows");

            /*
             * DtcChannel.Instance.handleDtcMessageReceived += new IncomingDtcMessageEventHandler(DtcMessageReceived);
             * DtcChannel.Instance.handleCusipSelected += new CusipSelectEventHandler(Instance_handleCusipSelected);
             * DtcChannel.Instance.handleStockInfoUpdated += new StockInfoUpdateEventHandler(Instance_handleStockInfoUpdated);
             * DtcChannel.Instance.handleStockPriceUpdated += new StockPriceUpdateEventHandler(Instance_handleStockPriceUpdated);
             */
        }
        public NsccProjectedNeedsForm(RealTimePositionCalculator c)
        {
            InitializeComponent();

            calc = c;

            helper.Add(new DgvHelper(dgvRealTimePosition, Name, true));
            dgvRealTimePosition.DataSource = ProjectedNeeds;

            handleStockInfoUpdated   = new StockInfoUpdateEventHandler(Instance_handleStockInfoUpdated);
            handleDtcMessageReceived = new IncomingDtcMessageEventHandler(Instance_handleDtcMessageReceived);

            DtcChannel.Instance.handleStockInfoUpdated   += handleStockInfoUpdated;
            DtcChannel.Instance.handleDtcMessageReceived += handleDtcMessageReceived;
        }
        public PriceControlForm(RealTimePositionCalculator c)
        {
            InitializeComponent();

            calc = c;

            dgvControl.DataSource         = ProblemOrders;
            dgvDifferentPrices.DataSource = DifferentPricedOrders;

            helper.Add(new DgvHelper(dgvControl, this.Name, true));
            helper.Add(new DgvHelper(dgvDifferentPrices, this.Name, true));
            helper.handleCellSelected += new CellSelectEventHandler(h_handleCellSelected);

            handleDtcMessageReceived = new IncomingDtcMessageEventHandler(DtcMessageReceived);
            handleCusipSelected      = new CusipSelectEventHandler(Instance_handleCusipSelected);
            handleStockInfoUpdated   = new StockInfoUpdateEventHandler(Instance_handleStockInfoUpdated);
            handleStockPriceUpdated  = new StockPriceUpdateEventHandler(Instance_handleStockPriceUpdated);

            DtcChannel.Instance.handleDtcMessageReceived += handleDtcMessageReceived;
            DtcChannel.Instance.handleCusipSelected      += handleCusipSelected;
            DtcChannel.Instance.handleStockInfoUpdated   += handleStockInfoUpdated;
            DtcChannel.Instance.handleStockPriceUpdated  += handleStockPriceUpdated;
        }