Click here to Skip to main content
15,892,059 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Doubt on Serialization Pin
Scott Dorman19-May-07 5:24
professionalScott Dorman19-May-07 5:24 
AnswerRe: Doubt on Serialization Pin
GgAben22-May-07 0:24
GgAben22-May-07 0:24 
Question.NET Enterprise Library Pin
Bommannan.Ramalingam16-May-07 22:50
Bommannan.Ramalingam16-May-07 22:50 
AnswerRe: .NET Enterprise Library Pin
Not Active17-May-07 8:07
mentorNot Active17-May-07 8:07 
QuestionPrinters in WPF Pin
jjholt16-May-07 14:32
jjholt16-May-07 14:32 
AnswerRe: Printers in WPF Pin
Paul Conrad14-Jul-07 6:51
professionalPaul Conrad14-Jul-07 6:51 
GeneralRe: Printers in WPF Pin
jjholt16-Jul-07 16:37
jjholt16-Jul-07 16:37 
QuestionA few questions regarding issues I'm having with a project Pin
Christoff91516-May-07 12:45
Christoff91516-May-07 12:45 
Hello,

I am currently developing an application that will serve as a client interface for a Rimage cd-producing server. This application is intended to run on the same Windows box that the Rimage is connected to and monitor a directory on the file structure or network for folders (patient studies to be burned to cd) that are sent there to be processed. Once a folder is detected in the target directory, that folder is moved to a temp directory, where an order is created and the processing begins.

The process for the order is managed entirely within a worker thread, and each order gets its own thread to run in. The thread method contains a WHILE loop that cycles until the order's state property is set to indicate completion. Inside this loop are sets of conditionals that move the order along as the order's state is advanced by the server. Once the order is done the loop exits, and a cleanup routine is executed that removes the files that were processed and other completion-related tasks (logging, UI updating, etc).

I have a couple questions related to my design that I'm hoping a more seasoned developer (read: anyone) might be able to answer and possibly point me in a better direction (read: something that actually works).

1) In the order detection process, when a folder is found in the target directory, I load that folder into a DirectoryInfo class and check the LastWriteTime property. If LastWriteTime.AddSeconds(10) < DateTime.Now, I move the folder for processing. If not, the folder is left alone until the next pass, during which it will be checked again. The objective of that check is to make sure that all contents to be burned have been copied over before the order process begins.

This has usually seemed to work fine, but lately when I test using larger folders of data (+100megs), the folder will be sent for processing before the files are done copying.
My question is: does the LastWriteTime (or even LastAccessTime, for that matter) account for any subfolders inside the folder being written to or does it only check for files being written to in that particular folder, ignoring any subfolder activity?

2) In the method that the worker thread runs, the constantly cycling WHILE loop doesn't seem like the best way to do it. However, the thread needs to stay alive through two different processes; the first process that tells the Rimage to create an ISO image of the files and the second process that sends an order to the Rimage to burn that ISO image to a cd. So having the method loop while it worked its way through those processes seemed the best way to do it at the time. Upon further reflection, I'm sure there's a better method than that to manage multiple orders independently while not tying up my UI thread and making my form non-responsive...I just don't have a clue what it is and a lot of the tutorials that I've looked at just don't seem to fit with what I'm trying to accomplish here.

In case you couldn't tell by now, I'm a very inexperienced programmer (read: HTML monkey/Layout guy) that has been assigned with this project. Kind of like learning to swim by being tossed in the middle of a lake. With an anvil around your ankle. And sharks. I would really appreciate any guidance or links to resources that some kind-hearted guru can provide that would help with the above issues.

Thanks in advance.
AnswerRe: A few questions regarding issues I'm having with a project Pin
Christian Graus16-May-07 13:05
protectorChristian Graus16-May-07 13:05 
GeneralRe: A few questions regarding issues I'm having with a project Pin
Christoff91516-May-07 13:28
Christoff91516-May-07 13:28 
GeneralRe: A few questions regarding issues I'm having with a project Pin
Christian Graus16-May-07 13:37
protectorChristian Graus16-May-07 13:37 
GeneralRe: A few questions regarding issues I'm having with a project Pin
Christoff91516-May-07 17:04
Christoff91516-May-07 17:04 
GeneralRe: A few questions regarding issues I'm having with a project Pin
Christian Graus17-May-07 12:42
protectorChristian Graus17-May-07 12:42 
QuestionProtecting Applicatin DLL (dot net) Pin
sandeep kumar pundhir16-May-07 10:40
sandeep kumar pundhir16-May-07 10:40 
AnswerRe: Protecting Applicatin DLL (dot net) Pin
Colin Angus Mackay16-May-07 11:58
Colin Angus Mackay16-May-07 11:58 
AnswerRe: Protecting Applicatin DLL (dot net) Pin
Christian Graus16-May-07 13:06
protectorChristian Graus16-May-07 13:06 
AnswerRe: Protecting Applicatin DLL (dot net) Pin
Dave Kreskowiak16-May-07 15:28
mveDave Kreskowiak16-May-07 15:28 
GeneralRe: Protecting Applicatin DLL (dot net) Pin
Christian Graus16-May-07 15:55
protectorChristian Graus16-May-07 15:55 
GeneralRe: Protecting Applicatin DLL (dot net) Pin
Dave Kreskowiak16-May-07 16:01
mveDave Kreskowiak16-May-07 16:01 
GeneralRe: Protecting Applicatin DLL (dot net) Pin
Dave Kreskowiak16-May-07 16:20
mveDave Kreskowiak16-May-07 16:20 
QuestionNET performance Pin
KEL316-May-07 1:57
KEL316-May-07 1:57 
AnswerNET performanc, me_again Pin
KEL325-May-07 3:43
KEL325-May-07 3:43 
GeneralRe: NET performanc, me_again Pin
Thomas Stockwell26-May-07 16:06
professionalThomas Stockwell26-May-07 16:06 
Question.NET Framework 2.0 Pin
Blumen15-May-07 23:52
Blumen15-May-07 23:52 
GeneralRe: .NET Framework 2.0 Pin
Ashwani kumar srivas16-May-07 0:40
Ashwani kumar srivas16-May-07 0:40 

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.