private void Btn_Add_Click(object sender, EventArgs e) { string txt = Txt_NewDevice_Num.Text; if (!string.IsNullOrEmpty(txt)) { setting.AddDevice(txt); Device_List.Items.Add(txt); } }