Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
GeneralRe: Shortcut Keys Pin
Mazdak16-Jan-05 5:35
Mazdak16-Jan-05 5:35 
Generalrelative XML file path Pin
asiddiqi@bankalfalah.com15-Jan-05 21:03
sussasiddiqi@bankalfalah.com15-Jan-05 21:03 
GeneralRe: relative XML file path Pin
Heath Stewart16-Jan-05 9:39
protectorHeath Stewart16-Jan-05 9:39 
GeneralRe: relative XML file path Pin
Gregg Holter16-Jan-05 16:44
Gregg Holter16-Jan-05 16:44 
GeneralMarshal Structs Pin
Anonymous15-Jan-05 12:51
Anonymous15-Jan-05 12:51 
GeneralRe: Marshal Structs Pin
Heath Stewart16-Jan-05 9:46
protectorHeath Stewart16-Jan-05 9:46 
Generalloading an xml file Pin
John L. DeVito15-Jan-05 12:48
professionalJohn L. DeVito15-Jan-05 12:48 
GeneralRe: loading an xml file Pin
Robert Rohde15-Jan-05 19:02
Robert Rohde15-Jan-05 19:02 
Hi,

Ill try to break up your requests to little answerable parts Wink | ;) :

1. I see no need for you to specify a NameTable for your XmlDocument. Just use the parameterless constructor, when working with XmlDocument.

2. To load the last file used in the next session you will have to store this information somewhere. As I think this wont be the last setting you need to store in your program I would create a configuration file in xml format where you can store any type of information. You could search CodeProject for this part. If I remember right there is at least one implementation around which should make this point easy.

3. To create a skeleton of your xml was no bad idea. Depending on the complexity of its structure you could also create it programmatically, but having a template makes it simpler. You can add the file directly to your assembly as an embedded resource and save it to your desired location with the following code:
<br />
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();<br />
<br />
Stream inputStream = assembly.GetManifestResourceStream("DefaultNameSpaceOfTheProject.FileNameOfTheEmbeddedResource");<br />
FileStream outputStream = new FileStream(newFilePath, FileMode.CreateNew);<br />
byte[] buffer = new byte[1024];<br />
while (true) <br />
{<br />
	int read = inputStream.Read(buffer, 0, buffer.Length);				<br />
	outputStream.Write(buffer, 0, read);<br />
	if (read < 1024)<br />
		break;<br />
}<br />
outputStream.Close();<br />
inputStream.Close();<br />

This will assure that noone changes your default file once the program is installed.
GeneralParse RTF to HTML Pin
vargasbo15-Jan-05 11:08
vargasbo15-Jan-05 11:08 
GeneralRe: Parse RTF to HTML Pin
Heath Stewart16-Jan-05 9:23
protectorHeath Stewart16-Jan-05 9:23 
GeneralRe: Parse RTF to HTML Pin
Anonymous21-Jan-05 9:34
Anonymous21-Jan-05 9:34 
GeneralRe: Parse RTF to HTML Pin
Heath Stewart21-Jan-05 13:14
protectorHeath Stewart21-Jan-05 13:14 
GeneralAlpha Channel in DirectX Pin
Rob Tomson15-Jan-05 9:35
Rob Tomson15-Jan-05 9:35 
GeneralRe: Alpha Channel in DirectX Pin
Heath Stewart16-Jan-05 9:15
protectorHeath Stewart16-Jan-05 9:15 
GeneralUse Graphics classes in a class library Pin
Anonymous15-Jan-05 9:09
Anonymous15-Jan-05 9:09 
GeneralRe: Use Graphics classes in a class library Pin
leppie15-Jan-05 9:17
leppie15-Jan-05 9:17 
GeneralRe: Use Graphics classes in a class library Pin
Skynyrd15-Jan-05 13:00
Skynyrd15-Jan-05 13:00 
QuestionMonitor Sharing? Pin
Rob Tomson15-Jan-05 8:43
Rob Tomson15-Jan-05 8:43 
AnswerRe: Monitor Sharing? Pin
Colin Angus Mackay15-Jan-05 11:47
Colin Angus Mackay15-Jan-05 11:47 
AnswerRe: Monitor Sharing? Pin
Robert Rohde15-Jan-05 19:05
Robert Rohde15-Jan-05 19:05 
GeneralDown Arrow Key Pin
Umair Ahmad khan15-Jan-05 8:34
Umair Ahmad khan15-Jan-05 8:34 
GeneralRe: Down Arrow Key Pin
Peter Molnar15-Jan-05 13:55
Peter Molnar15-Jan-05 13:55 
GeneralRe: Down Arrow Key Pin
Umair Ahmad khan15-Jan-05 20:21
Umair Ahmad khan15-Jan-05 20:21 
GeneralRe: Down Arrow Key Pin
Umair Ahmad khan16-Jan-05 4:26
Umair Ahmad khan16-Jan-05 4:26 
GeneralRe: Down Arrow Key Pin
Peter Molnar16-Jan-05 10:45
Peter Molnar16-Jan-05 10:45 

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.