Dear All,

Is C# able to do a project similar to a planner or maybe a simulator?
Example:
1) User load floor plan
2) User
3) User drag and drop or select the devices and add to the floor plan
4) Program calculate total cost
5) if possible program analyse the blind spot on the floor plan

Anyone think is it possible to do it?
Is it possible to give a guide on how to do it?

Thank you so much.

Recommended Answers

All 7 Replies

You can pretty much do anything in C# you can with the other languages.

You will need to decide whether the GDI is fast enough for your needs. If not then you'll need to pick a drawing API. Either Managed DirectX or Tao.OpenGL (Managed DirectX will perform better and I'm not sure that Tao is even updated anymore...)

Then you just have to implement the logic =)

Hmmm.. Sorry.. Im kinda of new.. So not sure what is GDI? How to use those you mention above?

GDI is basically how all your windows forms are drawn by standard. GDI is a software only implementation and can be quite slow when drawing anything complex.

DirectX and OpenGL are API's that allow much better control, 3Dimensional Drawing and where available, will use hardware to render giving a large performance boost.

You can find out how to use them by searching Google for tutorials on them.

You can probably go ahead with GDI for what you need. Use PictureBox icon's and enable the drag and drop events on your target containers.

GDI (G raphics D evice I nterface) or any other STROUMPF interface for that matter, whether it is slower or faster, is not at hand here!
I suggest to the OP to show some code of what he has already done.

He won't have any source code, he asked if it were possible. So I gave him options of how to do it.

So yes, it is actually at hand, if the OP wishes to make an informed decision about how to go about creating his project.

Ease of use, ease of programmability, performance, is 3d rendering required etc...

You are right Ketsuekiame. But the OP is planning on making a planner, so IMHO blastigly fast UI like in a game is not of the utmost importance here.

Well it depends how he wants to present his planner. Will it be a 3D rendered room? Will it just be a click and drag a list of components? Do you need spatial awareness?

GDI can't do 3D, so if he needed a rendered room, he wouldn't be able to use GDI.

However, if it's a top down view of a floor then you can use GDI as that would be 2D, but it will still require a lot of work and usually, in that case where custom drawing is required (not the use of pre-built controls) DirectX/OpenGL may still be quicker to program as it allows drawing of primitives in a completely custom manner.

Honestly though, I don't know how you would handle that in GDI as I've never used it for anything complex other than drawing windows forms controls.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.