Untitled

mail@pastecode.io avatar
unknown
csharp
4 years ago
822 B
10
Indexable
Never
private void btn_Temizle_Click(object sender, EventArgs e)
        {
            foreach (var item in this.Controls)
            {
                if (item is RadioButton)
                {
                    ((RadioButton)item).Checked = false;
                }
                else if (item is TextBox)
                {
                    ((TextBox)item).Text = string.Empty;
                }
                else if (item is ComboBox)
                {
                    ((ComboBox)item).Text = "";
                }
                else if (item is ListView)
                 {
                    lsv_Musteriler.Items.Clear();
                }
                else if (item is RichTextBox)
                {
                    ((RichTextBox)item).Text = string.Empty;
                }