I have two forms (in the same namespace), Form1 which acquires data from images, and GraphForm, which sould plot the data as a surface graph, using the ILNumerics framework.
I had never done such a construction with two forms (fairly new to C#, and coding as a whole for that matters), and I can't figure out why my code doesn't work, as it's almost copy/pasted from a previous question asked here (Sujith H S answer). I tried other constructions described in various similar questions as well, with the same result : the second form and the ILNumerics plotting interface appear, but are empty.
Here is my version of the answer I linked :
IN FORM1 :
// Form creation
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static ILInArray<double> CrossCorrExpMatrixReShiftedILN;
//Here is my whole data acquisition code, about 800 lines long
ILInArray<double> CrossCorrExpMatrixReShiftedILN = CrossCorrExpMatrixReShifted;
GraphForm Form2 = new GraphForm();
Form2.Show();
IN GRAPHFORM :
public partial class GraphForm : Form
{
public GraphForm()
{
InitializeComponent();
}
private void GraphForm_Load(object sender, EventArgs e)
{
ILInArray<double> GraphData = Form1.CrossCorrExpMatrixReShiftedILN;
//Here I use GraphData to plot the surface
}
Does anyone have an idea why it doesn't work ?