Esempio n. 1
0
 public override bool Equals(Object obj)
 {
     if (obj is FileFolderEntry)
     {
         FileFolderEntry castedObj = obj as FileFolderEntry;
         return(this.shortContent == castedObj.shortContent);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 2
0
        public void AddEntry(System.Collections.Specialized.StringCollection item)
        {
            Entry entry = new FileFolderEntry(item, INDEX.ToString());
            INDEX++;

            if (entries.Contains(entry))
            {
                entries.Remove(entry);
            }

            entries.Add(entry);
        }
Esempio n. 3
0
        public void AddEntry(System.Collections.Specialized.StringCollection item)
        {
            Entry entry = new FileFolderEntry(item, INDEX.ToString());

            INDEX++;

            if (entries.Contains(entry))
            {
                entries.Remove(entry);
            }

            entries.Add(entry);
        }
Esempio n. 4
0
        // put content back to the clipboard on context menu item click
        private void contextMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem != contextMenu.Items[0] && e.ClickedItem != contextMenu.Items[1])
            {
                String id    = e.ClickedItem.Tag.ToString();
                Entry  entry = document.getById(id);

                if (entry is TextEntry)
                {
                    TextEntry castedEntry = entry as TextEntry;
                    Clipboard.SetText(castedEntry.GetContent());
                }
                else if (entry is FileFolderEntry)
                {
                    FileFolderEntry castedEntry = entry as FileFolderEntry;
                    Clipboard.SetFileDropList(castedEntry.GetContent());
                }
            }
        }