public void RecordHistory(IDataObject dataObject) { TSMenuItem item; if (unused.Count > 0) { item = unused.First(); unused.Remove(item); } else { item = new TSMenuItem(); item.DropDownItems.AddRange(new TSItem[] { new TSMenuItem(Language.RestoreHistory, null, HandleUseClick) { Tag = item }, new TSMenuItem(Language.ForgetHistory, null, HandleRemoveClick) { Tag = item }, new TSSeparator(), }); } ClipboardApplication.UpdateDisplay(dataObject, item); item.Tag = CloneDataObject(dataObject); item.Enabled = true; root.Insert(root.IndexOf(index) + 1, item); list.Add(item); UpdateClearEnabled(); }
private static void Run(object sender, EventArgs e) { Application.Idle -= Run; clipboardUI = new ClipboardApplication(); }