コード例 #1
0
        public bool Equals(ChartDescriptor desc)
        {
            bool result = true;

            if ((object)desc == null)
            {
                return(false);
            }

            if (chartIdentifier != desc.chartIdentifier)
            {
                result = false;
            }
            else if (interval != desc.interval)
            {
                result = false;
            }
            else if (startDate != desc.startDate)
            {
                result = false;
            }
            else if (endDate != desc.endDate)
            {
                result = false;
            }
            else if (indicators != desc.indicators)
            {
                result = false;
            }

            return(result);
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            ChartDescriptor desc = obj as ChartDescriptor;

            if ((System.Object)desc == null)
            {
                return(false);
            }

            return(Equals(desc));
        }
コード例 #3
0
        public void SetChartDataProvider(IChartDataProvider provider)
        {
            // TODO: Need to detach any old events (in the case that the user loads a different chart)
            //if (this.chartDataProvider != null && this.chartDataProvider.DataSeriesUpdated != null) this.chartDataProvider.DataSeriesUpdated -= moBarData_DataSeriesUpdated;
            //if (this.chartDataProvider != null && this.chartDataProvider.DataLoadComplete != null) this.chartDataProvider.DataLoadComplete -= moBarData_DataSeriesUpdated;

            chartDescriptor = new ChartDescriptor(provider, activeIndicators);

            ResetChart();

            this.chartDataProvider = provider;
            this.chartDataProvider.DataSeriesUpdated += moBarData_DataSeriesUpdated;
            this.chartDataProvider.DataLoadComplete  += moBarData_DataLoadComplete;

            chooseBarDataForm = new UIFormChooseBarData(chartDataProvider);
            chooseBarDataForm.SelectedBarChanged += chooseBarDataForm_SelectedBarChanged;
        }
コード例 #4
0
 public bool Contains(ChartDescriptor desc)
 {
     return(Items.ContainsKey(desc));
 }
コード例 #5
0
 public UIControlChart this[ChartDescriptor desc]
 {
     get { return(Items[desc]); }
 }
コード例 #6
0
 public void Add(ChartDescriptor desc, UIControlChart uic)
 {
     Items[desc] = uic;
 }
コード例 #7
0
 public void Add(ChartDescriptor desc)
 {
     Items[desc] = null;
 }