Example #1
0
 private void xtraTabControl1_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
 {
     foreach (Control c in xtraTabPage2.Controls)
     {
         if (c is SurfaceGraphViewer)
         {
             SurfaceGraphViewer surfaceGraphViewer1 = (SurfaceGraphViewer)c;
             surfaceGraphViewer1.RefreshView();
         }
         else if (c is NChartControl)
         {
             //NChartControl nChartControl1 = (NChartControl)c;
             nChartControl1.Refresh();
         }
     }
 }
Example #2
0
        private void BuildNewSurfaceGraph(byte[] m_map_content)
        {
            SurfaceGraphViewer surfaceGraphViewer1 = new SurfaceGraphViewer();


            surfaceGraphViewer1.Dock = DockStyle.Fill;
            xtraTabPage2.Controls.Add(surfaceGraphViewer1);

            surfaceGraphViewer1.Pan_x = 45;
            surfaceGraphViewer1.Pan_y = 77;
            surfaceGraphViewer1.Pov_d = 0.6;
            surfaceGraphViewer1.Pov_x = 30;
            surfaceGraphViewer1.Pov_y = 56;
            surfaceGraphViewer1.Pov_z = 21;

            surfaceGraphViewer1.ShowinBlue      = false;
            surfaceGraphViewer1.IsRedWhite      = false;
            surfaceGraphViewer1.Map_name        = "Matrix";
            surfaceGraphViewer1.X_axis          = ConvertToIntArray(x_axisvalues);
            surfaceGraphViewer1.Y_axis          = ConvertToIntArray(y_axisvalues);
            surfaceGraphViewer1.X_axis_descr    = X_axis_name;
            surfaceGraphViewer1.Y_axis_descr    = Y_axis_name;
            surfaceGraphViewer1.Z_axis_descr    = Z_axis_name;
            surfaceGraphViewer1.Map_length      = 16 * 16 * 2;
            surfaceGraphViewer1.Map_content     = m_map_content;
            surfaceGraphViewer1.NumberOfColumns = 16;
            surfaceGraphViewer1.IsSixteenbit    = true;
            surfaceGraphViewer1.Pov_d           = 0.3;
            surfaceGraphViewer1.IsUpsideDown    = true;

            /*if (false)
             * {
             *  surfaceGraphViewer1.Pov_d = 0.25;
             *  surfaceGraphViewer1.Pan_y = 20;
             *  surfaceGraphViewer1.Pan_x = 20;
             * }*/
            surfaceGraphViewer1.NormalizeData();
            surfaceGraphViewer1.RefreshView();
        }