Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am working on a WPF application. I need a functionality that helps multiple people to work on the same screen(Grid Screen) without overriding each other's changes.

What I have tried:

Please help me on this. I am not getting how to achieve this
Posted
Updated 26-Oct-20 10:04am
v5

1 solution

You need to learn about network communication. While you can have computers communicate directly if they are on the same network, you will run into firewall issues quite easily. I recommend you make a HTTPS based API on a server - let the clients log in to this (just the log-in can be a complex issue). The API can be in the cloud (AWS/Azure) or running on a computer every client can reach.

Consider using something like SignalR to broadcast the changes to have all clients updating.

Consider how you will deal with two users starting editing the same field at the same time.
One approach is to let one of the users "win" based on more or less arbitrary rules like username alphabetically - the important thing is both computers agree who won. As long as the connection and program is fast and reliable the users won't notice your algorithm isn't "fair".

Another approach is to let the server keep track on who can edit (and start each edit with asking for the "edit lock"). Again, simple question complicated to implement in some cases (what if the server crashes... does it have a database it stores this in... what if a client crash right after getting the edit lock?)

Overall, this is not a simple task for a beginner... but it is a project you can learn a lot from.
 
Share this answer
 
Comments
BillWoodruff 26-Oct-20 17:05pm    
+5 I'd call it a difficult project for an expert programmer :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900