Skip to content

Commit

Permalink
增加去重功能,如果现有列表已经存在相同的记录则移除.
Browse files Browse the repository at this point in the history
  • Loading branch information
silentmoooon committed Sep 19, 2017
1 parent 97340f5 commit 4985afe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ClipOne/view/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,18 @@ public IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bo
{
return IntPtr.Zero;
}
if (clip.Type == TEXT_TYPE)
{
for(int i = 0; i < clipList.Count; i++)
{
if (clipList[i].Type == TEXT_TYPE && clipList[i].ClipValue == clip.ClipValue)
{

clipList.RemoveAt(i);
break;
}
}
}

EnQueue(clip);

Expand Down

0 comments on commit 4985afe

Please sign in to comment.