Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: I am having an issue with Boolean variables... Pin
glennPattonWork310-Mar-16 5:15
professionalglennPattonWork310-Mar-16 5:15 
GeneralRe: I am having an issue with Boolean variables... Pin
OriginalGriff10-Mar-16 5:30
mveOriginalGriff10-Mar-16 5:30 
GeneralRe: I am having an issue with Boolean variables... Pin
glennPattonWork310-Mar-16 5:39
professionalglennPattonWork310-Mar-16 5:39 
GeneralRe: I am having an issue with Boolean variables... Pin
Luc Pattyn10-Mar-16 8:58
sitebuilderLuc Pattyn10-Mar-16 8:58 
GeneralRe: I am having an issue with Boolean variables... Pin
glennPattonWork310-Mar-16 13:48
professionalglennPattonWork310-Mar-16 13:48 
GeneralRe: I am having an issue with Boolean variables... Pin
PIEBALDconsult10-Mar-16 4:19
mvePIEBALDconsult10-Mar-16 4:19 
GeneralRe: I am having an issue with Boolean variables... Pin
glennPattonWork310-Mar-16 4:28
professionalglennPattonWork310-Mar-16 4:28 
QuestionShowing a ProgressBar from a FileSystemWatcher Pin
Paböö .10-Mar-16 1:53
Paböö .10-Mar-16 1:53 
Hi.
Lemme try to be clear here.
I've a code, with two files: Form1.cs and Classes.cs
Classes.cs contains all my methods, variables, etc (and the FilesystemWatcher implementation).

Form1.cs (The main form) contains some button calls, and a call to FilesystemWatcher (when the button is pressed).

What i'm trying to accomplish and can't see to figure out is: Show a ProgressBar from this FilesystemWatcher.

Consider the following scenario: I Just clicked a button and FilesystemWatcher has started. It will monitor the folder and do operations over created files. How i'm gonna show the progress for that ?

On my readfiles() method (inside the Classes.cs) i've tought about passing a variable trough parameter that indicates how much of the file has been read - for so i would have to implement FilesystemWatcher in the Form1.cs. But the FilesystemWatcher calls all my methods.
His method on Classes.cs looks like:
SetupFileWatcher()
all other methods to convert files, etc...
Even if i move FilesystemWatcher to Form1 main code, he doesn't return any progress value - he just run methods as soon files are added.
Lemme try to show a piece of code (This happens at Classes.cs)
Implementing filesystem watcher on this method...
C#
protected FileSystemWatcher SetupFileWatcher(string path)



FileSystemWatcher Call
C#
public void ProgramProcessing(string filePath)
 {

     SetupFileWatcher(SelectedFolder);
     InputFolderSelect();
     ReadFiles();
     FileDefinition();
     //MOvefiles
     ColorExtraction();
     ColorValueExtraction();
     DataGrouping();
     NumberProcessing();
     ColorPoolManipulation();
     WriteInkzoneXML();
     WriteColorPoolXML();
 }


Now, this happens inside Form1.cs:
C#
private void btnGo_Click_1(object sender, EventArgs e)
prg.ProgramProcessing(textBox1.Text);


How could i possibly achieve that ? Is it possible ? Al i would like is to show the progress for the operation (or at least the methods for reading files and write XML).
Thanks in advance for any help\guidance.
AnswerRe: Showing a ProgressBar from a FileSystemWatcher Pin
Richard MacCutchan10-Mar-16 2:39
mveRichard MacCutchan10-Mar-16 2:39 
QuestionMessage Removed Pin
7-Mar-16 15:41
hanis292687-Mar-16 15:41 
Questionhow to export and import IBM DB2 table data from one database to another database using C#.net Pin
Tej_dev7-Mar-16 10:50
Tej_dev7-Mar-16 10:50 
SuggestionRe: how to export and import IBM DB2 table data from one database to another database using C#.net Pin
CHill608-Mar-16 2:25
mveCHill608-Mar-16 2:25 
AnswerRe: how to export and import IBM DB2 table data from one database to another database using C#.net Pin
Mycroft Holmes8-Mar-16 13:23
professionalMycroft Holmes8-Mar-16 13:23 
GeneralRe: how to export and import IBM DB2 table data from one database to another database using C#.net Pin
Tej_dev9-Mar-16 11:32
Tej_dev9-Mar-16 11:32 
GeneralHow to get a web site value to windows form project in c#? Pin
lulithagihan5-Mar-16 19:51
lulithagihan5-Mar-16 19:51 
GeneralRe: How to get a web site value to windows form project in c#? Pin
Pete O'Hanlon5-Mar-16 20:59
mvePete O'Hanlon5-Mar-16 20:59 
GeneralRe: How to get a web site value to windows form project in c#? Pin
OriginalGriff5-Mar-16 21:32
mveOriginalGriff5-Mar-16 21:32 
QuestionWhere can I find the code for my book? Pin
hmanhha5-Mar-16 10:15
hmanhha5-Mar-16 10:15 
AnswerRe: Where can I find the code for my book? Pin
Luc Pattyn5-Mar-16 10:19
sitebuilderLuc Pattyn5-Mar-16 10:19 
PraiseRe: Where can I find the code for my book? Pin
CHill605-Mar-16 14:05
mveCHill605-Mar-16 14:05 
GeneralRe: Where can I find the code for my book? Pin
Kunal Chowdhury «IN»6-Mar-16 2:09
professionalKunal Chowdhury «IN»6-Mar-16 2:09 
GeneralRe: Where can I find the code for my book? Pin
hmanhha6-Mar-16 2:58
hmanhha6-Mar-16 2:58 
GeneralRe: Where can I find the code for my book? Pin
OriginalGriff6-Mar-16 3:14
mveOriginalGriff6-Mar-16 3:14 
GeneralRe: Where can I find the code for my book? Pin
hmanhha6-Mar-16 3:56
hmanhha6-Mar-16 3:56 
GeneralRe: Where can I find the code for my book? Pin
OriginalGriff6-Mar-16 4:11
mveOriginalGriff6-Mar-16 4:11 

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.