Click here to Skip to main content
15,881,725 members
Home / Discussions / C#
   

C#

 
GeneralRe: return string Pin
Luc Pattyn14-Jul-09 7:45
sitebuilderLuc Pattyn14-Jul-09 7:45 
AnswerRe: return string Pin
sskset14-Jul-09 7:52
sskset14-Jul-09 7:52 
Questionregarding grab image from mobile camera?? Pin
Tridip Bhattacharjee14-Jul-09 2:34
professionalTridip Bhattacharjee14-Jul-09 2:34 
AnswerRe: regarding grab image from mobile camera?? Pin
DoctorMick14-Jul-09 5:19
DoctorMick14-Jul-09 5:19 
AnswerRe: regarding grab image from mobile camera?? Pin
Simon P Stevens14-Jul-09 5:25
Simon P Stevens14-Jul-09 5:25 
AnswerRe: regarding grab image from mobile camera?? Pin
Giorgi Dalakishvili14-Jul-09 6:18
mentorGiorgi Dalakishvili14-Jul-09 6:18 
QuestionLogin Problem with CrystalReports Pin
Narendra Reddy Vajrala14-Jul-09 1:59
Narendra Reddy Vajrala14-Jul-09 1:59 
QuestionLogic behind... Something? Pin
Baeltazor14-Jul-09 1:18
Baeltazor14-Jul-09 1:18 
Hello all,

I have a little problem over here. With my word processor, I'm curerntly implementing a feature that basically automates a whole bunch of tasks that would normally require input of some sort from the user.

I'm not too sure how to explain it, and I'm not looking for code. I just need a little help getting the logic behid it right as I keep going 'round and 'round in circles and getting stuck.

A little info first: It's a tab-based word processor.

Scenario: A user clicks the "Close ALL" menu item.

Logic:

Foreach control tab in tcontrol.tabpages
if selected tab contains textbox and
the selected tab's tag property contains a filepath
and the text inside the textbox, which is inside the selected tab is not equal to the content of the file inside the selected tab's tag property
then save changes to that file. And then close that tab. Then move on to the next tab. And repeat process.


If selected tab's tag property does not contain a filepath, and the textbox inside the selected tab has a length greater than 0, then automatically display the SaveFileDialog, and then close that tab once the file has been saved.

If the selected tab's tag property contains a filepath, but the file that the filepath refers to nolonger exists, then automatically display SaveFileDialog, and close the selected tab if the document has been saved. And Repeat.

I know this might not make any sense at first, come to think of it, after reading what I just wrote, it doesn't really make a whole lot of sense to me but It's very difficult trying to explain exactly what I want to do since there are so many if's and else's etc... Is there an easier way to do something like this of would If/Else/Else If be the best way to go about it.

I've been told to use Switch Statements for this but I honestly have more trouble that way. I haven't searched on google or msdn because I have no idea what search terms to use for this.

Does anybody have any thoughts/suggestions?

thank you
AnswerRe: Logic behind... Something? PinPopular
Luc Pattyn14-Jul-09 1:27
sitebuilderLuc Pattyn14-Jul-09 1:27 
GeneralRe: Logic behind... Something? Pin
Baeltazor14-Jul-09 1:31
Baeltazor14-Jul-09 1:31 
GeneralRe: Logic behind... Something? Pin
Rajesh R Subramanian14-Jul-09 1:49
professionalRajesh R Subramanian14-Jul-09 1:49 
GeneralRe: Logic behind... Something? Pin
Baeltazor14-Jul-09 1:51
Baeltazor14-Jul-09 1:51 
GeneralRe: Logic behind... Something? Pin
Luc Pattyn14-Jul-09 2:11
sitebuilderLuc Pattyn14-Jul-09 2:11 
GeneralRe: Logic behind... Something? Pin
OriginalGriff14-Jul-09 2:13
mveOriginalGriff14-Jul-09 2:13 
GeneralRe: Logic behind... Something? Pin
Luc Pattyn14-Jul-09 2:39
sitebuilderLuc Pattyn14-Jul-09 2:39 
GeneralRe: Logic behind... Something? Pin
Baeltazor14-Jul-09 9:21
Baeltazor14-Jul-09 9:21 
AnswerRe: Logic behind... Something? Pin
musefan14-Jul-09 1:31
musefan14-Jul-09 1:31 
GeneralRe: Logic behind... Something? Pin
Baeltazor14-Jul-09 1:35
Baeltazor14-Jul-09 1:35 
Questionc# function for Image Compression Pin
GauravKP14-Jul-09 1:11
professionalGauravKP14-Jul-09 1:11 
AnswerRe: c# function for Image Compression Pin
Luc Pattyn14-Jul-09 1:14
sitebuilderLuc Pattyn14-Jul-09 1:14 
JokeRe: c# function for Image Compression Pin
musefan14-Jul-09 1:19
musefan14-Jul-09 1:19 
GeneralRe: c# function for Image Compression Pin
Luc Pattyn14-Jul-09 1:42
sitebuilderLuc Pattyn14-Jul-09 1:42 
GeneralRe: c# function for Image Compression Pin
musefan14-Jul-09 2:42
musefan14-Jul-09 2:42 
GeneralRe: c# function for Image Compression Pin
Luc Pattyn14-Jul-09 2:44
sitebuilderLuc Pattyn14-Jul-09 2:44 
AnswerRe: c# function for Image Compression Pin
benjymous14-Jul-09 1:42
benjymous14-Jul-09 1:42 

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.