Hi, this is my first posting at this forum and I need some help with my project. I am new to c# and still confused at times ...
My application is as follow:
I have main MDI_ParentForm, from which I open a ChildForm. I use ChildForm as drawing area for my graph.
I am dividing ChildForm up into smaller areas (rectangles). This is done by creating new object:
myDivisionClass myGDI = new myDivisionClass(this) ;
In my class definition for myDivisionClass I create object for each reactangle (for example: first rectangle represents grid area, second title, third labels for traces and so on ...)
myGraphGridClass myGrid = new myGraphGridClass(myRectangle);
myGraphTitle myTitle = new myGraphTitle(myRectangle);
myGraphLabels myTitle = new myGraphLabels(myRectangle);
etc...
Now I want to add a setup form (shown when pressing button on ChildForm), from which I could change properties of my myGrid object from myGraphGridClass.
I would also like to be able to open any number of ChildForms and change properties for each individual ChildForm object (so each could display graph with different settings ) ...
tnx, Pata
Loading
PataPosted Mar 11, 2010, 1:57 AM
class MyGraphGridClass
{
private int myProperty;
public int Property
{
get { return myProperty; }
set { myProperty = value; }
}
.
.
.
}
class MyDivisionClass
{
private MyGraphGridClass objMyGraphGrid = new MyGraphGridClass();
internal MyGraphGridClass MyGraphGrid
{
get { return objMyGraphGrid; }
set { objMyGraphGrid = value; }
}
.
.
.
}
// In chid form class
MyDivisionClass Graph_01 = new MyDivisionClass();
MyDivisionClass Graph_02 = new MyDivisionClass();
Graph_01.MyGraphGrid.Property = 5;
Graph_02.MyGraphGrid.Property = 3;
// and then use as suggested
SetupForm sf = new SetupForm(Graph_01.MyGraphGrid);
Pata