SetGrid() public method

public SetGrid ( float grid, string labels ) : void
grid float
labels string
return void
Esempio n. 1
0
 private static void UpdateChartGrid(float timeMax, ChartData data)
 {
     if (timeMax < 1500f)
     {
         float[] grid = new float[] { 1000f, 250f, 100f };
         string[] labels = new string[] { "1ms (1000FPS)", "0.25ms (4000FPS)", "0.1ms (10000FPS)" };
         data.SetGrid(grid, labels);
     }
     else if (timeMax < 10000f)
     {
         float[] singleArray2 = new float[] { 8333f, 4000f, 1000f };
         string[] textArray2 = new string[] { "8ms (120FPS)", "4ms (250FPS)", "1ms (1000FPS)" };
         data.SetGrid(singleArray2, textArray2);
     }
     else if (timeMax < 30000f)
     {
         float[] singleArray3 = new float[] { 16667f, 10000f, 5000f };
         string[] textArray3 = new string[] { "16ms (60FPS)", "10ms (100FPS)", "5ms (200FPS)" };
         data.SetGrid(singleArray3, textArray3);
     }
     else if (timeMax < 100000f)
     {
         float[] singleArray4 = new float[] { 66667f, 33333f, 16667f };
         string[] textArray4 = new string[] { "66ms (15FPS)", "33ms (30FPS)", "16ms (60FPS)" };
         data.SetGrid(singleArray4, textArray4);
     }
     else
     {
         float[] singleArray5 = new float[] { 500000f, 200000f, 66667f };
         string[] textArray5 = new string[] { "500ms (2FPS)", "200ms (5FPS)", "66ms (15FPS)" };
         data.SetGrid(singleArray5, textArray5);
     }
 }
 private static void UpdateChartGrid(float timeMax, ChartData data)
 {
   if ((double) timeMax < 1500.0)
     data.SetGrid(new float[3]
     {
       1000f,
       250f,
       100f
     }, new string[3]
     {
       "1ms (1000FPS)",
       "0.25ms (4000FPS)",
       "0.1ms (10000FPS)"
     });
   else if ((double) timeMax < 10000.0)
     data.SetGrid(new float[3]
     {
       8333f,
       4000f,
       1000f
     }, new string[3]
     {
       "8ms (120FPS)",
       "4ms (250FPS)",
       "1ms (1000FPS)"
     });
   else if ((double) timeMax < 30000.0)
     data.SetGrid(new float[3]
     {
       16667f,
       10000f,
       5000f
     }, new string[3]
     {
       "16ms (60FPS)",
       "10ms (100FPS)",
       "5ms (200FPS)"
     });
   else if ((double) timeMax < 100000.0)
     data.SetGrid(new float[3]
     {
       66667f,
       33333f,
       16667f
     }, new string[3]
     {
       "66ms (15FPS)",
       "33ms (30FPS)",
       "16ms (60FPS)"
     });
   else
     data.SetGrid(new float[3]
     {
       500000f,
       200000f,
       66667f
     }, new string[3]
     {
       "500ms (2FPS)",
       "200ms (5FPS)",
       "66ms (15FPS)"
     });
 }