internal void plotManipulationPanel_onRadiusChanged(object sender, PlotChangedEventArgs e)
 {
     bool pausingSort = manipulationController.sortStarted && !manipulationController.sortPaused;
     if(pausingSort)
         manipulationController.StopSort();
     foreach (PlotPoint point in this.currentGraph.PlotPoints)
     {
         point.Width = point.Height = e.PointRadius;
     }
     if(pausingSort)
         manipulationController.ResumeSort();
 }
 internal void plotManipulationPanel_onBorderChanged(object sender, PlotChangedEventArgs e)
 {
     bool pausingSort = manipulationController.sortStarted && !manipulationController.sortPaused;
     if (pausingSort)
         manipulationController.StopSort();
     foreach (PlotPoint point in this.currentGraph.PlotPoints)
     {
         if (e.BorderValue)
             point.OuterColor = Colors.Black;
         else
             point.OuterColor = new Color() { A = 0, };
     }
     if (pausingSort)
         manipulationController.ResumeSort();
 }
 internal void SortGraph(PlotChangedEventArgs e)
 {
     currentGraph = e.Graph;
     currentSortType = e.SortType;
     currentDimensions = e.PlotDimensions;
     int maxPointsPerSort = SortThrottle.GetMaxPointsPerPass(SortAlgorithms[currentSortType].AlgorithmComplexity,
                                                               PlotPointViewRenderer.AnimationEnabled, e.Graph.PlotPoints.Length);
     if (e.Graph.PlotPoints.Length > maxPointsPerSort)// && maxPointsPerSort != 0)
     {
         this.currentSortPasses = (int)Math.Ceiling(e.Graph.PlotPoints.Length / maxPointsPerSort);
     }
     else
     {
         this.currentSortPasses = 1;
     }
     this.currentSortPass = 0;
     timer.Start();
     sortStarted = true;
 }
 internal void plotManipulationPanel_onAnimateChanged(object sender, PlotChangedEventArgs e)
 {
     PlotPointViewRenderer.AnimationEnabled = e.AnimateValue;
 }
 internal void view_onSortGraph(object sender, PlotChangedEventArgs e)
 {
     e.Graph = this.currentGraph;
     manipulationController.SortGraph(e);
 }
Esempio n. 6
0
 void plotManipulationPanel_onSort(object sender, PlotChangedEventArgs e)
 {
     e.PlotDimensions = this.PlotDimensions;
     if (this.onSortGraph != null)
         this.onSortGraph(this, e);
 }