Exemple #1
0
        private void OnDataArrivalBegin(DataArrivalConfig config)
        {
            if (config == DataArrivalConfig.TimeRange)
            {
                if (!this.realTime)
                {
                    // Clear
                    foreach (string key in dataSources.Keys)
                    {
                        CurveDataContext dataContext = dataSources[key];
                        i = 0;
                        dataContext.Clear();
                        dataContext.UpdateCurves();
                    }

                    // Reset the Base time.
                    this.baseTimeSet = false;

                    /*
                     * foreach (string key in dataSources.Keys)
                     * {
                     *  CurveDataContext dataContext = dataSources[key];
                     *  //dataContext.UpdateCurves();
                     * }
                     */
                }
            }
            else if (config == DataArrivalConfig.TimeNew)
            {
                if (this.realTime)
                {
                    // Do nothing with dataContext
                }
            }
        }
 private void ChartView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if ((bool)e.NewValue) // Shown
     {
         foreach (string key in dataSources.Keys)
         {
             CurveDataContext dataContext = dataSources[key];
             dataContext.UpdateCurves();
         }
     }
 }