|
I wrote an article about this. Have a look[^]. It might help you.
|
|
|
|
|
I found a very interesting link which guide you how to create a Generic Progress Dialog. go there[^]
|
|
|
|
|
Thanks for all the replies I managed to sort it out
|
|
|
|
|
Hi
LINQ to SQL - join and where: Is it performed in Database? Or load the dataset into memory before operation actually is performed?
This concerns me if I want to load a big table.
Same question to LINQ to Csv[^]
dev
|
|
|
|
|
If you are using LINQ to SQL or LINQ to entities then your query will be translated into sql, so joins will happen at the database level. Also, skip and take use top so paging is relatively efficient.
I'd recommend spending some time experimenting with linq expressions and looking at the sql generated because it's not at all obvious when you are going to run into some unexpectedly slow sql.
|
|
|
|
|
thanks thanks
Also do you have experience with LINQ to Csv? Does it load a million rows before WHERE filtering action begins?
dev
|
|
|
|
|
I'm trying to figure out how I can create a custom GUI to write to a microchip.
The way that the Microchip IDE works is that it uses the "Full Duplex Serial" object with an FTDI to USB serial converter and will send or receive data that way,I believe that object is written in Delphi though, of which I have 0 experience with.
I'm wondering if I can use this c sharp serial object C sharp serial object and if anyone has any suggestions on how to test with it? I believe I can write at 115200, no parity bit, 8 data bits and 1 stop bit.
I'm sorry if this post seems to lack a little information, I haven't been programming long and I've never tried to write to a microchip before, I've only created programs in the Windows environment within the .net framework.
I also don't know if I can just update a variable saved on the microchip or if I have to rewrite the entire program to the chip, with the updated variables?
|
|
|
|
|
Maybe some off coments will clear some of your lets say dilemas.
I've worked a lot with serial port in C#. And with USB emulated ones.
The .net framework SerialPort pretty much covers or better said gives all the basic you need.
I also worked with USB emulated ports. There is no difference in the way you treat it/them. You don't have to tell it that the port is emulated.
All you have to concern is using the right port name(COM1,2...), the right BaudRate, HandShake and so on.
As for updating the variables in the device that sounds more like a firmware update or some special software that can connect to the device and change all sort of parameters
such as Alladin or VisualExpress(not visual studio express. that's a different beast).
You could do it too, but you would need the detailed specs of the device and some sort of API provided by the company that produced the device/microchip.
For sending and or receving the datas the .net SerialPort will do. Sure you need to implement the dataSend, received events in a way that fits your needs.
I'm zero/nada/null at Delphi too. I can't even look at the code. My eyes hurt and my mind explodes.
All the best,
Dan
|
|
|
|
|
Hi Dan,
Thanks for the response, sorry for my slow response as I have been in bed sick for the past 4 days.
So to try and wrap my brain around how this works, it sounds as if it would be easiest if I were to substitute values and then rewrite the entire thing to the chip? All of the firmware is written by me in the chips native language. To give you an example, let's say that I wanted to change a divisor of 1 to a 3 in the code, I should save that and wipe/rewrite the entire code block to the chip? Rather than having it somehow update a single value (few bits of data)? Am I understanding that correctly?
I was able to get this to read some data
http://csharp.simpleserial.com/[^]
but I am most interested in writing data, I have a tool that can read data well.
I believe the chip has to be power cycled in order for the transmit/receive pins to start looking for the handshake to write data, within milliseconds of it booting up.
Does this sound about right based on your experience? Do you have any ideas on how I could set up a test scenario with writing to the chip?
|
|
|
|
|
I see. Well what you did a PLC engineer did. I was an IT guy until I reorientated towards programming.
I only send and recevied data through scaners/chips. I didn't care about the inner works of the chips.
The scanners that was simple, no innerworking, just decoding.
So I send files in byte[] format, or numbers still in byte format that were a code so that the chip could set up the
machine, and then I listen to the com for recived data and when received, I send a bit telling the chip to restart the cycle.
I'm really not qualified for the inner workings of a chip/PLC.
Wish I could do more to help you.
Use the write method to write to the chip.
There's also a DataSent event in order to know that the data was sent to the plc or to debug.
Again, sorry but I can't help you more.
All the best,
Dan
|
|
|
|
|
I have a kinda hugh client Form Application running and maintaining. It consist of two sub-systems, 1 for marketing and 1 for management.
It started as a Management applicaiton, created in VS08, so all classes etc. thats created for the Management sub-system (that was the first), was inside the Project root.... Later when I added Marketing Subsystem, I created a directory in the Project root, named 'Marketing' and afterwards I created every single Class and stuff related to Marketing in that folder.
But making folder for sub-systems also means that I have to call Class' and objects from each folder, with the foldername in front.
Eg.:
Marketing.Customer newCustomer = new Marketing.Customer();
instead of:
Customer newCustomer = new Customer();
But is it right or wrong to make those folders for each subsystem, to keep an easy overview of your application? Or should I forget everything about folders in the solution?
|
|
|
|
|
You could just add Using <default namespace="">.Marketing to your using statements.
Once you've done that you can just do Customer newCustomer = new Customer();
This way you can have seperate namespaces for Marketing and Management and thus have something of a filter when coding. *Don't punch me for saying 'filter' *
Or
You can just open the class file and remove the 'Marketing' bit next to the default namespace.
Try creating a class in the root of the project and then dragging it into the marketing folder, it won't have the Marketing bit.
Also:
Folders mean organizing and structuring you app, it's almost never a bad idea.
|
|
|
|
|
Who is this Hugh of whom you speak?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
You beat me to it...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
It's probably a little late in the day for you, but this is precisely the type of task that things such as IoC and DI were made for. BTW -when you refer to Marketing.Customer, that's the namespace and classname; Marketing may be your folder, but .NET has no concept of the physical file structure of your project, and uses the namespace instead.
|
|
|
|
|
IoC? I havn't practically used that pattern yet, but ain't that some kind of Facade/Controller pattern?
But after what I see in replys, I guess that making folder in the solutions for keeping subsystems controlled, is a good idea, and may be the correct use depending on size of application?
And add the using .Marketing or .Management in the classes, sounds like a nice trick instead of editing 10000 lines of code.
|
|
|
|
|
Hi,
I have a Windows application, within this application I'm wanting to copy particular emails from the Inbox to another user created folder. This is an Exchange email account.
I was adviced that I could use the ExchangeServiceBinding.CopyItem method. I have a few questions regarding this:
1. Is this method available to use in both Windows and Web applications?
2. If it's available to use in Windows applications, how would I go about adding the references for ExchangeServiceBinding to my application? I couldn't find the EWS (ExchangeWebServices) or services wsdl.
Thank you,
Mel
|
|
|
|
|
MWRivera wrote: 1. Is this method available to use in both Windows and Web applications?
Yes. It's a web service that you interact with (actually, a set of services).
MWRivera wrote: 2. If it's available to use in Windows applications, how would I go about adding
the references for ExchangeServiceBinding to my application? I couldn't find the
EWS (ExchangeWebServices) or services wsdl
You need to know which version of Exchange you are targetting. There are, IIRC, three versions that it supports, so you will have to pick an appropriate one. If you are using EWS 2010, have a read of this[^].
|
|
|
|
|
Hi Pete,
Thank you for your quick reply.
We are using MS Exchange 2007. Do you have any information on how I could access the EWS for this in my c# code?
Thank you,
Mel
|
|
|
|
|
First of all, you need to create the proxy reference. This[^] article shows you how to do this with Exchange.
In general, the steps in this[^] article should help you.
|
|
|
|
|
Thank you for the additional information.
I read the first link yesterday on how to add a Web reference. I was unable to gain access to the CAS, I'm assuming I have the FQDN incorrect. Our Exchange accounts are hosted by a third party. Is there anyway to find out the CAS from the account settings in Outlook or anywhere else? If not do you think this is information that a third party host would be willing to share with a client?
Thank you,
Mel
|
|
|
|
|
The host should be willing (and able) to provide you with this information.
|
|
|
|
|
Ok, thank you. I've enquired about it so hopefully they will get back to me soon.
Thanks again Pete. I'll keep you updated.
Thanks,
Mel
|
|
|
|
|
Hi,
I deployed some templates which were working fine till the point where I created a new dll in my project.
As soon as I compiled my solution, I got the error below nothing more than that.
Error 1 The type or namespace 'VisualStudio' doesn't exist in the namespace 'Microsoft' ( an assembly is missing ?)
I moved back till the point where it was working but nothing changed. 2 messages looking as above keep pointing on each of my template.
If someone already met this error or if someone has any idea,
By the way I try to fix it by adding some assembled beginning with
Microsoft.VisualStudio.something but nothing does.
Hoping to have a feedback from you guys,
Thx
|
|
|
|
|
Check the references in your project, and also check the source module that produces the error message for references as above. Without seeing some of your code where the error occurs it is difficult to be more specific.
I must get a clever new signature for 2011.
|
|
|
|