|
That's pretty much what I thought. Thanks for the article link; I'll take a look in detail.
Software Zen: delete this;
|
|
|
|
|
Another article that may or may not add to Petes' Validation in Windows Presentation Foundation[^]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks, Henry. That article was very helpful as well.
Software Zen: delete this;
|
|
|
|
|
HOW CAN I POPULATE DATA FROM DATASET FROM LIST COLLECTION ???
I have List like
KeyValuePair<int, List<Point2D>> arcCollection
here total item in arcCollection is 30.
i.e arcCollection.count =30
And each List<Point2D>> i have stored 3 points(x1,y1 x2y2 x3y3)
Each there any way out to populate data in dataset of List<Point2D>> for each arcCollection.count
wthe regards
tarak
|
|
|
|
|
As this is so obviously related to the question below, why did you not post this as a follow up on that thread? Also, can you please stop using capitals in your subject line? It's a sure fire way to get me to ignore you.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
HOW CAN I WRITE XML FROM LIST COLLECTION ???
I have List like
KeyValuePair<int, List<Point2D>> arcCollection
here total item in arcCollection is 30.
i.e arcCollection.count =30
And each List<Point2D>> i have stored 3 points(x1,y1 x2y2 x3y3)
Each there any way out that to write XML of value of List<Point2D>> for each arcCollection.count
wthe regards
tarak
|
|
|
|
|
Look into XDocument and LINQ. You could also add the items using a loop. If all else fails, then this piece of C# code should give you the general idea:
using System.Xml.Linq;
XDocument xDoc = new XDocument(new XElement("root",
new XElement("key", arcCollection.Key),
new XElement("values",
from Point pt in arcCollection.Value
select new XElement("point",
new XElement("x", pt.X),
new XElement("y", pt.Y)
)
)
));
That piece of code iterates through every Point structure in arcCollection.Value, and creates a nice neat XML structure. I didn't have the Point2D structure definition with me, so I used the Point structure instead, but this is still fairly neat. If you need to add properties, then look at the lines which reference pt.X and pt.Y . They form a list, and you simply have to add the properties as XElements like I did. Don't forget to change the definition of pt to a Point2D structure though, otherwise the code probably won't even compile
|
|
|
|
|
XmlSerializer.
Although you might need to modify your object hierachy.
You can read/write the serialized object output to streams and files.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Hello every one,
I am developing an server side application which can communicate with its client.
When server wants to communicate with its client, server will send sms to client to get ip address. After establishing connection between server and client,client will send some log file to server.Server will receive that file and store it into the database.
My problem is, how can i achieve this, means on server side there will be a .net application(exe) or there will be web page(asp.net)
Please help me on this.
modified on Friday, May 29, 2009 2:29 AM
|
|
|
|
|
Hi yrishi
You need to change your approach in this scenario
prepare a server desktop application(.exe) which will listen on particular port
prepare a client application which establish connection with server. Once the connection is made then you can transfer the file or other object you want
|
|
|
|
|
really thanks for your reply, actually my confusion is how to access .exe from multiple location as i am having more than one user to access that .exe application
If i go through web application, then user can access it from anywhere.
so which is better choice?
|
|
|
|
|
Use .Net remoting. If your clients are distributed across network within the verges of firewall, you can build a server program on a specified port.
You can build client program which is expecting service from the same port on a server IP.
|
|
|
|
|
Thanks for your reply. I'll check it.
just tell me, can i do socket programming with asp.net? means at server side, there will be my web page and when i am in listening mode client can communicate me through the specific port no. is it possible in asp.net?
|
|
|
|
|
Sorry abt the late reply and you can establish socket connection from asp.net. Google it you will be getting more articles.
|
|
|
|
|
hey thats fine, I'll check it. really thanks for your reply.
actually i have again post my problem briefly. Please reply if get any idea
|
|
|
|
|
Hey folks, I am doing some preliminary research for a fairly large forms/data-driven business application I am due to develop. There are 4 basic requirements for this application:
1. Can install/run app on local PC or as a hosted application (access via Web Browser to our hosted server). This includes the Database.
2. The local version may be a Windows-only application.
3. The hosted version must run cross-browser (IE and Firefox minimum).
4. The local version must have a simple installer (via Web or CD) and can Auto-Update.
I have a modest amount c#, ASP.NET and SQL experience but am overwhelmed by the choice of .NET technologies available and would like some opinions. Ideally I would like just one codebase but the more I look at it, the less feasible that seems. Maintaining 2 apps doesn't sound so much fun.
My first thought was an ASP.NET app that could be packaged with UltiDev Cassini and deployed locally but I'm not sure it's robust/secure enough (thoughts?) Other choices seem to be:
Local
- WinForms
- WPF or XBAP
- ASP with Cassini or Web Deployment tool.
Remote/hosted
- XBAP
- ASP.NET/MVC/Ajax
- Silverlight
I've noted that you can potentially deploy a WPF app natively and as a XBAP using Prism, like to hear thoughts on that.
Then there's the data access strategy, which I'm not sure about either!
|
|
|
|
|
Potentially you could look at using Silverlight and WPF. It's possible to share quite a bit of code between Silverlight and WPF if you know the tricks and gotchas. Take a look at the work we've done on Onyx[^] to get some ideas.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thank you very much Pete, I'm going to take a closer look at Onyx, Prism and Caliburn and figure out how they relate.
Appreciate any other comments and opinions from folks.
|
|
|
|
|
I'm biased towards Onyx - it solves problems that Prism and Caliburn ignore, and I am the person working on the Silverlight code of Onyx.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I'm trying to hook the ReadFile API like FileMon does.
Do you have an example of ReadFile?
Please help me .....
|
|
|
|
|
Please don't cross post. It's bad form.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi all, I'm trying to move my app from tcp to ipc, but i keep getting
Failed to connect to an IPC port: the System cannot find the file specified.
The server is a service running with Local System account.
Client and server work fine with tcp. Those are my configuration files:
Client:
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="IPC" portName="2001" timeout="900000" name="mwchannel">
<clientProviders>
<formatter ref="binary" />
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
<client>
<wellknown type="MW.Remote.RemoteConnection, RemoteConnection" url="IPC://MWPort/MWServer/RemoteConnection.rem" />
</client>
</application>
</system.runtime.remoting>
</configuration>
Server
<configuration>
<system.runtime.remoting>
<application name="MWServer">
<channels>
<channel ref="ipc" portName="MWPort" authorizedGroup="Everyone" timeout="3000">
<serverProviders>
<provider ref="wsdl" />
<formatter ref="soap" typeFilterLevel="Full" />
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
</channels>
<service>
<wellknown mode="Singleton" type="MW.Remote.RemoteConnection, RemoteConnection" objectUri="RemoteConnection.rem" />
</service>
</application>
<customErrors mode="Off">
</customErrors>
</system.runtime.remoting>
</configuration>
What is strang to me is that the same error appears if I shut down the server, so I suppose that the client is not even able to 'see' the server. Does someone spot any error or knows about possible causes?
Thank you!
|
|
|
|
|
Dear Sir,
How to store logout time .if user shutdown the page from standard cross button.
Thank you
|
|
|
|
|
If you are talking WinForms there are Closing and Closed events you can handle.
If this is ASP.NET then I don't think there is anything you can do (you may get an answer on the ASP.NET forum)
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
You're absolutely right Colin. All you could tell is that the form was closed somehow.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|