|
Dunno. Maybe try the WebBrowser control and check its document property.
|
|
|
|
|
Some idiot voted you a 1 for a perfectly reasonable answer.
Countered.
|
|
|
|
|
Oh, thanks.
|
|
|
|
|
It isn't an html page (if that's what you mean by a web page), it's XML. The XML contains a link to a stylesheet:
="text/xsl"="http://reports.ieso.ca/docrefs/stylesheet/GenOutputCapability_HTML_t1-1.xsl"
This is used by your browser to transform the XML into HTML, which it displays (assuming your browser supports this).
If you are using the WebBrowser (as Piebald Consultant suggests) control, you might need to transform yourself. This article has a basic outline of how: http://ivanov.wordpress.com/2006/11/17/xml-to-html/[^]
Obviously, you'll need to get the transform file first, which means parsing the XML to get its location and downloading it after the XML has been received.
|
|
|
|
|
The calculation of the totals is done by the XSD, along with the layout.
You have two options: parse the XML and do the data manipulation that you need yourself (all the primary data is in the XML, i.e. all the information that is displayed can be generated from it), or use a XSD-capable library to turn the XML into HTML and then parse information out of that.
I'd go the first way: read that XML into a DataTable or a List<Generator> (some parsing code will probably be needed though if you set up your objects correctly you should be able to Linq-to-XML-load it), and then do grouping, totalling etc as you require.
|
|
|
|
|
I took the easy route which was to create a small forms application that used a WebBrowser object to render the page, then output the text stream from the WebBrowser to an email message. Not elegant but it works.
Thank you for all the replies.
Mark Jackson
|
|
|
|
|
I need to be able to access a number of certificates in a windows service. The code works fine in a console app, but from a service it can't find the certificate.
Is there a special way to install them and open them or both?
Any help would be much appreciated.
Happy programming!!
|
|
|
|
|
A service runs before the user logs in, hence it has to run under a different account. It's probably running under the system-account, and that has it's own profile.
Open the services, find yours, ask it's properties, go to the second or third tab, and have it run under the users' profile. That should do the trick
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I experienced the same problem when I set up Hudson for building our projects: signtool.exe did not find the certificate for signing our programs. I tried with certmgr.msc to make the certificate available for "local system", but failed. Now Hudson runs on my user account on that machine (see also Eddy's answer), and that works.
|
|
|
|
|
There are several MDI child form within my window, one of MDI child form after it's being launched will cause the focus mechanism to be weird, meaning a another MDI child window will not get the focus unless the title bar is clicked, clicking anywhere else in the mdi child form will not caused the form to focus.
any thoughts?
|
|
|
|
|
jojoba2011 wrote: one of MDI child form after it's being launched will cause the focus mechanism to be weird, meaning a another MDI child window will not get the focus unless the title bar is clicked
You mean that when you create and add a child, it is focused? Isn't that the default behaviour? Can you post some code, and explain a bit more on the behaviour that you expect, and how it is behaving now.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
jojoba2011 wrote: clicking anywhere else in the mdi child form will not caused the form to focus
This is weird, can you show us some code on how you show these MDI children?
|
|
|
|
|
Are you describing a scenario where, with the MdiParentForm:
1. one or more MdiChildForms are open and visible (not "collapsed"):
... and ...
2. you then create a new MdiChildForm and 'Show it: naturally it then has "focus," and is front of all other Child Forms:
... and ...
3. then you click inside the "client area" of a visible part of one of the other MdiChildForms that were already open:
... and ...
4. that already-open MdiChildForm you clicked in the client area of: does not: then: have "focus," and is not, now, in front of all the other Child Forms ?
If that is what you are describing: then, there's something very wrong with your code: because: the standard default behavior for clicking on any open (not collapsed) MdiChidForm, in its client area, or on its TitleBar, is: to give it "focus," and bring it in front of all other child forms that are visible.
The logical question to ask, I think, is: when you create a new instance of what will be an MdiChildForm: are you immediately setting its 'MdiParent property to your MdiParent Form ?
And now, excuse me while I get on my "soapbox" and tell you why I think you should not be using Mdi architecture in the first place:
1. it's outmoded, deprecated by MS, and allows the end-user to make visually confusing UI's.
2. even if both MdiParentForm, and MdiChildForm have their 'DoubleBuffered property set to 'true: when you drag a child form around by its TitleBar: you get just an outline of the Child Form.
3. you set the BackGroundColor of your MDIParentForm to some color: that setting is ignored, and you get a dark grey background. You gotta hack around to set its BackColor.
4. It's possible to drag your Child Forms so they are only partially in view inside the MdiParentForm.
So, what's better ? I suggest you consider: independently shown secondary Forms, or you use UserControls, or Panels, that you make movable by the end-user if that's required.
good luck, Bill
"Everything we call real is made of things that cannot be regarded as real." Niels Bohr
|
|
|
|
|
There is a program needed to display 32 road stream on its form, but I found that the display time delay is too hard. Is there anyone meet the similar problem?
|
|
|
|
|
With such a poor desciption of what you app is doing and a non-existant snippet of your rendering code, it's impossible for anyone to answer this question.
|
|
|
|
|
What is 32 road stream? Without this basic information, I'm afraid that I can't even begin to formulate an appropriate answer.
|
|
|
|
|
Sorry, my English is not enough good. The "32 road stream" means using 32 Panel Controls to display video. 8 x 4 layout. In the Main Form, there are 8 Panel Controls in every row and there are 4 Panel Controls in every column. Now I need these 32 Panels to display different video at the same time. At present, I haven't had good idea about how to optimize the these video display.
|
|
|
|
|
Playing video is a resource intensive operation (it takes up a lot of processor/video time). The processing time is going to depend partly on the quality and size of the video streams. Are you scaling the images down to fit in the panels? What control are you using to display the video?
|
|
|
|
|
Hi Pete,
I defined a myself-define control, myVideoWindow, derived from Panel to display Video. When myVideoWindow received the frame data, it will save the frame data as a Bitmap object then use Invalidate() to notificate the Form the refresh the control. In control myVideoWindow's OnPaint() function, I use the g.DrawImage() to draw last frame data.
|
|
|
|
|
Hi All,
I am using google translator to translate my code from different languages to english but if i want to translate multiple(and with different data) files it is taking so much of time so that i want to use threads to translate those multiple files at a time and i am having data in ms access tables(multiple) i need to translate that data too
please provide me the c# code for using threading for converting multiple database tables and files
Thank you so much
Regards,
Sri
|
|
|
|
|
Have a look at something called the Task Parallel Library. If you search here on Code Project, you will find some excellent articles on it (pay particular attention to those by Sacha Barber).
|
|
|
|
|
Sridk wrote: please provide me the c# code
You look lost; the forum is for software developers, aimed at helping when one is stuck.
If you need someone to "provide you with codes", hire someone to write 'em.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Sridk wrote: please provide me the c# code
Asking for code is considered rude here and may invite a rain of downvotes. Instead, ask for ideas.
There are many ways to execute multiple tasks in parallel including:
1. Create as many instances of the Thread class and execute them in parallel.
2. Use the ThreadPool class
3. Use BackgroundWorker class
4. Use Task Parallel Library
A word of caution: Using threads may not necessarily improve the performance of your code unless you have multiple processors or your processor has multiple cores. So if you have a single processor with a single core, it will not make any difference in the time taken to complete the task. On the contrary, it may actually slow down your task due to the threading overhead.
|
|
|
|
|
Okay so here's the deal. I have an event that generates a number of xaml components on the fly. One of these xaml components also has some events hooked up to it. In order to do this I am using the following line of code
Holder.ManipulationDelta += new ManipulationDeltaEventHandler(HolderManipulationDelta);
This is then handled with
private void HolderManipulationDelta(object sender, Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e) {
What I need is to be able to pass in an extra parameter in the event such as...
private void HolderManipulationDelta(object sender, Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e, CompositeTransform mv) {
However this seems to be invalid. I've tried googling and got some stuff on delegates etc but I cant get my head around it. Can anyone help me out?
|
|
|
|
|
Are you trying to find a way to make the third parameter optional?
|
|
|
|