|
Hi Jovita,
nice to meet you and welcome to the big "family" of CP.
See you around
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Thank you!
|
|
|
|
|
I just wrote this. It works, exactly as it's supposed to.
Common.Initialize<TaxCode>(
dxgTaxCodes,
tc => !tc.Archived,
archiveController.OnTaxCodeDeleted,
archiveController.OnTaxCodeChanging,
onFinalized: (_, __) =>
Common.Initialize<Product>(
dxgProducts,
p => !p.Archived,
archiveController.OnProductDeleted,
archiveController.OnProductChanging,
updateLookups: true,
decoupledLookups: true,
onFinalized: (___, ____) => Common.Initialize<ProductSchedule>(
dxgProductSchedules,
p => !p.Archived,
updateLookups: true,
decoupledLookups: true)));
Here's the code with comments:
Common.Initialize<TaxCode>(
dxgTaxCodes,
tc => !tc.Archived,
archiveController.OnTaxCodeDeleted,
archiveController.OnTaxCodeChanging,
onFinalized: (_, __) =>
Common.Initialize<Product>(
dxgProducts,
p => !p.Archived,
archiveController.OnProductDeleted,
archiveController.OnProductChanging,
updateLookups: true,
decoupledLookups: true,
onFinalized: (___, ____) => Common.Initialize<ProductSchedule>(
dxgProductSchedules,
ps => !ps.Archived,
updateLookups: true,
decoupledLookups: true)));
(I hope the formatting got preserved.)
OK, yeah, this is a bit much.
|
|
|
|
|
Who's this mean green commenting machine?
|
|
|
|
|
That code reminds me of assembler, where I used to pretty much comment every line to explain why the instruction was there.
|
|
|
|
|
I dare you to convert that to VB.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
It looks like you have some broad butts in your code.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
Readability is partially a matter of taste I guess, but I think if the onFinalized 's weren't inlined, the three remaining blocks wouldn't be as intimidating anymore and you would probably not need any comments at all.
modified 13-Sep-18 21:01pm.
|
|
|
|
|
And you are proud of it?
You aren't an engineer, you are a nerd.
|
|
|
|
|
I'm sorry Marc, but... ew.
Based on this code fragment, however, you may have finally disproved the truism about death and taxes. Since you wrote this, you can never die because they'll need you to stay around to maintain it.
Software Zen: delete this;
|
|
|
|
|
Now, THAT would NOT pass a code review! Comments should reveal what the code cannot. In this case, almost every single comment is clearly represented in the code.
What is missing is WHY this was necessary, and any limitations thereof. (eg, it cannot load old tax codes)
|
|
|
|
|
I use Visual Studio 2012 C#. I would like to create an application controlling the mouse cursor on the screen. I would like to set the coordinates of the mouse cursor on the screen and then to click with the mouse over the desired coordinates. I would like to set keys combination without using the keyboard and then to go to these coordinates automatically with the mouse cursor. I need information about the functions or properties for click events of the mouse cursor without using the mouse. Could you please help with any tutorial or example, please?
|
|
|
|
|
You could always try www.google.com[^]. You could also read again the text at the top of this page.
|
|
|
|
|
Member 12268183 wrote: Could you please help with any tutorial or example, please? Welcome - The complete C# tutorial[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Thank you for the answer. I need only the functions related with the mouse cursor control not the whole training C# course.
Regards
|
|
|
|
|
Aw, I think you do.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Oh good, a non-VS2010 user ...
Can you tell me whether VS2012 is 64-bit?
|
|
|
|
|
VS2012 is definitely not 64 bit. Nor are VS2015 or VS2017.
The Visual Studio PM just said that VS2019 won't be 64 bit, either.
Maybe VS2048 will finally be 64 bit, though.
|
|
|
|
|
10-4 good buddy ... 2048; works for me.
|
|
|
|
|
Has MS made any thoughts on when/if a 64 bit version might happen more recently than a half dozenish years ago?
At the time the VS PMs reason for not doing it was that it wouldn't actually help scaling to larger solutions much because hitting the 4GB limit was always due to an algorithm/datastructure that was O(n^2) or worse, meaning that a 64 bit version would only let things get a tiny bit bigger before hitting the wall again, and that finding the performance/memory bottlenecks and rewriting them to be O(n) or O(n log n) would have much bigger returns than exhaustively reviewing/fixing the entire codebase to make sure everything was 64bit pointer safe. At the same time he did say that any module being worked on was being made 64bit safe, with the intent of gradually reducing the size of the remaining 64 bit conversion until doing so was justifiable in terms of the amount of work it'd require (vs spending the labor on other features local optimizations).
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
A Visual Studio PM was replying to comments in the blog post talking about VS2019.
He said that the consider the pros and cons of going 64 bit before each release, and theyève decided not to do it for VS2019.
I know that's not exactly a thought from MS on when 64 bit Visual Studio might happen. But it's at least a thought from MS on when it won't happen.
|
|
|
|
|
Thanks for that. I read the blog but didn't slum into the comments to see if there was anything interesting posted.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
|
No it isn't.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|