Beispiel #1
0
        private void TsEditLis_Click(object sender, EventArgs e)
        {
            if (gvLis.SelectedRows.Count > 0)
            {
                DataGridViewRow row     = gvLis.SelectedRows[0];
                LanMachine      machine = row.Tag as LanMachine;
                if (machine == null)
                {
                    return;
                }

                string nickName = FrmInputBox.ShowInputBox("请输入机器昵称");
                if (string.IsNullOrWhiteSpace(nickName))
                {
                    return;
                }
                machine.NickName = nickName.Trim();
                SetCellValue("ColLisName", machine.NickName, row);
                RefreashWeb();
                try
                {
                    SaveLisTo(LastListenFile);
                }
                catch { }
            }
        }
Beispiel #2
0
        private void TsAddToLis_Click(object sender, EventArgs e)
        {
            if (dgMembers.SelectedRows.Count > 0)
            {
                DataGridViewRow row     = dgMembers.SelectedRows[0];
                LanMachine      machine = row.Tag as LanMachine;
                if (machine == null)
                {
                    return;
                }

                string nickName = FrmInputBox.ShowInputBox("请输入机器昵称");
                if (string.IsNullOrWhiteSpace(nickName))
                {
                    return;
                }
                machine.NickName = nickName.Trim();
                DataGridViewRow newrow = GetRow(machine, gvLis);
                RefreashWeb();
                try
                {
                    SaveLisTo(LastListenFile);
                }
                catch { }
            }
        }