コード例 #1
0
        void sparkline_SparklineChanged(object sender, EventArgs e)
        {
            Sparkline sparkline = sender as Sparkline;

            if ((_sparklineView == null) || (_sparklineView.SparklineType != sparkline.SparklineType))
            {
                if (_sparklineView != null)
                {
                    Children.Remove(_sparklineView);
                    _sparklineView = null;
                }
                SynSparklineView();
            }
            else if (_sparklineView != null)
            {
                _sparklineView.Update(GetCellSize(), Excel.ZoomFactor);
            }
        }
コード例 #2
0
 void SynSparklineView()
 {
     if (_sparkInfo != null)
     {
         if (_sparklineView == null)
         {
             _sparklineView            = CreateSparkline(_sparkInfo);
             _sparklineView.ZoomFactor = OwnRow.OwnPanel.Excel.ZoomFactor;
             ((IThemeContextSupport)_sparklineView).SetContext(OwnRow.OwnPanel.Excel.ActiveSheet);
             Children.Add(_sparklineView);
         }
     }
     else if (_sparklineView != null)
     {
         DettachSparklineEvents();
         Children.Remove(_sparklineView);
         _sparklineView = null;
     }
 }