|
Nope, sorry, I didn't bother with it anymore.
I switched to WCF (using NamedPipes) later on, which is still in use today and works like a charm.
|
|
|
|
|
Hi,
Firstly, I realize I had posted a thread very recently regarding XML serialization, but I can't bump it and this is a different question
I need to serialize a whole data structure, and as it happens I have more than one reference to the same object in different parts of my code, i.e. (trying to think of a simplified example) Imagine a shop that keeps track of each customer's favorite item:
<br />
class Shop<br />
{<br />
Customer customer;<br />
Item[] inventoryList;<br />
<br />
<br />
}<br />
<br />
class Customer<br />
{<br />
Item favoriteItem;<br />
}<br />
When customer is initialised it will have a reference to an item in the inventorylist. As I understand it, the deserializer will generate a new instance of Item for the customer, or I can ignore it, in which case it will be null when I deserialize. Is there a simple solution to get it as a reference to the intended object? I realize that in this case I can just use an index in the array rather than a reference to store the favoriteItem, but this will require major refactoring of my code.
|
|
|
|
|
Hi Friends,
How to Programatically Convert the CSV format to Excel format(.xls) or Simple text format(.txt).
Note: I Have to do this Programatically, Not manully.
Any body have any Idea.
Thanks in advance.
Waiting for your reply.
Thanks & Regards,
Liyakhat.
|
|
|
|
|
CSV to txt is trivial, a csv IS a text file, you'd just be changing what's in it. .xls would require you to interop with Office, obviously.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Christian,
First of thanks for the reply.
Can you tell me how to convert the CSV file to .xls format(How to interop with office)???
Thanks,
Liyakhat.
|
|
|
|
|
Hi.
In a few words, I have to convert a string retrieved from an Access database to a DateTime object.
I thought I'll use the Convert.ToDateTime() method. But there's the risk that the conversion will fail because the format will not be recognized. I think that this method uses the DateTime format taken from Contol Panel - Language Settings, so this would be tricky if the settings are different on another machine.
What would you do in this case?
Thanks.
|
|
|
|
|
I'd use TryParse to safly see if the conversion is possible. It'll also allow you to specify the format of the date:
System.DateTime.TryParse()[^]
|
|
|
|
|
DateTime.TryParse, but if it fails sometimes, then the other times, it's working because the day is < 13, and you're getting wrong dates.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is it possible to retrieve the culture information for the machine running the application, and use that specific culture for the conversion?
|
|
|
|
|
I would store it in a culture neutral date format. Let the formatting of the date be taken care of on the client end where it belongs, and store the date using something like YYYY-MM-DD HH:MM:SS
|
|
|
|
|
Yes, but it shouldn't be stored as a string either.
|
|
|
|
|
For sure. But in this case it has to be this way.
|
|
|
|
|
anyone can plz tell me how to send SMS to a mobile phone from a .Net application.I am designing a deviceapplication.from the device i have to send sms to predefined mobile numbers
|
|
|
|
|
1. Open prefered browser.
2. Navigate to google (or prefered search engine).
3. search for c# sms.
4. come back when you have a problem other than laziness :P
C# sms[^]
|
|
|
|
|
There are several articles on codeproject showing how to do it. Why don't you use search?
|
|
|
|
|
Hi!
I recently completed a project which sends/receives SMS to mobile phone and i used an open source API called GsmComm http://www.scampers.org/steve/sms/. Try it, its very useful. But if you don't wanna use API then i guess you will have to do a lot of hard work.
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Thanks for an interesting link
|
|
|
|
|
Wellcome
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
please i need help withy the code to implemnet cut,copy,pase and print funtions
|
|
|
|
|
1 - try a meaningful subject line next time
2 - what do you want to cut/copy/paste/print ?
You've not come close to giving us enough information to expect an answer, try reading the guide on how to ask meaningful questions.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'll make a deal with you -- you implement undo/redo in my program and I'll implement cut/copy/paste in yours.
|
|
|
|
|
Ooh Undo/Redo is pretty simple, just implement a Command design pattern with 2 methods on your Command interface
interface ICommand
void Undo()
void Redo()
Every action you want to perform then becomes a discreet Concrete Command object which implements whatever it wants as its undo/redo behaviour.
Whenever an action gets performed add it to a stack (undoStack). When undo is clicked pop the item off that stack, execute "Undo" and add it to another stack (redoStack). Whenever redo is clicked pop an item of the redoStack, execute "Redo" and add it to the undoStack.
Easy peasy.
|
|
|
|
|
J4amieC wrote: implements whatever it wants as its undo/redo behaviour.
Now that's the tricky part, isn't it -- the state that needs to be stored/maintained is what makes undo/redo a pain for me.
|
|
|
|
|
Just make your classes Serialixable.
|
|
|
|
|
hi,
I have a login form which uses a user control designed for solely login purposes.I have 3 projects in my solution, one is the main MDI application (PETALSApp), one is the control library housing the login user control (PETALSControlLib) and the other is one that has the login form(SecurityServiceProvider).
My idea is to open up a login form first and if the login is correct then close login window and open the MDI form.
Now the problem is, after the successful login, to close the login window i have written this.FindForm().Close() in the user control's code for successful login, but this code not only closes the login window, but it also closes the MDI main form. I have added references as folowing:
PETALSControlLib refers PETALSApp
SecurityServiceProvider refers PETALSApp and PETALSControlLib
Please help if there is a workaround for this
|
|
|
|