public DataGridStateManagerForOpenTaxlots(string name,
                                           DataGridView dataGridView,
                                           EventHandler <RefreshBindingSourceEventArgs> refreshBindingSource,
                                           RefreshDataDelegate refreshDataDelegate,
                                           ToolStripStatusLabel filterStatusLabel,
                                           ToolStripStatusLabel showAllLabel,
                                           ToolStripStatusLabel totalSumLabel,
                                           ToolStripStatusLabel tradeSumLabel)
     : base(name, GHVHugoLib.InstrumentType.Stock, dataGridView, refreshBindingSource, refreshDataDelegate, filterStatusLabel, showAllLabel, totalSumLabel, tradeSumLabel)
 {
 }
        public DataGridStateManagerForTaxlotSummary(DataGridView dataGridView,
                                                    EventHandler <RefreshBindingSourceEventArgs> refreshBindingSource,
                                                    RefreshDataDelegate refreshDataDelegate,
                                                    ToolStripStatusLabel filterStatusLabel,
                                                    ToolStripStatusLabel showAllLabel,
                                                    ToolStripStatusLabel totalSumLabel,
                                                    ToolStripStatusLabel selectedSumLabel)
            : base("Taxlot summary", dataGridView, refreshBindingSource, refreshDataDelegate, filterStatusLabel, showAllLabel)
        {
            this.totalSumLabel    = totalSumLabel;
            this.selectedSumLabel = selectedSumLabel;

            Form1.CurrentDateChanged += new EventHandler(Form1_CurrentDateChanged);
        }
 public DataGridStateManagerForRealizedPandL(string name,
                                             GHVHugoLib.InstrumentType instrumentType,
                                             DataGridView dataGridView,
                                             EventHandler <RefreshBindingSourceEventArgs> refreshBindingSource,
                                             RefreshDataDelegate refreshDataDelegate,
                                             ToolStripStatusLabel filterStatusLabel,
                                             ToolStripStatusLabel showAllLabel,
                                             ToolStripStatusLabel totalSumLabel,
                                             ToolStripStatusLabel tradeSumLabel)
     : base(name, dataGridView, refreshBindingSource, refreshDataDelegate, filterStatusLabel, showAllLabel)
 {
     this.totalSumLabel  = totalSumLabel;
     this.tradeSumLabel  = tradeSumLabel;
     this.InstrumentType = instrumentType;
 }
Ejemplo n.º 4
0
        public DataGridStateManagerForTaxlotHistory(DataGridView dataGridView,
                                                    EventHandler <RefreshBindingSourceEventArgs> refreshBindingSource,
                                                    RefreshDataDelegate refreshDataDelegate,
                                                    ToolStripStatusLabel filterStatusLabel,
                                                    ToolStripStatusLabel showAllLabel)
            : base("Taxlot history",
                   dataGridView,
                   refreshBindingSource,
                   refreshDataDelegate,
                   filterStatusLabel,
                   showAllLabel)
        {
            key = "TradeId";

            Form1.SelectedTaxlotIdChanged += new EventHandler(OnSelectedTaxlotIdChanged);
        }
        public DataGridStateManager(string name,
                                    DataGridView dataGridView,
                                    EventHandler <RefreshBindingSourceEventArgs> refreshBindingSource,
                                    RefreshDataDelegate refreshDataDelegate,
                                    ToolStripStatusLabel filterStatusLabel,
                                    ToolStripStatusLabel showAllLabel)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (dataGridView == null)
            {
                throw new ArgumentNullException("dataGridView");
            }
            if (refreshBindingSource == null)
            {
                throw new ArgumentNullException("refreshBindingSource");
            }
            if (filterStatusLabel == null)
            {
                throw new ArgumentNullException("filterStatusLabel");
            }

            this.name                 = name;
            this.dataGridView         = dataGridView;
            this.bindingSource        = dataGridView.DataSource as BindingSource;
            this.refreshBindingSource = refreshBindingSource;
            this.refreshDataDelegate  = refreshDataDelegate;
            this.filterStatusLabel    = filterStatusLabel;
            this.showAllLabel         = showAllLabel;

            // allow access to this object from dataGridView
            dataGridView.Tag = this;

            // allow access to this object from toolstrip
            filterStatusLabel.Owner.Tag = this;
        }