Click here to Skip to main content
15,909,741 members
Home / Discussions / C#
   

C#

 
JokeRe: Convert to int32 problem Pin
Guffa16-Jun-08 4:36
Guffa16-Jun-08 4:36 
GeneralRe: Convert to int32 problem Pin
Newbie_Toy16-Jun-08 5:04
Newbie_Toy16-Jun-08 5:04 
QuestionMap network drive from remote machine(server) to local machine Pin
chakran16-Jun-08 3:44
chakran16-Jun-08 3:44 
AnswerRe: Map network drive from remote machine(server) to local machine Pin
Zoltan Balazs16-Jun-08 4:11
Zoltan Balazs16-Jun-08 4:11 
GeneralRe: Map network drive from remote machine(server) to local machine Pin
chakran16-Jun-08 4:40
chakran16-Jun-08 4:40 
GeneralRe: Map network drive from remote machine(server) to local machine Pin
Zoltan Balazs16-Jun-08 4:56
Zoltan Balazs16-Jun-08 4:56 
GeneralRe: Map network drive from remote machine(server) to local machine Pin
chakran16-Jun-08 19:31
chakran16-Jun-08 19:31 
QuestionEnable/disable buttons according to txt file Pin
Casper Hansen16-Jun-08 3:00
Casper Hansen16-Jun-08 3:00 
Hello.

I this txt file:
// Comment
2
0	0	20	177	185	4	// comment 
0	0	20	75	65	4	// hi!!
0	0	20	85	65	4	// asd
0	0	20	95	65	4	// (bbb
end


Where I divide the data into valid and unvalid lines

All the data is saved into an array

The valid data is:
0	0	20	177	185	4	// comment 
0	0	20	75	65	4	// hi!!
0	0	20	85	65	4	// asd
0	0	20	95	65	4	// (bbb


And the unvalid data is:
// Comment
2
end



I go through the array using two buttons:
Forward and previous

I have a int variable called currentLineNumber which contains the selected line from the array

When pressing forward the currentLineNumber is increased and decreased when pressing previous


My problem is that I need to enable and disable these two buttons on a certain point

For example if I am on the line
0	0	20	95	65	4	// (bbb


I want to disable the forward button since there is no valid data after that line

My question is:
How do I enable/disable these buttons when I reach the end of valid data?

Hope you understand otherwise just ask
AnswerRe: Enable/disable buttons according to txt file Pin
Christian Graus16-Jun-08 3:02
protectorChristian Graus16-Jun-08 3:02 
GeneralRe: Enable/disable buttons according to txt file Pin
Casper Hansen19-Jun-08 1:07
Casper Hansen19-Jun-08 1:07 
AnswerRe: Enable/disable buttons according to txt file Pin
Casper Hansen21-Jun-08 1:36
Casper Hansen21-Jun-08 1:36 
QuestionWhy i always received mail sent by c# code in spam not inbox???? Pin
malak nour16-Jun-08 2:54
malak nour16-Jun-08 2:54 
AnswerRe: Why i always received mail sent by c# code in spam not inbox???? Pin
Christian Graus16-Jun-08 3:01
protectorChristian Graus16-Jun-08 3:01 
AnswerRe: Why i always received mail sent by c# code in spam not inbox???? Pin
Simon P Stevens16-Jun-08 3:03
Simon P Stevens16-Jun-08 3:03 
QuestionHow to Write PlugIn for our Applications in C# 2.0 ? Pin
hdv21216-Jun-08 2:43
hdv21216-Jun-08 2:43 
AnswerRe: How to Write PlugIn for our Applications in C# 2.0 ? Pin
Christian Graus16-Jun-08 2:46
protectorChristian Graus16-Jun-08 2:46 
GeneralRe: How to Write PlugIn for our Applications in C# 2.0 ? Pin
ali35416-Jun-08 13:33
ali35416-Jun-08 13:33 
AnswerRe: How to Write PlugIn for our Applications in C# 2.0 ? Pin
Simon P Stevens16-Jun-08 2:55
Simon P Stevens16-Jun-08 2:55 
GeneralRe: How to Write PlugIn for our Applications in C# 2.0 ? Pin
ali35416-Jun-08 13:34
ali35416-Jun-08 13:34 
Questionwhy constructor ??? Pin
tasumisra16-Jun-08 2:14
tasumisra16-Jun-08 2:14 
AnswerRe: why constructor ??? Pin
Christian Graus16-Jun-08 2:30
protectorChristian Graus16-Jun-08 2:30 
GeneralRe: why constructor ??? Pin
tasumisra16-Jun-08 3:03
tasumisra16-Jun-08 3:03 
GeneralRe: why constructor ??? Pin
Christian Graus16-Jun-08 3:08
protectorChristian Graus16-Jun-08 3:08 
GeneralRe: why constructor ??? Pin
darkelv16-Jun-08 5:14
darkelv16-Jun-08 5:14 
Questionmake active x component Pin
justintimberlake16-Jun-08 2:05
justintimberlake16-Jun-08 2:05 

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.