Click here to Skip to main content
16,020,565 members
Home / Discussions / C#
   

C#

 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 4:40
Guinness4Strength30-Jan-04 4:40 
GeneralRe: Selected text in TreeNodes Pin
Anonymous31-Jan-04 2:37
Anonymous31-Jan-04 2:37 
GeneralRe: Selected text in TreeNodes Pin
Heath Stewart30-Jan-04 5:02
protectorHeath Stewart30-Jan-04 5:02 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 4:42
Guinness4Strength30-Jan-04 4:42 
GeneralRe: Selected text in TreeNodes Pin
Heath Stewart30-Jan-04 5:14
protectorHeath Stewart30-Jan-04 5:14 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 5:18
Guinness4Strength30-Jan-04 5:18 
GeneralRe: Selected text in TreeNodes Pin
Anonymous31-Jan-04 2:37
Anonymous31-Jan-04 2:37 
QuestionAnyone Know a better way ? Pin
Guinness4Strength30-Jan-04 3:49
Guinness4Strength30-Jan-04 3:49 
I'd like to perform the following function but without using a temporary text file, can someone point me towards how to do this in memory ? Is it possible ?

private void FillClipBoard()
{
	string Line;
	bool FoundDollar=false,Start=false;
	TextReader trFile = File.OpenText(WorkingDir+CurrentName);
	StreamWriter sw = File.AppendText(WorkingDir+"Clipboard.txt");
	while((Line=trFile.ReadLine())!=null)
	{
		if(Line.StartsWith("$"))
			FoundDollar=true;
		if(FoundDollar)
		{
			if(!Start && Line.Trim().Length==0)
				continue;
			if(!Line.StartsWith("$"))
				Start=true;
			else
				Start=false;
		}
		if(Start)
		{
			sw.WriteLine(Line);
		}
	}
	sw.Close();
	trFile.Close();
	Utils.PutClipBoardTextFile(WorkingDir+"Clipboard.txt");
	File.Delete(WorkingDir+"clipboard.txt");
}
public static void PutClipBoardTextFile(string Path)
{
	TextReader tr = File.OpenText(Path);
	Clipboard.SetDataObject(tr.ReadToEnd(),true);
	tr.Close();
}

AnswerRe: Anyone Know a better way ? Pin
Heath Stewart30-Jan-04 4:59
protectorHeath Stewart30-Jan-04 4:59 
GeneralRe: Path.Combine Pin
Mike Osbahr30-Jan-04 9:19
Mike Osbahr30-Jan-04 9:19 
GeneralRequest help for 2 newbie questions Pin
bouli30-Jan-04 3:06
bouli30-Jan-04 3:06 
GeneralRe: Request help for 2 newbie questions Pin
Wizard_0130-Jan-04 3:23
Wizard_0130-Jan-04 3:23 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 3:31
bouli30-Jan-04 3:31 
GeneralRe: Request help for 2 newbie questions Pin
Mazdak30-Jan-04 3:40
Mazdak30-Jan-04 3:40 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 3:42
bouli30-Jan-04 3:42 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 3:54
bouli30-Jan-04 3:54 
GeneralRe: Request help for 2 newbie questions Pin
Mazdak30-Jan-04 4:32
Mazdak30-Jan-04 4:32 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 4:36
bouli30-Jan-04 4:36 
GeneralRe: Request help for 2 newbie questions Pin
Mazdak30-Jan-04 4:45
Mazdak30-Jan-04 4:45 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 5:08
bouli30-Jan-04 5:08 
GeneralRe: Request help for 2 newbie questions Pin
Heath Stewart30-Jan-04 4:51
protectorHeath Stewart30-Jan-04 4:51 
GeneralRe: Request help for 2 newbie questions Pin
Mazdak30-Jan-04 5:00
Mazdak30-Jan-04 5:00 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 5:06
bouli30-Jan-04 5:06 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 5:10
bouli30-Jan-04 5:10 
GeneralRe: Request help for 2 newbie questions Pin
Heath Stewart30-Jan-04 5:24
protectorHeath Stewart30-Jan-04 5:24 

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.