C# Класс AddonHelper.Addon

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ProgressBar cProgressBar
rnd System.Random

Открытые методы

Метод Описание
AddLog ( string URL, string info ) : void

Add a recently uploaded file to the upload log

Backup ( byte buffer, string filename ) : void

Make a backup of the given file buffer as the current filename

Backup ( string sourceFile ) : void

Make a backup of the given source file

Debug ( string str ) : void

Writes to debug.txt

Drag ( Action doneDragging ) : void

Drag to upload

Epoch ( ) : long

Returns the linux epoch time (seconds passed since 1/1/1970)

GetBetween ( string Source, string Str1, string Str2 ) : string

Get a string between 2 other strings from the source string

GetEncoder ( ImageFormat format ) : System.Drawing.Imaging.ImageCodecInfo

Returns the image encoder for the given ImageFormat

GetProxy ( ) : WebProxy

Get a WebProxy object from the global proxy settings in the ClipUpload application

ImagePipeline ( Image img ) : void

Transforms an image based on global upload settings

LongDataEscape ( string Str ) : string

Alternative of M:System.Uri.EscapeDataString(System.String) to allow for much longer data to be escaped

MD5 ( string S ) : string

Generate an MD5 hash of the given string

PopulateKeysCombobox ( ComboBox comboBox ) : void

Populate a keys combobox with possible keys to press

RandomFilename ( int len, string chars = "abcdefghijklmnopqrstuvwxyz0123456789" ) : string

Returns a random filename based on the length and the allowed characters given

RandomString ( int len, string chars = "abcdefghijklmnopqrstuvwxyz0123456789" ) : string

Returns a random string based on the length and the allowed characters given

SetClipboardText ( string Text ) : void

Safely sets the clipboard text. Refrain from using Clipboard.SetText directly, instead, use this function!

SetShortcuts ( bool enabled ) : void

Enables or disables shortcuts in ClipUpload.

base64Decode ( string input ) : string

Decode a base64 string

base64Encode ( string input ) : string

Encode a string in base64

getDateString ( ) : string

Returns a date string without any delimiters in the following order: Day, month, year, hour, minute, second

Приватные методы

Метод Описание
GetOpenClipboardWindow ( ) : IntPtr
formatFilename ( string origFilename ) : string

Описание методов

AddLog() публичный Метод

Add a recently uploaded file to the upload log
public AddLog ( string URL, string info ) : void
URL string The URL
info string Additional info that will appear in the recent uploads list
Результат void

Backup() публичный Метод

Make a backup of the given file buffer as the current filename
public Backup ( byte buffer, string filename ) : void
buffer byte The file buffer
filename string The filename
Результат void

Backup() публичный Метод

Make a backup of the given source file
public Backup ( string sourceFile ) : void
sourceFile string The source filename
Результат void

Debug() публичный Метод

Writes to debug.txt
public Debug ( string str ) : void
str string Line of text
Результат void

Drag() публичный Метод

Drag to upload
public Drag ( Action doneDragging ) : void
doneDragging Action Dragging callback
Результат void

Epoch() публичный Метод

Returns the linux epoch time (seconds passed since 1/1/1970)
public Epoch ( ) : long
Результат long

GetBetween() публичный Метод

Get a string between 2 other strings from the source string
public GetBetween ( string Source, string Str1, string Str2 ) : string
Source string The source string
Str1 string The first string, for example: "<link>"
Str2 string The second string, for example: "</link>"
Результат string

GetEncoder() публичный Метод

Returns the image encoder for the given ImageFormat
public GetEncoder ( ImageFormat format ) : System.Drawing.Imaging.ImageCodecInfo
format System.Drawing.Imaging.ImageFormat The ImageFormat to get the encoder for
Результат System.Drawing.Imaging.ImageCodecInfo

GetProxy() публичный Метод

Get a WebProxy object from the global proxy settings in the ClipUpload application
public GetProxy ( ) : WebProxy
Результат System.Net.WebProxy

ImagePipeline() публичный Метод

Transforms an image based on global upload settings
public ImagePipeline ( Image img ) : void
img Image The base image
Результат void

LongDataEscape() публичный Метод

Alternative of M:System.Uri.EscapeDataString(System.String) to allow for much longer data to be escaped
public LongDataEscape ( string Str ) : string
Str string The string to be escaped
Результат string

MD5() публичный Метод

Generate an MD5 hash of the given string
public MD5 ( string S ) : string
S string The string
Результат string

PopulateKeysCombobox() публичный Метод

Populate a keys combobox with possible keys to press
public PopulateKeysCombobox ( ComboBox comboBox ) : void
comboBox System.Windows.Forms.ComboBox The combobox
Результат void

RandomFilename() публичный Метод

Returns a random filename based on the length and the allowed characters given
public RandomFilename ( int len, string chars = "abcdefghijklmnopqrstuvwxyz0123456789" ) : string
len int The length
chars string Allowed characters
Результат string

RandomString() публичный статический Метод

Returns a random string based on the length and the allowed characters given
public static RandomString ( int len, string chars = "abcdefghijklmnopqrstuvwxyz0123456789" ) : string
len int The length
chars string Allowed characters
Результат string

SetClipboardText() публичный Метод

Safely sets the clipboard text. Refrain from using Clipboard.SetText directly, instead, use this function!
public SetClipboardText ( string Text ) : void
Text string The text to set the clipboard to
Результат void

SetShortcuts() публичный статический Метод

Enables or disables shortcuts in ClipUpload.
public static SetShortcuts ( bool enabled ) : void
enabled bool Bool to enable or disable
Результат void

base64Decode() публичный Метод

Decode a base64 string
public base64Decode ( string input ) : string
input string The base64 string to be decoded
Результат string

base64Encode() публичный Метод

Encode a string in base64
public base64Encode ( string input ) : string
input string The string to be encoded
Результат string

getDateString() публичный Метод

Returns a date string without any delimiters in the following order: Day, month, year, hour, minute, second
public getDateString ( ) : string
Результат string

Описание свойств

ProgressBar публичное свойство

Used to invoke a progressbar window
public cProgressBar ProgressBar
Результат cProgressBar

rnd публичное статическое свойство

public static Random,System rnd
Результат System.Random