Submit Search
Upload
Codes.docx
•
Download as DOCX, PDF
•
0 likes
•
5 views
R
RobeliaJoyVillaruz
Follow
C sharp sample code
Read less
Read more
Technology
Report
Share
Report
Share
1 of 2
Download now
Recommended
Windows Forms For Beginners Part 5
Windows Forms For Beginners Part 5
Bhushan Mulmule
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdf
ShaiAlmog1
Correction s+ rie_vb
Correction s+ rie_vb
Marwane Lamouri
final project for C#
final project for C#
Benjamin Fulker
Quanlycanbo
Quanlycanbo
PHUONGVINH
UI Design From Scratch - Part 5.pdf
UI Design From Scratch - Part 5.pdf
ShaiAlmog1
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx
corbing9ttj
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx
corbing9ttj
Recommended
Windows Forms For Beginners Part 5
Windows Forms For Beginners Part 5
Bhushan Mulmule
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdf
ShaiAlmog1
Correction s+ rie_vb
Correction s+ rie_vb
Marwane Lamouri
final project for C#
final project for C#
Benjamin Fulker
Quanlycanbo
Quanlycanbo
PHUONGVINH
UI Design From Scratch - Part 5.pdf
UI Design From Scratch - Part 5.pdf
ShaiAlmog1
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx
corbing9ttj
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx
corbing9ttj
I can't get my code below to work with Option Strict On due to this part of t...
I can't get my code below to work with Option Strict On due to this part of t...
hwbloom115
Linear Search Program in Visual Basic 2008
Linear Search Program in Visual Basic 2008
atsumagaysay
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
Yusman Kurniadi
VB net lab.pdf
VB net lab.pdf
Prof. Dr. K. Adisesha
Write a program that mimics the operations of several vending machin.pdf
Write a program that mimics the operations of several vending machin.pdf
eyebolloptics
C# labprograms
C# labprograms
Jafar Nesargi
help me Java projectI put problem and my own code in the linkmy .pdf
help me Java projectI put problem and my own code in the linkmy .pdf
arihantmum
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15
Rajes Wari
Programming a guide gui
Programming a guide gui
Mahmoud Hikmet
Ensayo
Ensayo
Aandres Ssaavedra
Basic calculator tutorial
Basic calculator tutorial
Gilkye
Java ProgrammingImplement an auction application with the followin.pdf
Java ProgrammingImplement an auction application with the followin.pdf
atulkapoor33
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
fathimalinks
Hello everyone,Im actually working on a fast food order program..pdf
Hello everyone,Im actually working on a fast food order program..pdf
fedosys
Project: Call Center Management
Project: Call Center Management
pritamkumar
Creating an Uber Clone - Part III.pdf
Creating an Uber Clone - Part III.pdf
ShaiAlmog1
Windows Forms For Beginners Part - 3
Windows Forms For Beginners Part - 3
Bhushan Mulmule
VisualBasicExample
VisualBasicExample
Bo Dake
Burger doll order form
Burger doll order form
Khairi Aiman
Html,Css and Javascript Forms using different tags
Html,Css and Javascript Forms using different tags
JeirahTigas
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
LBM Solutions
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
More Related Content
Similar to Codes.docx
I can't get my code below to work with Option Strict On due to this part of t...
I can't get my code below to work with Option Strict On due to this part of t...
hwbloom115
Linear Search Program in Visual Basic 2008
Linear Search Program in Visual Basic 2008
atsumagaysay
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
Yusman Kurniadi
VB net lab.pdf
VB net lab.pdf
Prof. Dr. K. Adisesha
Write a program that mimics the operations of several vending machin.pdf
Write a program that mimics the operations of several vending machin.pdf
eyebolloptics
C# labprograms
C# labprograms
Jafar Nesargi
help me Java projectI put problem and my own code in the linkmy .pdf
help me Java projectI put problem and my own code in the linkmy .pdf
arihantmum
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15
Rajes Wari
Programming a guide gui
Programming a guide gui
Mahmoud Hikmet
Ensayo
Ensayo
Aandres Ssaavedra
Basic calculator tutorial
Basic calculator tutorial
Gilkye
Java ProgrammingImplement an auction application with the followin.pdf
Java ProgrammingImplement an auction application with the followin.pdf
atulkapoor33
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
fathimalinks
Hello everyone,Im actually working on a fast food order program..pdf
Hello everyone,Im actually working on a fast food order program..pdf
fedosys
Project: Call Center Management
Project: Call Center Management
pritamkumar
Creating an Uber Clone - Part III.pdf
Creating an Uber Clone - Part III.pdf
ShaiAlmog1
Windows Forms For Beginners Part - 3
Windows Forms For Beginners Part - 3
Bhushan Mulmule
VisualBasicExample
VisualBasicExample
Bo Dake
Burger doll order form
Burger doll order form
Khairi Aiman
Html,Css and Javascript Forms using different tags
Html,Css and Javascript Forms using different tags
JeirahTigas
Similar to Codes.docx
(20)
I can't get my code below to work with Option Strict On due to this part of t...
I can't get my code below to work with Option Strict On due to this part of t...
Linear Search Program in Visual Basic 2008
Linear Search Program in Visual Basic 2008
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
VB net lab.pdf
VB net lab.pdf
Write a program that mimics the operations of several vending machin.pdf
Write a program that mimics the operations of several vending machin.pdf
C# labprograms
C# labprograms
help me Java projectI put problem and my own code in the linkmy .pdf
help me Java projectI put problem and my own code in the linkmy .pdf
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15
Programming a guide gui
Programming a guide gui
Ensayo
Ensayo
Basic calculator tutorial
Basic calculator tutorial
Java ProgrammingImplement an auction application with the followin.pdf
Java ProgrammingImplement an auction application with the followin.pdf
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
Hello everyone,Im actually working on a fast food order program..pdf
Hello everyone,Im actually working on a fast food order program..pdf
Project: Call Center Management
Project: Call Center Management
Creating an Uber Clone - Part III.pdf
Creating an Uber Clone - Part III.pdf
Windows Forms For Beginners Part - 3
Windows Forms For Beginners Part - 3
VisualBasicExample
VisualBasicExample
Burger doll order form
Burger doll order form
Html,Css and Javascript Forms using different tags
Html,Css and Javascript Forms using different tags
Recently uploaded
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
LBM Solutions
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Deakin University
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
BookNet Canada
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
shyamraj55
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
Neo4j
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Recently uploaded
(20)
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Codes.docx
1.
Page 1 Add to
order button private void addToOrderButton_Click(object sender, EventArgs e) { // Add the current item price and quantity to the order. if (noSizeRadioButton.Checked) { MessageBox.Show("You must select a drink and size.", "Missing required entry"); } else { try { int quantityInteger = int.Parse(quantityTextBox.Text); if (quantityInteger > 0) { drinksInteger += quantityInteger; totalOrderDecimal += drinkDecimal * quantityInteger; clearForNextItem(); orderCompleteButton.Enabled = true; } else { MessageBox.Show("Please enter a quantity", "Missing Required Entry"); } } catch (FormatException) { MessageBox.Show("Invalid Quantity", "Data Entry Error"); quantityTextBox.Focus(); quantityTextBox.SelectAll(); } } } Order Complete private void orderCompletebutton_Click(object sender, EventArgs e) { // Order is complete, add to summary and clear order. // Check if the last item was added to the total. if (itemPriceTextBox.Text != "") { DialogResult responseDialogResult; string messageString = "Current item not recorded. Add to order?"; responseDialogResult = MessageBox.Show(messageString, "Verify Last Drink Purchase", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (responseDialogResult == DialogResult.Yes) { addToOrderButton_Click(sender, e); } } Page 2 // Display amount due. string dueString = "Amount Due " + totalOrderDecimal.ToString("C"); MessageBox.Show(dueString, "Order Complete"); // Add to summary totals. ordersInteger++; totalSalesDecimal += totalOrderDecimal; // Reset all for new order. summaryButton.Enabled = true; summaryToolStripMenuItem.Enabled = true; orderCompleteButton.Enabled = false; orderCompleteToolStripMenuItem.Enabled = false; totalOrderDecimal = 0m; } Summary Button private void summaryButton_Click(object sender, EventArgs e) { // Display the summary information in a message box. string summaryString = "Drinks Sold: " + drinksInteger.ToString() + "nn" + "Number of Orders: " + ordersInteger.ToString() + "nn" + "Total Sales: " + totalSalesDecimal.ToString("C"); MessageBox.Show(summaryString, "Juice Bar Sales Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } private void exitButton_Click(object sender, EventArgs e) { // End the application. this.Close(); } Twelve Ounce Radio Button private void twelveOunceRadioButton_CheckedChanged(object sender, EventArgs e) { // Calculate and display the price for the selected item. // Handles all check boxes and radio buttons. // Cast the sender to a RadioButton type. RadioButton selectedSizeRadioButton = (RadioButton)sender; switch (selectedSizeRadioButton.Name)
2.
Page 3 { case "twelveOunceRadioButton": itemSizeDecimal
= 3m; break; case "sixteenOunceRadioButton": itemSizeDecimal = 3.5m; break; case "twentyOunceRadioButton": itemSizeDecimal = 4m; break; } drinkDecimal = itemSizeDecimal + findExtrasPrice(); itemPriceTextBox.Text = drinkDecimal.ToString("C"); } private void clearForNextItem() { // Clear radio buttons, check boxes, text boxes. noSizeRadioButton.Checked = true; fruitJuiceRadioButton.Checked = true; vitaminPackCheckBox.Checked = false; energyBoosterCheckBox.Checked = false; ladiesCheckBox.Checked = false; itemPriceTextBox.Clear(); quantityTextBox.Text = "1"; } private decimal findExtrasPrice() { // Find price for additives. decimal extrasDecimal = 0m; if (vitaminPackCheckBox.Checked) extrasDecimal += .5m; if (energyBoosterCheckBox.Checked) extrasDecimal += .5m; if (ladiesCheckBox.Checked) extrasDecimal += .5m; return extrasDecimal; } private void vitaminPackCheckBox_CheckedChanged(object sender, EventArgs e) Page 4 { // Check price of additives and display current price. // Handles all three check boxes. drinkDecimal = itemSizeDecimal + findExtrasPrice(); itemPriceTextBox.Text = drinkDecimal.ToString("C"); } private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { // Display information in a message box. string aboutString = "Programmed by A. ProgrammernVersion 1.1"; string captionString = "About Look Sharp Fitness Center Juice Bar Orders"; MessageBox.Show(aboutString, captionString); } private void fontToolStripMenuItem_Click(object sender, EventArgs e) { // Change the label’s font. // Initialize the dialog box. fontDialog1.Font = titleLabel.Font; // Display the dialog box. fontDialog1.ShowDialog(); // Assign the new font. titleLabel.Font = fontDialog1.Font; } private void colorToolStripMenuItem_Click(object sender, EventArgs e) { // Change the form’s ForeColor. // Applies to all controls on the form that haven’t had their // ForeColor explicitly modified. // Initialize the dialog box. colorDialog1.Color = this.ForeColor; // Display the dialog box. colorDialog1.ShowDialog(); // Assign the new color. this.ForeColor = colorDialog1.Color; } } }
Download now