コード例 #1
0
 public void DiagramParamShoice(int x, Size size)
 {
     if (diagramPoints.Count > 0)
     {
         decimal dx    = 1.0M * x / size.Width;
         int     index = (int)(dx * DestRect.Width);
         decimal start = DiagramStartParameter;
         decimal stop  = DiagramStopParameter;
         if (stop < start)
         {
             stop  = DiagramStartParameter;
             start = DiagramStopParameter;
         }
         decimal Par = start + (decimal)((stop - start) * dx);
         if (index >= 0 && index < BSize && index < diagramPoints.Count)
         {
             PlotForm.ShowNumber(index, Par, diagramPoints);
         }
         ParamChoice2Form(Par);
     }
 }