Click here to Skip to main content
15,895,656 members
Home / Discussions / C#
   

C#

 
AnswerRe: SQL Data Base Update - Best approach nested implementation Pin
Not Active2-Apr-10 2:40
mentorNot Active2-Apr-10 2:40 
GeneralRe: SQL Data Base Update - Best approach nested implementation Pin
boreland2-Apr-10 4:59
boreland2-Apr-10 4:59 
GeneralRe: SQL Data Base Update - Best approach nested implementation Pin
Not Active2-Apr-10 5:48
mentorNot Active2-Apr-10 5:48 
AnswerRe: SQL Data Base Update - Best approach nested implementation Pin
boreland2-Apr-10 5:00
boreland2-Apr-10 5:00 
AnswerRe: SQL Data Base Update - Best approach nested implementation Pin
Rob Graham2-Apr-10 8:18
Rob Graham2-Apr-10 8:18 
QuestionRectangle.Intersect() or Rectangle.Contains() ? Pin
venomation2-Apr-10 1:57
venomation2-Apr-10 1:57 
AnswerRe: Rectangle.Intersect() or Rectangle.Contains() ? Pin
Luc Pattyn2-Apr-10 2:24
sitebuilderLuc Pattyn2-Apr-10 2:24 
QuestionRedirecting an output stream Pin
Lutosław2-Apr-10 1:24
Lutosław2-Apr-10 1:24 
I am developing an add-in for VS for latex. The very first functionality I wish to implement is a button "compile" (to pdf). Well I can do that, but what I want is
1. Do not show a console window
2. Redirect text output (with errors/warnings/mesasges) from pdftex. The next step will be to parse these results and show them in a separate window.
I use the following code:
Document doc = _applicationObject.ActiveDocument;
if (Path.GetExtension(doc.Name) == ".tex")
{
    var p = new System.Diagnostics.Process();
    var pinfo =new ProcessStartInfo
               {
                   CreateNoWindow = true,
                   FileName = "pdflatex",
                   Arguments = string.Format("\"{0}\" -c-style-errors", doc.FullName),
                   WorkingDirectory = Path.GetDirectoryName(doc.FullName),
                   //RedirectStandardError = true // <===
               };

    p.EnableRaisingEvents = true;
    p.Exited += p_Exited;
    
    p.StartInfo = pinfo;
    p.Start();

    //_applicationObject.ToolWindows.OutputWindow.ActivePane.OutputString(p.StandardOutput.ReadToEnd());
}

I have observed the following issues:
1. Uncommenting RedirectStandardError = true causes that pdftex does not work (no output file is generated at all)
If RedirectStandardError = true is commented, then pdftex does it's job. But:
2. Despite CreateNoWindow = true console still shows up.
3. p_Exited is never called

As you see none of things I wanted to do actually works. It is quite depressing. Any ideas?

Thanks--
Greetings - Jacek

AnswerRe: Redirecting an output stream Pin
Luc Pattyn2-Apr-10 2:33
sitebuilderLuc Pattyn2-Apr-10 2:33 
GeneralRe: Redirecting an output stream Pin
Lutosław2-Apr-10 3:50
Lutosław2-Apr-10 3:50 
GeneralRe: Redirecting an output stream Pin
Luc Pattyn2-Apr-10 3:54
sitebuilderLuc Pattyn2-Apr-10 3:54 
GeneralRe: Redirecting an output stream Pin
Lutosław2-Apr-10 4:39
Lutosław2-Apr-10 4:39 
AnswerRe: Redirecting an output stream Pin
PIEBALDconsult2-Apr-10 4:06
mvePIEBALDconsult2-Apr-10 4:06 
GeneralRe: Redirecting an output stream Pin
Lutosław2-Apr-10 4:40
Lutosław2-Apr-10 4:40 
News[Solved!] Redirecting an output stream Pin
Lutosław2-Apr-10 4:44
Lutosław2-Apr-10 4:44 
GeneralRe: [Solved!] Redirecting an output stream Pin
Luc Pattyn2-Apr-10 4:49
sitebuilderLuc Pattyn2-Apr-10 4:49 
GeneralRe: [Solved!] Redirecting an output stream Pin
Lutosław2-Apr-10 5:21
Lutosław2-Apr-10 5:21 
GeneralRe: [Solved!] Redirecting an output stream Pin
Luc Pattyn2-Apr-10 5:24
sitebuilderLuc Pattyn2-Apr-10 5:24 
AnswerRe: Redirecting an output stream Pin
Mirko19802-Apr-10 6:12
Mirko19802-Apr-10 6:12 
Questionwho handles error while writing the source code???. Pin
Isaac Gordon1-Apr-10 21:42
Isaac Gordon1-Apr-10 21:42 
AnswerRe: who handles error while writing the source code???. Pin
OriginalGriff1-Apr-10 21:45
mveOriginalGriff1-Apr-10 21:45 
GeneralRe: who handles error while writing the source code???. Pin
Isaac Gordon2-Apr-10 0:58
Isaac Gordon2-Apr-10 0:58 
GeneralRe: who handles error while writing the source code???. Pin
Not Active2-Apr-10 1:55
mentorNot Active2-Apr-10 1:55 
AnswerRe: who handles error while writing the source code???. Pin
Abhinav S1-Apr-10 22:11
Abhinav S1-Apr-10 22:11 
AnswerRe: who handles error while writing the source code???. Pin
Eddy Vluggen1-Apr-10 22:49
professionalEddy Vluggen1-Apr-10 22:49 

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.