![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Dec 2007
Location: Durban, South-Africa
Posts: 207
Rep Power: 1
![]() |
C# Streams and Installer Question
Hi All
I knew there was a similar post about this subject a while back, but I would like to know if anyone can help me with this... I have written a program in MS Visual C# 2005 Express. The application basically capture user information typed in, (provision made for exception handling), then updates the files with streams(which saves the file with ".FILE" extension in default directory. It can also save as a text file, but anyway... How can I go about changing the location where the .FILE files gets saved to? ![]() Here is my source code of the relevant piece. private void btnSave_Click(object sender, EventArgs e)
{
try
{
StreamWriter stmWrite = new StreamWriter(rtbSaveName.Text);
stmWrite.WriteLine(DatePicker.Text);
stmWrite.WriteLine(TimePicker.Text);
stmWrite.WriteLine(lbxClients.Text);
stmWrite.WriteLine(lbxHauliers.Text);
stmWrite.WriteLine(txtVessel.Text);
stmWrite.WriteLine(rtbContainerID.Text);
stmWrite.WriteLine(Cont_Det.ToString());
stmWrite.Close();
DatePicker.Text = "";
TimePicker.Text = "";
lbxClients.Text = "";
lbxHauliers.Text = "";
txtVessel.Text = "";
rtbContainerID.Text = "";
Cont_Det.ToString();
}
catch
{
MessageBox.Show("Stream Error");
}
}Where rtbSaveName.Text I would also just like to know if anyone knows ao any links to help me set up an installer for my application as I just know of MS Visual C#'s Publish function. All help will be, as allways, much appreciated.
__________________
"Common sense is the collection of prejudices acquired by age eighteen." - Albert Einstein |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|