1
void ClearAllRichtextboxes()
{
richTextBox3.Clear();
richTextBox5.Clear();
richTextBox6.Clear();
richTextBox9.Clear();
richTextBox10.Clear();
}
ClearAllRichtextboxes();
if (comboBox5.Text == "Primer")
{
richTextBox5.Text = "This is the number of primer tins" + primer.ToString();
richTextBox6.Text = "This is the cost of the primer tins" + primercost.ToString();
}
if (comboBox3.Text == "Matt")
{
richTextBox10.Text = "This is how many 2.5 tins of paint are needed: " + val44.ToString();
richTextBox9.Text = "This is the matt cost" + valmatt.ToString();
}
if (comboBox3.Text == "Vinyl ")
{
richTextBox10.Text = "This is how many 2.5 tins of paint are needed" + val44.ToString();
richTextBox9.Text = "This is the of vinyl cost" + valmatt.ToString();
}
if (comboBox3.Text =="Silk")
{
richTextBox10.Text = "This is how many 2.5 tins of paint are needed" + silkval.ToString();
richTextBox9.Text = "This is the cost: " + valcostsilk.ToString();
}
您好,我需要輸出的valcostsilk.ToStrin
,silkval.ToStrin
,valmatt.ToString
,val44.ToString
,val44.ToString
的變量。幾乎所有的人都只是一個富文本框。由於我是c#的新手,所以我不知道。我詢問了上一個主題,但似乎無法得到我需要的答案。有人提到Enviorment.Newline
,但我似乎無法編程正確。輸出多個變量在C#
任何幫助表示讚賞。
有一個RTB mehod'AppendText'和是添加一個Environment.NewLine爲好。 – TaW
你能舉個例子讓我開始嗎?我現在想做,但似乎並不想爲我做。 –
'commonRTB.AppendText(「This is the number of primer tins」+ primer.ToString()+ Environment.NewLine);' – TaW