Ejemplo n.º 1
0
 private void HandleChartUpdateEvent(DocumentWindow window, object _, DataPointEvent e)
 {
     Dispatcher.InvokeAsync(() =>
     {
         if (window?.IsOpen == true)
         {
             (window.Content as LineChart)?.HandleUpdateEvent(e);
         }
     });
 }
Ejemplo n.º 2
0
        internal void FireChartEvent(GenerateStatsOptions options, string action, List <PlayerStats> selected = null, Predicate <object> filter = null)
        {
            lock (TankingGroupIds)
            {
                if (options.RequestChartData)
                {
                    // send update
                    DataPointEvent de = new DataPointEvent()
                    {
                        Action = action, Iterator = new TankGroupCollection(TankingGroups, options.DamageType), Filter = filter
                    };

                    if (selected != null)
                    {
                        de.Selected.AddRange(selected);
                    }

                    EventsUpdateDataPoint?.Invoke(TankingGroups, de);
                }
            }
        }
Ejemplo n.º 3
0
        internal void HandleUpdateEvent(DataPointEvent e)
        {
            switch (e.Action)
            {
            case "CLEAR":
                Clear();
                break;

            case "UPDATE":
                Clear();
                AddDataPoints(e.Iterator, e.Selected, e.Filter);
                break;

            case "SELECT":
                Plot(e.Selected);
                break;

            case "FILTER":
                Plot(e.Filter);
                break;
            }
        }