Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading from a currency counter
Message
De
05/12/2015 12:37:19
 
 
À
05/12/2015 11:45:25
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01628506
Message ID:
01628528
Vues:
27
>>>>OTOH maybe just setting the TextBox.Multiline = true ?
>>>
>>>Bingo!
>>>That was the answer, Viv.
>>>I tried that and it gave me what I needed.
>>>It's interesting that when Multiline is set to false, the carriage returns disappear, but they're preserved when it's set to true. I'm sure that there's some logic there, but it escapes me.
>>>That gave me me what I needed to separate the amounts.
>>>Thanks, Viv
>>
>>Glad it was so easy :-}
>
>
>Here's another question, Viv
>
>
>string[] moneylines = Regex.Split(frmCounting.textBoxDemoninations.Text, "\r\n");
>workingprocessds.depdetail[0].ones = Convert.ToDecimal(moneylines[0].TrimEnd().TrimStart());
>workingprocessds.depdetail[0].twos = Convert.ToDecimal(moneylines[1].TrimEnd().TrimStart());
>workingprocessds.depdetail[0].fives = Convert.ToDecimal(moneylines[2].TrimEnd().TrimStart());
>workingprocessds.depdetail[0].tens = Convert.ToDecimal(moneylines[3].TrimEnd().TrimStart());
>workingprocessds.depdetail[0].twentys = Convert.ToDecimal(moneylines[4].TrimEnd().TrimStart());
>workingprocessds.depdetail[0].fiftys = Convert.ToDecimal(moneylines[5].TrimEnd().TrimStart());
>workingprocessds.depdetail[0].hundreds = Convert.ToDecimal(moneylines[6].TrimEnd().TrimStart());
>workingprocessds.depdetail.AcceptChanges();
>
>This code successfully parses the text into the 7 correct denominations.
>
>For testing, I activate this code by pressing a command button.
>Is there any way that I can force this code to be activated automatically after the multiline textbox is filled?

What type of TextBox - Winforms, Web, WPF ?
How does it get populated ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform