Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am very new to C# programming. I am creating GUI in windows from application.I want to estimate the incoming quantity based on three properties. I am able to get those properties. User can use any one of the property or all three properties to estimate the incoming quantity. The three properties are
1) Temperature
2) Pressure
3) Density
So i have created check box's for each property. when i tick the check box then i am going to use that property to estimate incoming property.
I have the conditions like this
1) Temperature is "30" to "60" and pressure is "100 to 300" and density "0 to 0.4" then it is "gas".
2) Temperature is "60" to "90" and pressure is "300 to 600" and density "0.4 to 1.4" then it is "liquid".
3) Temperature is "90" to "120" and pressure is "600 to 900" and density "1.4 to 3" then it is "water".

But the thing is user can use any one of the property or all above three properties to estimate. for example if user use only temperature then i need to use that property and based on that i have to estimate. if user wants to use all "temp, press, density" then i need to use all properties and if all is true then display the incoming quantity.

I have tried to upload my windows form images but i am not able to upload on this site. i don't know how to upload. so help me how to implement this concept.
Posted

1 solution

Instead of using check box you can use scroll bars.
You can set the Maximum and Minimum values for that.

So the TempratureScrollBar can be set like Minimum 30 and Maximum 120. similarly
the pressureScrollBar can be 100 and 900 in your case
But these Minimum and Maximum can be only integers - so for density you can set these limits by multiplying 100 to actual value and while reading the value you can divide that by 100 again.

These scrollbars will always be set to some value so you will not encounter a situation where any of these values are not available.

If this doesn't help you then probably you have to understand the requirement first and introduce more conditions accordingly.

Here on MSDN you can see ScrollBar controls for windows
 
Share this answer
 

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