Пример #1
0
 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();
 }
Пример #2
0
 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;
 }
Пример #4
0
 internal void plotManipulationPanel_onAnimateChanged(object sender, PlotChangedEventArgs e)
 {
     PlotPointViewRenderer.AnimationEnabled = e.AnimateValue;
 }
Пример #5
0
 internal void view_onSortGraph(object sender, PlotChangedEventArgs e)
 {
     e.Graph = this.currentGraph;
     manipulationController.SortGraph(e);
 }
Пример #6
0
 void plotManipulationPanel_onSort(object sender, PlotChangedEventArgs e)
 {
     e.PlotDimensions = this.PlotDimensions;
     if (this.onSortGraph != null)
         this.onSortGraph(this, e);
 }