|
Thanks.
Do you agree the following summarizes what I am trying to achieve?
Unless the child element has a child element of its own, make it an attribute of the parent.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
It certainly looks like it.
|
|
|
|
|
Yeah, time to practice some XSLT-Fu.
|
|
|
|
|
i hate you. your reply is funny but limited in usefulness.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
I disagree. I feel his post was the most usefull of all, instructing you to increase your skillset. This would have the effect of you being able to solve this particular problem in a far more efficient method than posting a question in a discussion forum.
|
|
|
|
|
Dave Kreskowiak wrote: increase your skillset
Actually, I assumed he was already at least somewhat familiar with XSLT; he seems to know what it is and that it is applicable to the situation.
I think what I meant to imply was that he should maybe become more confortable with XSLT.
Oh, and OP: we do have an XML/XSLT forum if you need assistance group therapy.
|
|
|
|
|
I was just joking around. Either way, it wouldn't hurt to increase his skillset anyway.
|
|
|
|
|
swjam wrote: funny but limited in usefulness
Ah, good, you know XSLT already.
|
|
|
|
|
I thought the I hate you was more indicative of XSLT kowledge!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
To quote Billy Joel: "You may be right."
|
|
|
|
|
Hello,
i have the following code, which redirects the
output from a unmanged dll into a file:
[DllImport("Kernel32.dll", SetLastError = true) ]
public static extern int SetStdHandle(int device, IntPtr handle);
FileStream filestream;
StreamWriter streamwriter;
void Redirect()
{
int status;
IntPtr handle;
filestream = new FileStream("logfile.txt", FileMode.Create);
streamwriter = new StreamWriter(filestream);
streamwriter.AutoFlush = true;
Console.SetOut(streamwriter);
Console.SetError(streamwriter);
handle = filestream.Handle;
status = SetStdHandle(-11, handle); // set stdout
// Check status as needed
status = SetStdHandle(-12, handle); // set stderr
// Check status as needed
}
But I don't want to write the output into a
file.
The output should be written into a winform-control
or a memorystream.
The dll runs in a different process.
The dll ist a "black box" for me,
so I can not modify the source-code.
How can I do that?
Regards
Andreas
|
|
|
|
|
|
Your code is using Console output so it will only go to a file handle, stdout , or whatever that is redirected to. If you want it to go to your form or memory stream then you need to change your code to use a streamwriter [^].
Programming is work, it isn't finger painting. Luc Pattyn
|
|
|
|
|
have you tried to change filestream = new FileStream("logfile.txt", FileMode.Create); to something like filestream = new MemoryStream();
(before you ask, YES, you need to change the declaration of filestream...)
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Hello,
i hope, i got some helpfull information here .
I got an industrial camera device and want to generate a stream which could be shown by the windows mediaplayer activeX control on an other device in the same network.
It's just for monitoring the images made by the camera on a HMI of our mashine.
Do you got any hints for me, how i could realize this?
I think i just need some starting information. ^^
like "use System.IO.Stream and do ..."
not a whole solution ...
I got the Images every time a hardware trigger occurs. The camera framework provides methodes to save it as png to disk. But I want to broadcast it directly to a stream on which the HMI can connect or just show.
|
|
|
|
|
It's just an idea:
If you already have a png-file you could use an internet browser as client to view the image.
I would create a simple html file containig the image with automatic reload tag for the page.
You could access the html-file via file sharing or you implement a little http-server. The HttpListener[^] might help you.
[Edit]
It is not the way you wanted (Mediaplayer...) but I think it's a solution according to your requirements
[/Edit]
|
|
|
|
|
i'm not sure about the possibilities in the HMI Designer software to integrate a html side.
to view the html file, i need a browser, right?
or a built in control in the HMI software, which shows html files....
but i think, there was something like that...
will have a look on it ...
Thanks for the tip
|
|
|
|
|
Standard video formats run at quite a high framerate. Are you recording images that fast? If so it should be possible to stream an AVI with a bit of file format jiggery-pokery, though I'm not aware of Framework methods that make this straightforward.
Alternatively, if you're in charge of both ends, you could write a trivial application that accepts streamed PNGs and updates a PictureBox. The bandwidth on this would be fairly high but assuming it's for intranet use and for only a few endpoints, that should be okay.
|
|
|
|
|
the framerate is about 4 or 5 pics per second and depends on the speed of a conveyor. so it also could stand still and there are no pictures until the conveyor moves again.
there is only one end point.
but it's a closed HMI designer, which provides activeX and there'S already an activeX control of the media player, there you can just set up a stream link.
so we thought it's possible to just generate a stream on the otherside in my c# code of the image processing software.
after my web research, i think, there's no other way then also programm an activeX control, that receives the images .... something like your "streamed png" proposal.
|
|
|
|
|
See image: centerpoint
The point P1 is at the end of a line, the line has the angle At1. The point P2 is at the beginning of a line with the angle At2. I know the coordinates for P1 and P2. I also know the angles At1 and At2. A radius is formed between P1 and P2 and I need to know the center point Pc for the (invisible) circle the which is formed with P1, P2, At1 and At2. The points P1 and P2 can be anywhere in the coordiante system.
I know it's not c# specific, however I was hoping to come across someone who's solved this.
|
|
|
|
|
This message should be posted in the Algorithms forum.
|
|
|
|
|
|
Have been doing some C# programming lately. I personally like white space inside my C# statements. For example, when I code a function call I will put a space after each and every argument. When I type that in using the Visual Studio Editor and hit return, I find that the blanks I have added go away. I do not like that. It seems to me that there should be a way to turn it off. I am hoping somebody in this group can tell me how to do that.
Thanks
Bob
|
|
|
|
|
Tools | Options | Text Editor | C# | Formatting | Spacing
Jack of all trades ~ Master of none.
|
|
|
|
|
Thanks, you solved my problem.
Bob
|
|
|
|