Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3086 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
1 changed files with 53 additions and 0 deletions
@ -0,0 +1,53 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt"/>
|
||||||
|
// <license see="prj:///doc/license.txt"/>
|
||||||
|
// <owner name="Siegfried Pammer" email="sie_pam@gmx.at"/>
|
||||||
|
// <version>$Revision: 2984 $</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Windows.Forms; |
||||||
|
|
||||||
|
namespace HexEditor.Util |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Manages the clipboard actions.
|
||||||
|
/// </summary>
|
||||||
|
public static class ClipboardManager |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Used to determine if text is in the clipboard or not.
|
||||||
|
/// </summary>
|
||||||
|
public static bool ContainsText { |
||||||
|
get { |
||||||
|
return Clipboard.ContainsText(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Cleares the Clipboard.
|
||||||
|
/// </summary>
|
||||||
|
public static void Clear() |
||||||
|
{ |
||||||
|
Clipboard.Clear(); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copies text into the clipboard.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="text">The text to be copied to the clipboard.</param>
|
||||||
|
public static void Copy(string text) |
||||||
|
{ |
||||||
|
Clipboard.SetText(text); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Pastes the text.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>the text in the clipboard.</returns>
|
||||||
|
public static string Paste() |
||||||
|
{ |
||||||
|
return Clipboard.GetText(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue