Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: Creating mdb file at runtime Pin
delyk26-Aug-08 10:03
delyk26-Aug-08 10:03 
QuestionSwitch/Case Question Pin
ffowler26-Aug-08 3:25
ffowler26-Aug-08 3:25 
AnswerRe: Switch/Case Question Pin
J4amieC26-Aug-08 3:29
J4amieC26-Aug-08 3:29 
GeneralRe: Switch/Case Question Pin
ffowler26-Aug-08 3:36
ffowler26-Aug-08 3:36 
GeneralRe: Switch/Case Question Pin
leppie26-Aug-08 3:42
leppie26-Aug-08 3:42 
GeneralRe: Switch/Case Question Pin
ffowler26-Aug-08 3:49
ffowler26-Aug-08 3:49 
GeneralRe: Switch/Case Question Pin
Pete O'Hanlon26-Aug-08 3:56
mvePete O'Hanlon26-Aug-08 3:56 
QuestionPassing data between parent, child and class Pin
ianhunt0126-Aug-08 3:08
ianhunt0126-Aug-08 3:08 
Howdey,

I have been digging into the issue of delegates and tried to implement http://www.colinmackay.net/Articles/PassingValuesBetweenFormsinNET/tabid/58/Default.aspx[^] but I am missing something.

Background, I have got a parent "frmMDI" who creates a new instance of class ReadModel readMdl = new ReadModel;"

class ReadModel
{
    private string strModelDesc1 = "Model";
    private int intNLAY = 1;

    public bool SaveModelData(string strOpenFile)
    {
        etc
        etc
    }

    public string inModel
    {
        get
        {
            return strModelDesc1;
        }
        set
        {
            strModelDesc1 = value;
        }
    }

}


Then the frmMDI calls a new instance of a child frmData that has textboxes etc allowing the user to give new values for strModelDesc1 and intNLAY.

This must then be saved later to a file. The problem that I have is setting the new values from the user on frmData back to the specific instance of class readMdl in frmMDI so that that specific instance of SaveModelData can save to a file and other classes can use it later on by reading readMdl.inModel etc. I can still get the info from the child (while it is open) get and set blocks but once it is closed then it is lost.

thanks for the patience

Ian

I could use static variables all the way but that would be stupid.
AnswerRe: Passing data between parent, child and class Pin
paas26-Aug-08 6:47
paas26-Aug-08 6:47 
Questionweb service Pin
arkiboys26-Aug-08 2:47
arkiboys26-Aug-08 2:47 
AnswerRe: web service Pin
leppie26-Aug-08 2:53
leppie26-Aug-08 2:53 
GeneralRe: web service Pin
arkiboys26-Aug-08 2:58
arkiboys26-Aug-08 2:58 
GeneralRe: web service Pin
leppie26-Aug-08 3:02
leppie26-Aug-08 3:02 
GeneralRe: web service Pin
arkiboys26-Aug-08 3:08
arkiboys26-Aug-08 3:08 
AnswerRe: web service Pin
Pete O'Hanlon26-Aug-08 3:08
mvePete O'Hanlon26-Aug-08 3:08 
GeneralRe: web service Pin
arkiboys26-Aug-08 3:15
arkiboys26-Aug-08 3:15 
GeneralRe: web service Pin
Pete O'Hanlon26-Aug-08 3:29
mvePete O'Hanlon26-Aug-08 3:29 
GeneralRe: web service Pin
leppie26-Aug-08 3:40
leppie26-Aug-08 3:40 
GeneralRe: web service Pin
arkiboys26-Aug-08 3:52
arkiboys26-Aug-08 3:52 
GeneralRe: web service Pin
arkiboys26-Aug-08 4:21
arkiboys26-Aug-08 4:21 
GeneralRe: web service Pin
Pete O'Hanlon26-Aug-08 4:29
mvePete O'Hanlon26-Aug-08 4:29 
QuestionScanner and TWAIN Pin
Stephen Lintott26-Aug-08 2:25
Stephen Lintott26-Aug-08 2:25 
AnswerRe: Scanner and TWAIN Pin
leppie26-Aug-08 2:45
leppie26-Aug-08 2:45 
GeneralRe: Scanner and TWAIN Pin
Stephen Lintott26-Aug-08 3:12
Stephen Lintott26-Aug-08 3:12 
Questionsocket send Pin
kk.tvm26-Aug-08 2:22
kk.tvm26-Aug-08 2:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.