Пример #1
0
 private void ClipboardNotification_ClipboardUpdate(object sender, EventArgs e)
 {
     if (e is ClipboardEventArgs)
     {
         ClipboardQueue.GetInstance().Add((e as ClipboardEventArgs).Text);
     }
 }
Пример #2
0
        public static ClipboardQueue GetInstance()
        {
            if (instance == null)
            {
                instance = new ClipboardQueue();
            }

            return(instance);
        }
Пример #3
0
        private void ContextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = false;

            notifyIcon.ContextMenuStrip.Items.Clear();

            foreach (var item in ClipboardQueue.GetInstance().History)
            {
                notifyIcon.ContextMenuStrip.Items.Add(item);
            }

            notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator());

            notifyIcon.ContextMenuStrip.Items.Add("Exit");
        }