Click here to Skip to main content
15,867,750 members
Home / Discussions / C#
   

C#

 
GeneralRe: C # + Regex help (for a newbie) Pin
OriginalGriff27-Dec-17 6:40
mveOriginalGriff27-Dec-17 6:40 
GeneralRe: C # + Regex help (for a newbie) Pin
Nathan Minier27-Dec-17 6:56
professionalNathan Minier27-Dec-17 6:56 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 6:24
Damian Bz27-Dec-17 6:24 
GeneralRe: C # + Regex help (for a newbie) Pin
OriginalGriff27-Dec-17 6:28
mveOriginalGriff27-Dec-17 6:28 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 6:18
Damian Bz27-Dec-17 6:18 
GeneralRe: C # + Regex help (for a newbie) Pin
OriginalGriff27-Dec-17 6:26
mveOriginalGriff27-Dec-17 6:26 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 6:29
Damian Bz27-Dec-17 6:29 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 7:37
Damian Bz27-Dec-17 7:37 
OK .. got a bit of a problem now Frown | :(

As the tryparse method can't be on the text_changed event (it throws the error message as soon as I type in 0 for 0.6 - it also throws the same message when you backspace to delete an incorrect entry - so not helpful.

So I've switched it to the Leave event ... the issue with this is that now I can't tab to another textbox without the error message popping up, BUT more importantly I can no longer close the application using the Exit button ! it throws up the error message of the first textbox !
This was the first issue I had when I started writing this app, and I resolved it by having the validation on the text_changed event and the processing part on the leave event.

So how to I get round this issue now ?

Also I am a bit stumped on how I now do calculations on the values in the text boxes, I have 2 text boxes that are basically maximum and minimum quantities, and previously when both of these were filled, a third text box would display the difference i.e.
C#
nicshotsize.Text = (Convert.ToInt32(totalsize.Text) - Convert.ToInt32(shortfillsize.Text)).ToString();

But now that i'm using the double.TryParse(textbox.text ... method, how do I reference those values.
In PowerShell world it would be textbox.Value , but this does not seem to exist ! ??
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 9:15
Damian Bz27-Dec-17 9:15 
GeneralRe: C # + Regex help (for a newbie) Pin
Richard MacCutchan27-Dec-17 21:56
mveRichard MacCutchan27-Dec-17 21:56 
GeneralRe: C # + Regex help (for a newbie) Pin
OriginalGriff28-Dec-17 1:51
mveOriginalGriff28-Dec-17 1:51 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz28-Dec-17 6:59
Damian Bz28-Dec-17 6:59 
AnswerRe: C # + Regex help (for a newbie) Pin
Gerry Schmitz28-Dec-17 8:17
mveGerry Schmitz28-Dec-17 8:17 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz28-Dec-17 23:21
Damian Bz28-Dec-17 23:21 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz29-Dec-17 1:48
Damian Bz29-Dec-17 1:48 
GeneralRe: C # + Regex help (for a newbie) Pin
Gerry Schmitz29-Dec-17 6:03
mveGerry Schmitz29-Dec-17 6:03 
QuestionSet datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 22:17
Hervend26-Dec-17 22:17 
AnswerRe: Set datagrid cell value individually and dynamically Pin
Richard MacCutchan26-Dec-17 22:37
mveRichard MacCutchan26-Dec-17 22:37 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 22:52
Hervend26-Dec-17 22:52 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Pete O'Hanlon26-Dec-17 22:56
subeditorPete O'Hanlon26-Dec-17 22:56 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 23:37
Hervend26-Dec-17 23:37 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Richard MacCutchan26-Dec-17 23:29
mveRichard MacCutchan26-Dec-17 23:29 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 23:35
Hervend26-Dec-17 23:35 
QuestionParentheses vs curly brackets Pin
User9874326-Dec-17 12:17
professionalUser9874326-Dec-17 12:17 
AnswerRe: Parentheses vs curly brackets Pin
Gerry Schmitz26-Dec-17 12:36
mveGerry Schmitz26-Dec-17 12:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.