Search:
Type: Posts; User: wolf99
Search:
Search took 0.06 seconds.
-
Thanks for the added clarity Sitten. I don't have enough rep to see deleted answers on SO, so I had no idea why he'd deleted it... I opened the question here in addition to the SO one because I...
-
Thanks TechGnome!
My understanding of what is actually the best way to do this is... patchy (Friday brain). Something like the following should cover it?
public class StringList :...
-
In this SO question, https://stackoverflow.com/a/46363899/1292918, Hans Passant mentions:
"Mapping your own non-generic interface to a generic collection type"
What is meant by this exactly?...
-
Thanks for the info techgnome; that sounds logical enough in the general case...
However, in this specific case a command may only ever have 0 or 1 ReadProtocol, that is the <ReadProtocol> element...
-
Thanks for all the info folks.
I realised why I hadn't used the XMLAttribute avenue to begin with - I had been trying to keep the classes generated by XSD.exe untouched, so as to make it easy to...
-
@techgnome: Damn it, I should have thought of this! :blush: Thanks!
I think to completely solve my problem (it's not just the names, but the types that differ also) I can solve this in two steps:...
-
Hi folks,
TLDR: I have class MessyA, resulting from a deserializer, that models real data and want to have class SmartA that implements IA that is easier for the user to work with, what is the...
-
I think I've figured out how to do this for this design:
// Save the type information to the RadioButton at control creation
rb.Tag = c.GetType();
Then:
-
I've asked this question on SO and didn't really get anywhere so I think I'm probably coming at this from the wrong angle and need more than just Q&A help as I can't see a way around it.
The...
-
Drat. Ill just go back and rejig my data model to be simpler and forget about the min/max command codes as a complex object. Much simpler and puts the problem off down the road which means the boss...
-
Darren,
Do a quick search on these forums using the search bar at the top. This has been answered quite a number of times in various different ways. Maybe search the VB6 forum as well as there a...
-
the following does no checking of the entered text, only works for whole numbers and uses the default names for the controls (i.e: Form1, ComboBox1, textBox1 and Label1)
Delegate Function...
-
Gah, that doesnt protect the many to one relationship of the min/max commands to the mappings >:(
-
so I've ended up with:
Private Class ParametersAndCommands
Public Property Description As String
Public Property Unit As CommandData.ParameterUnit
Public Property MinimumCommand...
-
So I have this down to forming a new List by running a Join query on the other two Lists. However Im not quite there just yet as it's a looooong time since I've used LINQ or even SQL and I've...
-
Maybe if I create a dataset with tables of each list and add some constraints between them to create a new ... something (DataTable? DataView? I dont really know datasets :( ) and then bind that to...
-
Hi folks
Im trying to figure out the best way of going about binding some data to a DataGridView. I can bind simple collections etc no problem but now i have to collections with relationships...
-
Hi Folks,
Thanks for the discussion! I am using VS 2010.
So basically my use of invoke is down to the events fired off by a FileSystemWatcher being on a separate thread. When these events...
-
So I went back to the example on the Control.Invoke() MSDN page and used the exact syntax there (give or take some names!):
Delegate Sub StupidHelperDelegate()
Sub StupidHelpersub()
...
-
Furthermore, and separately: if the argument should be a delegate
How come neither of the following work?
somecontrol.Invoke(Foo())
SomeControl.Invoke(AddressOf Foo())
-
Hi folks
The MDSN page for the Control.Invoke method specifies:
Control.Invoke Method (Delegate)
Now I was given in my admittedly limited knowledge to understand that a delegate is just a...
-
-
Hi Folks
I have a form with a TextBox control.
The text entered in the text box is saved to an object in the TextBox.Validated event handler.
When the user hits the save ToolStripButton the...
-
Got it.
When I set up my objects that I was testing with I created a single TestValue object of type ParameterValue.
then I set all of the ParameterValue type members in each Parameter equal to...
-
OK, so I reverted to the PropertyDescriptor approach after reading this Which showed that the previous example had a bit missing.
the columns now have data in them again!
But changing the data...
-
Hi Folks
I have a DataGridView with some DataGridViewTextBoxColumn columns in it.
The DGV itself is bound to a BindingList(Of Parameter)
The Parameter class has public property members...
-
Thanks Techgnome. while your answer didn't directly solve the issue it (and a nights sleep) set my mind on the right path.
I'd been mixing up the bindings! Basically, at the moment the...
-
Hiya peeps!
I have a DataGridView added to my windows form application form. Some of the columns are DataGridViewComboBoxColumn columns.
I would like to populate the column combo-boxes from...
-
More light dawns! :D
Public Function CalcRms(input As IEnumerable(Of Double), removeDcComponent As Boolean) As Double
Dim Count As UInteger = input.Count()
Dim MeanSquare As Double = 0...
-
Brilliant Evil_giraffe, thank you for your detailed and well thought post!
I now have the following code:
Public Function CalcRms(Of TSource)(input As List(Of TSource), selector As Func(Of...
-
Hi Evil_Giraffe, #Destiny
True dat, I asked the internet how to `.Sum` and adapted what I found, but now you say it I see your point! I can pass a delegate (similar to function pointer right?) or...
-
I have some code that works fine but I currently have the same code three times, I'd like to refactor to a single function that is called from three places instead.
The current code has access to...
-
Thanks Sitten Spyne that works :)
-
for the number formatting
Your number has and "E" in it, this should normally be followed by another number that shows the power, eg 12.
34567E-1 which would mean the number is 12.34567 *10^-1...
-
As a quick alternative you could try adding Stage to the Watch window maybe
-
Hi folks,
I was trying to use a mutex to solve an issue I am having but it doesn't work as by necessity the function that acquires the mutex is not always the one that releases it.
The issue is...
-
D'oh, of course! The enum is already public too :rolleyes: :blush:
-
Many thanks for your thorough replies, much appreciated!
I now understand that this situation is likely not a good candidate for the pattern. The reasoning that started me on this path was that I...
-
Hi Folks
This turned into a pretty long post so the TLDR version is: I'm a noob at using OOP patterns. Should I, and how can I, adapt my code (below) to use the factory pattern?
The longer...
-
Hi Folks
I have a simple synchronous function that write n bytes to the serial port and reads the same number of bytes back. In the case of the code below n = 4.
Now I have an oscilloscope...
|
Click Here to Expand Forum to Full Width
|