📄 kjw.cpp
字号:
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton8()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Soup2 = m_Soup2 + 1;
m_stredit = "";
strtemp = "";
strtemp3 = "";
if (m_Soup1 !=0) {strtemp.Format(" Vegetables : %2.0f %5.2f",m_Soup1,m_Soup1 * 1); strtemp3 += strtemp + "\r\n";}
if (m_Soup2 !=0) {strtemp.Format(" Tomato : %2.0f %5.2f",m_Soup2,m_Soup2 * 1); strtemp3 += strtemp + "\r\n";}
if (m_Soup3 !=0) {strtemp.Format(" Onion : %2.0f %5.2f",m_Soup3,m_Soup3 * 1); strtemp3 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton9()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Soup3 = m_Soup3 + 1;
m_stredit = "";
strtemp = "";
strtemp3 = "";
if (m_Soup1 !=0) {strtemp.Format(" Vegetables : %2.0f %5.2f",m_Soup1,m_Soup1 * 1); strtemp3 += strtemp + "\r\n";}
if (m_Soup2 !=0) {strtemp.Format(" Tomato : %2.0f %5.2f",m_Soup2,m_Soup2 * 1); strtemp3 += strtemp + "\r\n";}
if (m_Soup3 !=0) {strtemp.Format(" Onion : %2.0f %5.2f",m_Soup3,m_Soup3 * 1); strtemp3 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton10()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Wine1 = m_Wine1 + 1;
m_stredit = "";
strtemp = "";
strtemp4 = "";
if (m_Wine1 !=0) {strtemp.Format(" Vins de Pays : %2.0f %5.2f",m_Wine1,m_Wine1 * 100); strtemp4 += strtemp + "\r\n";}
if (m_Wine2 !=0) {strtemp.Format(" Chateau Latour: %2.0f %5.2f",m_Wine2,m_Wine2 * 200); strtemp4 += strtemp + "\r\n";}
if (m_Wine3 !=0) {strtemp.Format(" Eiswein : %2.0f %5.2f",m_Wine3,m_Wine3 * 170); strtemp4 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton11()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Wine2 = m_Wine2 + 1;
m_stredit = "";
strtemp = "";
strtemp4 = "";
if (m_Wine1 !=0) {strtemp.Format(" Vins de Pays : %2.0f %5.2f",m_Wine1,m_Wine1 * 100); strtemp4 += strtemp + "\r\n";}
if (m_Wine2 !=0) {strtemp.Format(" Chateau Latour: %2.0f %5.2f",m_Wine2,m_Wine2 * 200); strtemp4 += strtemp + "\r\n";}
if (m_Wine3 !=0) {strtemp.Format(" Eiswein : %2.0f %5.2f",m_Wine3,m_Wine3 * 170); strtemp4 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton12()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Wine3 = m_Wine3 + 1;
m_stredit = "";
strtemp = "";
strtemp4 = "";
if (m_Wine1 !=0) {strtemp.Format(" Vins de Pays : %2.0f %5.2f",m_Wine1,m_Wine1 * 100); strtemp4 += strtemp + "\r\n";}
if (m_Wine2 !=0) {strtemp.Format(" Chateau Latour: %2.0f %5.2f",m_Wine2,m_Wine2 * 200); strtemp4 += strtemp + "\r\n";}
if (m_Wine3 !=0) {strtemp.Format(" Eiswein : %2.0f %5.2f",m_Wine3,m_Wine3 * 170); strtemp4 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton13()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Tea1 = m_Tea1 + 1;
m_stredit = "";
strtemp = "";
strtemp5 = "";
if (m_Tea1 !=0) {strtemp.Format(" Coffee : %2.0f %5.2f",m_Tea1,m_Tea1 * 2); strtemp5 += strtemp + "\r\n";}
if (m_Tea2 !=0) {strtemp.Format(" Green Tea : %2.0f %5.2f",m_Tea2,m_Tea2 * 2); strtemp5 += strtemp + "\r\n";}
if (m_Tea3 !=0) {strtemp.Format(" Black Tea : %2.0f %5.2f",m_Tea3,m_Tea3 * 2); strtemp5 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton14()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Tea2 = m_Tea2 + 1;
m_stredit = "";
strtemp = "";
strtemp5 = "";
if (m_Tea1 !=0) {strtemp.Format(" Coffee : %2.0f %5.2f",m_Tea1,m_Tea1 * 2); strtemp5 += strtemp + "\r\n";}
if (m_Tea2 !=0) {strtemp.Format(" Green Tea : %2.0f %5.2f",m_Tea2,m_Tea2 * 2); strtemp5 += strtemp + "\r\n";}
if (m_Tea3 !=0) {strtemp.Format(" Black Tea : %2.0f %5.2f",m_Tea3,m_Tea3 * 2); strtemp5 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton15()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Tea3 = m_Tea3 + 1;
m_stredit = "";
strtemp = "";
strtemp5 = "";
if (m_Tea1 !=0) {strtemp.Format(" Coffee : %2.0f %5.2f",m_Tea1,m_Tea1 * 2); strtemp5 += strtemp + "\r\n";}
if (m_Tea2 !=0) {strtemp.Format(" Green Tea : %2.0f %5.2f",m_Tea2,m_Tea2 * 2); strtemp5 += strtemp + "\r\n";}
if (m_Tea3 !=0) {strtemp.Format(" Black Tea : %2.0f %5.2f",m_Tea3,m_Tea3 * 2); strtemp5 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton16()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Drink1 = m_Drink1 + 1;
m_stredit = "";
strtemp = "";
strtemp6 = "";
if (m_Drink1 !=0) {strtemp.Format(" Cola : %2.0f %5.2f",m_Drink1,m_Drink1 * 2); strtemp6 += strtemp + "\r\n";}
if (m_Drink2 !=0) {strtemp.Format(" Orange Juice : %2.0f %5.2f",m_Drink2,m_Drink2 * 3); strtemp6 += strtemp + "\r\n";}
if (m_Drink3 !=0) {strtemp.Format(" Grape Juice : %2.0f %5.2f",m_Drink3,m_Drink3 * 3); strtemp6 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton17()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Drink2 = m_Drink2 + 1;
m_stredit = "";
strtemp = "";
strtemp6 = "";
if (m_Drink1 !=0) {strtemp.Format(" Cola : %2.0f %5.2f",m_Drink1,m_Drink1 * 2); strtemp6 += strtemp + "\r\n";}
if (m_Drink2 !=0) {strtemp.Format(" Orange Juice : %2.0f %5.2f",m_Drink2,m_Drink2 * 3); strtemp6 += strtemp + "\r\n";}
if (m_Drink3 !=0) {strtemp.Format(" Grape Juice : %2.0f %5.2f",m_Drink3,m_Drink3 * 3); strtemp6 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton18()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Drink3 = m_Drink3 + 1;
m_stredit = "";
strtemp = "";
strtemp6 = "";
if (m_Drink1 !=0) {strtemp.Format(" Cola : %2.0f %5.2f",m_Drink1,m_Drink1 * 2); strtemp6 += strtemp + "\r\n";}
if (m_Drink2 !=0) {strtemp.Format(" Orange Juice : %2.0f %5.2f",m_Drink2,m_Drink2 * 3); strtemp6 += strtemp + "\r\n";}
if (m_Drink3 !=0) {strtemp.Format(" Grape Juice : %2.0f %5.2f",m_Drink3,m_Drink3 * 3); strtemp6 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
m_stredit2 = strtemp8;
UpdateData(FALSE);
}
void CKJW::OnButton19()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Dessert1 = m_Dessert1 + 1;
m_stredit = "";
strtemp = "";
strtemp7 = "";
if (m_Dessert1 !=0){strtemp.Format(" Ice cream : %2.0f %5.2f",m_Dessert1,m_Dessert1 * 2); strtemp7 += strtemp + "\r\n";}
if (m_Dessert2 !=0){strtemp.Format(" Pudding : %2.0f %5.2f",m_Dessert2,m_Dessert2 * 2); strtemp7 += strtemp + "\r\n";}
if (m_Dessert3 !=0){strtemp.Format(" Fruit : %2.0f %5.2f",m_Dessert3,m_Dessert3 * 2); strtemp7 += strtemp + "\r\n";}
m_stredit += strtemp1;
m_stredit += strtemp2;
m_stredit += strtemp3;
m_stredit += strtemp4;
m_stredit += strtemp5;
m_stredit += strtemp6;
m_stredit += strtemp7;
m_Total = m_Meat1 * 15 + m_Meat2 * 7 + m_Meat3 * 11 +
m_Fish1 * 14 + m_Fish2 * 20 + m_Fish3 * 5 +
m_Soup1 * 1 + m_Soup2 * 1 + m_Soup3 * 1 +
m_Wine1 * 100 + m_Wine2 * 200 + m_Wine3 * 170 +
m_Tea1 * 2 + m_Tea2 * 2 + m_Tea3 * 2 +
m_Drink1 * 2 + m_Drink2 * 3 + m_Drink3 * 3 +
m_Dessert1 * 2 + m_Dessert2 * 2 + m_Dessert3 * 2;
strtemp8.Format("%6.2f",m_Total);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -