コード例 #1
0
        private void PasteAcrossRowsCommand(object obj)
        {
            var clipBoard = GetClipboardContent();

            if (clipBoard == null)
            {
                return;
            }
            var split = clipBoard.Trim().Split(new Char[] { ',', ';', '\n' });
            var item  = obj as ProcessEntry;

            if (item == null)
            {
                foreach (var entry in split)
                {
                    KillList.Add(new ProcessEntry(entry.Trim()));
                }
                return;
            }
            var index = KillList.IndexOf(item);

            if (index == -1)
            {
                index = KillList.Count;
            }
            for (int i = 1; i <= split.Length; i++)
            {
                KillList.Insert(index + i, new ProcessEntry(split[i - 1].Trim()));
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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);
            }
        }