Click here to Skip to main content
15,911,315 members
Home / Discussions / C#
   

C#

 
GeneralReply to Fantas's Solution Pin
DJdC9-Jun-05 15:37
DJdC9-Jun-05 15:37 
GeneralRe: Reply to Fantas's Solution Pin
Christian Graus9-Jun-05 16:21
protectorChristian Graus9-Jun-05 16:21 
GeneralReply to Christian's Solution Pin
DJdC9-Jun-05 15:48
DJdC9-Jun-05 15:48 
GeneralRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 15:53
protectorChristian Graus9-Jun-05 15:53 
GeneralReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 16:26
DJdC9-Jun-05 16:26 
GeneralRe: ReRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 16:34
protectorChristian Graus9-Jun-05 16:34 
GeneralReRe: ReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 17:06
DJdC9-Jun-05 17:06 
GeneralRe: ReRe: ReRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 17:12
protectorChristian Graus9-Jun-05 17:12 
DJdC wrote:
I'm sorry if this threw you off.

That's OK, I'm just trying to piece this together.

DJdC wrote:
I'm sure you're very familiar with Windows Applications integrating Google APIs?

LOL - nope.

DJdC wrote:
You might want to suggest another alternative but I can safely say it would just throw my fragile understanding in the bin, I'm an amateur in programming and I've only touched C# in April haha.

*grin* I'll do my best here.

So as I understand it, the functionality you want from Form1 is the stuff that deals with the XML ? There is no reason that this can't be moved to a third class, so both classes can access the XML information from there. In fact, a good design would be to have a class that reads the XML, and then exposes the stuff the XML file stores, so this one file has the job of reading the XML, giving you access to the info, letting you change/add to it, and then saving it. That way, only one part of the code needs to know how your config file is being stored, the rest just knows there is a config file class that it uses.

Or, if that's too hard, then what I illustratated, and making methods public, will solve your problem, at the expense of quality in terms of design. You may prefer to come back to that lesson, but a factor is, how smart is your teacher, and will you be marked on quality of design ? Remember, any class can be created any number of times, and any non static property will only have a specific value for a specific instance of the class. Imagine you have a class to represent a student. If every instance of the class had the same name, you could only create one student, right ? Your form is the same. You can make as many Form1 class instances as you like, but only the one you can see on the screen contains information that is the result of things you've done while using the program ( i.e. stuff where a value has been set outside the constructor ).

I really hope that helps. Let us know if you need more info.



Christian Graus - Microsoft MVP - C++
GeneralReRe: ReRe: ReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 17:45
DJdC9-Jun-05 17:45 
GeneralRe: ReRe: ReRe: ReRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 17:51
protectorChristian Graus9-Jun-05 17:51 
GeneralReRe: ReRe: ReRe: ReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 19:10
DJdC9-Jun-05 19:10 
GeneralRe: ReRe: ReRe: ReRe: ReRe: Reply to Christian's Solution Pin
Christian Graus13-Jun-05 11:56
protectorChristian Graus13-Jun-05 11:56 
GeneralRe: Please Help! Function on Separate Form Pin
Jack Bond13-Jun-05 2:23
Jack Bond13-Jun-05 2:23 
GeneralGame Programming Pin
Sabry19058-Jun-05 22:55
Sabry19058-Jun-05 22:55 
GeneralRe: Game Programming Pin
Philip Price8-Jun-05 23:20
Philip Price8-Jun-05 23:20 
GeneralRe: Game Programming Pin
MoustafaS9-Jun-05 0:49
MoustafaS9-Jun-05 0:49 
GeneralRe: Game Programming Pin
Christian Graus9-Jun-05 17:52
protectorChristian Graus9-Jun-05 17:52 
GeneralRe: Game Programming Pin
JDUK12-Jun-05 11:53
JDUK12-Jun-05 11:53 
GeneralConverting Code Pin
Sabry19058-Jun-05 22:49
Sabry19058-Jun-05 22:49 
GeneralRe: Converting Code Pin
Philip Price8-Jun-05 23:17
Philip Price8-Jun-05 23:17 
GeneralRe: Converting Code Pin
Carsten Zeumer8-Jun-05 23:25
Carsten Zeumer8-Jun-05 23:25 
GeneralRe: Converting Code Pin
Dave Doknjas9-Jun-05 16:04
Dave Doknjas9-Jun-05 16:04 
GeneralKeeping data in clipboard after app closes Pin
gubber8-Jun-05 22:31
gubber8-Jun-05 22:31 
GeneralRe: Keeping data in clipboard after app closes Pin
codeprojectin8-Jun-05 22:50
codeprojectin8-Jun-05 22:50 
QuestionC# ListViewItem Indentation? Pin
Dominik Reichl8-Jun-05 22:23
Dominik Reichl8-Jun-05 22:23 

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.