private void InsertRowCommand(object obj) { var item = obj as ProcessEntry; if (item == null) { return; } var index = KillList.IndexOf(item); var process = new ProcessEntry(); if (index == -1) { KillList.Insert(++index, process); } }
private void PasteAsNewRowCommand(object obj) { var clipBoard = GetClipboardContent().Trim(); if (clipBoard == null) { return; } var process = new ProcessEntry(clipBoard); var item = obj as ProcessEntry; if (item == null) { KillList.Add(process); return; } var index = KillList.IndexOf(item); if (index != -1) { KillList.Insert(++index, process); } }