Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 WinForm
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 3-Mar-13 23:55pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 250
1 George Jonsson 175
2 Jochen Arndt 150
3 Kornfeld Eliyahu Peter 149
4 PIEBALDconsult 110
0 OriginalGriff 6,080
1 DamithSL 4,648
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,624
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 4 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100