public static ContainsData ( string format ) : bool | ||
format | string | |
Результат | bool |
public override bool IsTypeAvailable(TransferDataType type) { if (type == null) { throw new ArgumentNullException("type"); } return(WindowsClipboard.ContainsData(type.ToSwf())); }
private void GenerateExplorerBackgroundMenuItems(ContextMenu view, ContextMenu mnu, ContextMenu sortMenu, ContextMenu groupMenu) { this.GenerateMenuItem(view, "Thumbstrip", 259, _ShellView.View == ShellViewStyle.Thumbstrip); this.GenerateMenuItem(view, "Content", 258, _ShellView.View == ShellViewStyle.Content); this.GenerateMenuItem(view, "Tiles", 257, _ShellView.View == ShellViewStyle.Tile); this.GenerateMenuItem(view, "Details", 256, _ShellView.View == ShellViewStyle.Details); this.GenerateMenuItem(view, "List", 255, _ShellView.View == ShellViewStyle.List); this.GenerateMenuItem(view, "Small icon", 254, _ShellView.View == ShellViewStyle.SmallIcon); this.GenerateMenuItem(view, "Medium", 253, _ShellView.View == ShellViewStyle.Medium); this.GenerateMenuItem(view, "Large Icon", 252, _ShellView.View == ShellViewStyle.LargeIcon); this.GenerateMenuItem(view, "Extra Large Icon", 251, _ShellView.View == ShellViewStyle.ExtraLargeIcon); if (this._ShellView.CurrentFolder.IsFileSystem && (Clipboard.ContainsData(DataFormats.FileDrop) || Clipboard.ContainsData("Shell IDList Array"))) { this.GenerateSeparator(mnu); this.GenerateMenuItemExecutable(mnu, "Paste", 249); } this.GenerateSeparator(mnu); this.GenerateMenuItemExecutable(mnu, "Refresh", 250); var colID = 261 + this._ShellView.Collumns.Count; var colGroupID = colID + this._ShellView.Collumns.Count + 1; var collist = new List <Collumns>(); collist.AddRange(this._ShellView.Collumns); collist.Reverse(); this.GenerateMenuItem(sortMenu, "Descending", 248, this._ShellView.LastSortOrder == SortOrder.Descending); this.GenerateMenuItem(sortMenu, "Ascending", 247, this._ShellView.LastSortOrder == SortOrder.Ascending); this.GenerateSeparator(sortMenu); foreach (Collumns collumn in collist) { this.GenerateMenuItem(sortMenu, collumn.Name, colID--, collumn == this._ShellView.Collumns.FirstOrDefault(w => w.ID == this._ShellView.LastSortedColumnId)); } this.GenerateMenuItem(groupMenu, "Descending", 246, this._ShellView.LastGroupOrder == SortOrder.Descending); this.GenerateMenuItem(groupMenu, "Ascending", 245, this._ShellView.LastGroupOrder == SortOrder.Ascending); this.GenerateSeparator(groupMenu); foreach (Collumns collumn in collist) { this.GenerateMenuItem(groupMenu, collumn.Name, colGroupID--, collumn == this._ShellView.LastGroupCollumn); } this.GenerateMenuItem(groupMenu, "(None)", 260, this._ShellView.LastGroupCollumn == null); collist.Clear(); collist = null; this.GenerateSubmenu(groupMenu, mnu, "Group by"); this.GenerateSubmenu(sortMenu, mnu, "Sort by"); this.GenerateSubmenu(view, mnu, "View"); }
public void DumpWFClipboardTest() { TestContext.WriteLine($"ContainsAudio: {WFClipboard.ContainsAudio()}"); TestContext.WriteLine($"ContainsData: {WFClipboard.ContainsData(DataFormats.StringFormat)}"); TestContext.WriteLine($"ContainsFileDropList: {WFClipboard.ContainsFileDropList()}"); TestContext.WriteLine($"ContainsImage: {WFClipboard.ContainsImage()}"); TestContext.WriteLine($"ContainsText: {WFClipboard.ContainsText()}"); TestContext.WriteLine($"GetAudioStream: {WFClipboard.GetAudioStream()}"); TestContext.WriteLine($"GetData: {WFClipboard.GetData(DataFormats.StringFormat)}"); TestContext.WriteLine($"GetDataObject: {WFClipboard.GetDataObject()}"); TestContext.WriteLine($"GetFileDropList: {string.Join("\n", WFClipboard.GetFileDropList().Cast<string>())}"); TestContext.WriteLine($"GetImage: {WFClipboard.GetImage()}"); TestContext.WriteLine($"GetText: {WFClipboard.GetText()}"); }
public static bool ContainsData(string format) { return(ClipboardProxy.ContainsData(format)); }