Beispiel #1
0
        private void butDel_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtQueueName.Tag == null)
                {
                    MessageBox.Show("请选择需要删除的队列信息。", "提示");
                    return;
                }
                //弹出删除确认窗口
                if (MessageBox.Show("是否删除队列:" + txtQueueName.Text + "?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.No)
                {
                    return;
                }

                _qm.DelQueueInfo(txtQueueName.Tag.ToString());

                //int rowIndex = 0;
                if (listView1.SelectedItems.Count > 0)
                {
                    //rowIndex = listView1.SelectedItems[0].Index;
                    listView1.Items.Remove(listView1.SelectedItems[0]);
                }

                ButtonHint.Start(sender as Button, "OK");
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }