Points of Interest

Setting all controls on the forms' 'value changed' (or equivalent) to the same 'calc()' function made for little code.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

Comments and Discussions

i was just thinking... how does my code look? does it look as if it were written by a 3 year old? their isn't much code to be seen, but what about my other project, 'Subliminal Messaging', i was in about the same mindset for that one. specifically, as i was looking at diesel_travis's addition and i noticed that i use really stupid variable names. anyone else have that thought, or do i just need to find something else to think about while i'm in class? (yes, i'm in class at the time of this writing)

// Physical Reactions// http://www.nvo.com/beaulier/theeffectsofalcohol/// http://www.ou.edu/oupd/bac.htmif (temp >= 4){ // YOU ARE DEAD. lblDrunk.Text = "Death X-(";}else if (temp >= 0.40){ // Onset of coma, and possible death due to respiratory arrest. lblDrunk.Text = "Coma |-{";}else if (temp >= 0.35){ // Coma is possible. This is the level of surgical anesthesia. // You fall unconsciousness and begin to have breathing difficulties. You are at serious of suffering brain damage or dying. lblDrunk.Text = "Possible Coma |-(";}else if (temp >= 0.30){ // STUPOR. You have little comprehension of where you are. You may pass out suddenly and be difficult to awaken. // You are at dangerous levels of intoxication. You are in a black out and are not in control of your behaviors. lblDrunk.Text = "Stupor ;-/";}else if (temp >= 0.25){ // All mental, physical and sensory functions are severely impaired. Increased risk of asphyxiation from choking on vomit and of seriously injuring yourself by falls or other accidents. lblDrunk.Text = "Severely Drunk ;-O";}else if (temp >= 0.20){ // Feeling dazed/confused or otherwise disoriented. May need help to stand/walk. If you injure yourself you may not feel the pain. Some people have nausea and vomiting at this level. The gag reflex is impaired and you can choke if you do vomit. Blackouts are likely at this level so you may not remember what has happened. // You are extremely intoxicated and probably cannot spell car let alone drive one. You may experience problems speaking and have a serious loss of balance. lblDrunk.Text = "Confused Drunk ;-?";}else if (temp >= 0.16){ // Dysphoria predominates, nausea may appear. The drinker has the appearance of a "sloppy drunk." lblDrunk.Text = "Sloppy Drunk ;-|";}else if (temp >= 0.15){ // At this stage you are very drunk. Memory loss may occur. You may feel nausea and sleepy. You are unable to perform simple tasks and may slur your words lblDrunk.Text = "Very Drunk :-P";}else if (temp >= 0.13){ // Gross motor impairment and lack of physical control. Blurred vision and major loss of balance. Euphoria is reduced and dysphoria* is beginning to appear. Judgment and perception are severely impaired. (* —Dysphoria: An emotional state of anxiety, depression, or unease.) lblDrunk.Text = "Blurry Drunk :-}";}else if (temp >= 0.10){ // Muscle control and balance is greatly reduced. You may react to outside stimulus emotionally. lblDrunk.Text = "Drunk ";}else if (temp >= 0.08){ // Reaction time is greatly reduced and memory is weakened. lblDrunk.Text = "Legally Drunk ";}else if (temp >= 0.05){ // Inhibitions start to disappear and you "loosen up." lblDrunk.Text = "Nealy Drunk ";}else if (temp >= 0.02){ // Reaction time and ability to perform complex tasks is reduced. lblDrunk.Text = "Almost Drunk ";}else{ // Sober lblDrunk.Text = "Not Drunk :-/";}