internal void Copy(object obj)
        {
            var    urls   = (obj as ObservableCollection <object>).Cast <UrlListType>();
            string output = "";

            foreach (var item in urls)
            {
                output += item.Url + '\n';
            }
            _clipboard.Clear();
            _clipboard.SetText(output);
        }
示例#2
0
        internal void CopyLinkToClipboard(object obj)
        {
            if (obj == null)
            {
                return;
            }
            var    items    = (obj as ObservableCollection <object>).Cast <DownloaderObjectModel>().ToList();
            string clipText = String.Empty;
            int    counter  = 0;

            foreach (var item in items)
            {
                clipText += item.Url;
                if (counter < items.Count - 1)
                {
                    clipText += '\n';
                }
                counter++;
            }
            _clipboardService.SetText(clipText);
        }