private void RefreshShellStatusInListView(ListViewItem item, string status) { //等待异步 if (this.InvokeRequired) { RefreshShellStatusInvoke invoke = new RefreshShellStatusInvoke(RefreshShellStatusInListView); this.Invoke(invoke, new object[] { item, status }); } else { item.SubItems[4].Text = status; Shell shell = (Shell)item.Tag; shell.Status = status; _shellManagerService.Update(int.Parse(shell.Id), shell); } }
private void RefreshShellStatusInListView(ListViewItem item, string status) { //等待异步 if (this.InvokeRequired) { RefreshShellStatusInvoke invoke = new RefreshShellStatusInvoke(RefreshShellStatusInListView); this.Invoke(invoke, new object[] { item, status }); } else { item.SubItems[4].Text = status; ShellStruct shellStruct = (ShellStruct)item.Tag; shellStruct.Status = status; _shellManager.Update(int.Parse(shellStruct.Id), shellStruct); } }