|
It appears that "u2u" is a section delimiter here; using:
string[] sections = packet.Split(new string[]{"u2u"," | ","||"},StringSplitOptions.RemoveEmptyEntries); Will get you a 3 element string array where each element contains only the data in that section.
You can easily take each section, use string.Split again to get the section itrms, and then set your Label values accordingly.
I note that your first section has #5 elements; the other sections have #6.
The code I would write for something like this would depend on how reliable I thought the data was: the extent it had regular structure. And, I'd always assume that there would be errors, eventually
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
|
|
|
|
|
Hello
I am working on a recent project and I have been learning how to code in C# using OpenGL libraries for some graphics. I have achieved some quite interesting things using TAO Framework writing in Console Applications, creating a GLUT Window. But my problem now is that I need to incorporate the Graphics in a Windows Form so I can relate the objects that I render with some .NET Controls.
To deal with this problem, I have seen in some forums that it's better to use OpenTK instead of TAO Framework, so I can use the glControl that OpenTK libraries offer. However, I haven't found complete articles, tutorials or source codes that help using the glControl or that may insert me into de OpenTK functions. Would somebody please share in this forum some links or files where I can find good documentation about this topic? Or may I use another library different of OpenTK?
Thanks!
|
|
|
|
|
|
Good Morning Richard.
Thank you for commenting, but the search results are all based on GLUT independent Windows. What I need is to attach an OpenGL View inside a Windows Form. The most related article that I have found is this: An Analog Clock Design Using OpenTK in C#[^]. However, the source code isn't available and if I follow the steps described, the program doesn't work.
|
|
|
|
|
Articles here on CodeProject (and elsewhere) do not carry guarantees. However I see a "Download source - 430.54 KB" link on the article which you should be able to use. Other than that you will need to do your own searching.
|
|
|
|
|
Step 1: Open Visual Studio.
Step 2: Select File -> New -> Project
Step 3: Select Visual C# Template
Step 4: Select Console Application
Step 5: Give Name of Application and Click on OK Button.
Visual Studio will open a Program.cs File; File will have some Namespaces, Class and Main Method.
Step 6: Write the following code (Print number from 1 to 100) in Main Method.
{
for(int count=1;count<=10;count++)
{
Console.WriteLine(count);
}
Console.Read();
}
modified 31-Aug-18 6:15am.
|
|
|
|
|
You've been here 4 1/2 years and you think that is a question?
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
That looks like your homework instructions: I'd strongly suggest you read them carefully and do exactly what they say.
Then, press F5 which will compile and (if you typed it all correctly) run your program.
It won't however do what it says it will: there is a bug in the code or the description of the code.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I would remove the letter 'i' declared above the for() loop, and use the var keyword inside the for instead. Other than this observation, I am not sure what your question is.
Ben Scharbach
Temporalwars.Com
YouTube:Ben Scharbach
|
|
|
|
|
|
You can try asking the author if he's interested in making a video version: there is a forum at the bottom of the article which lets you communicate with him.
But ... that article was written in 2004, so his interests have probably moved on since then. And he hasn't logged in for over three years, so he isn't necessarily interested in the site anymore.
If I was you, I'd read the article: a video tutorial is going to cover the same ground, but in less detail, and probably in a much worse format.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
Who exactly do you want to make this video tutorial, and what do you think you'll get out of it that you can't get from the tutorial?
This space for rent
|
|
|
|
|
Pete O'Hanlon wrote: what do you think you'll get out of it that you can't get from the tutorial?
The inability to copy'n'paste any code?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Copy and paste is to easy.. but understanding code is difficult... how its work and why its work
|
|
|
|
|
And you won't get that from most video tutorials - they are generally made by people who can't read and write, much less explain how things work!
I've yet to see a code-based video tutorial that was better than the text-based equivalent.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
That would be an interesting C# video tutorial to create. I will keep this in mind on my Youtube C# video channel.
Ben Scharbach
Temporalwars.Com
YouTube:Ben Scharbach
|
|
|
|
|
Message Removed
modified 20-Jul-17 10:10am.
|
|
|
|
|
Message Removed
modified 20-Jul-17 10:10am.
|
|
|
|
|
Message Removed
modified 20-Jul-17 10:10am.
|
|
|
|
|
How to call the load runner (LR) controller from visual studio
|
|
|
|
|
|
Install the Visual Studio add-in on the LoadRunner CD: open its UI, read the 'ReadMe file.
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
|
|
|
|
|
In the diagram given in below link for each customer I want to select all orders and then for each order I have calculate a TotalPrice = (Sum of all Food Items included in order * Quantity) + ExtraPrice. I am struggling to create a query for it using linq to sql.I need to select OrderId, Date and TotalPrice and it should include a where clause for comparing customer ID.
<a href="https://prnt.sc/fwf7ca">Relationship Diagram</a>
What I have tried:
dc.orders.Select(o => new { o.orderId, o.date, TotalPrice = ( (o.orderLines.Select(ol => ol.foodItem.price).Sum() * decimal.Parse(o.orderLines.Select(ox => ox.quantity).ToString())) + decimal.Parse(o.orderLines.Select(x => x.extraPrice).ToString())) } );
|
|
|
|