C# 클래스 MPTagThat.Core.Util

파일 보기 프로젝트 열기: MediaPortal/MPTagThat

공개 메소드들

메소드 설명
CheckParameterFormat ( string str, Options formattype ) : bool

Check the Parameter Format for validity

CreateCursorFromResource ( string resourceName, int xHotSpot, int yHotSpot ) : Cursor

Create a cursor from the given Resource Name

Drive2BassID ( char driveLetter ) : int

Converts the given CD/DVD Drive Letter to a number suiteable for BASS

DurationToSeconds ( string durationString ) : int

Converts a time string "HH:mm:ss" to seconds

EnterMethod ( MPTagThat.Core.CallingMethod method ) : void

write the Method Name into the log

FormatGridColumn ( MPTagThat.Core.GridViewColumn setting ) : System.Windows.Forms.DataGridViewColumn

Formats a Grid Column based on the Settings

FormatID3Tag ( File file ) : File

Based on the Options set, use the correct version for ID3 Eventually remove V1 or V2 tags, if set in the options

GetCallingMethod ( ) : MPTagThat.Core.CallingMethod

Example using CallingMethod within another method. This still returns information about the caller by excluding calls from this Utils class.

GetFolderThumb ( string folder ) : Common.MPTagThat.Core.Common.Picture

Return the folder.jpg as a Taglib.Picture

GetImageAssociatedWithFile ( string filePath, bool small ) : Image
GetQualifiedFilename ( string strBasePath, string &strFileName ) : void

Returns a filename prefixed with the Path

GetWebPage ( string requestString ) : string

Returns the requested WebPage

HttpPostRequest ( string url, string>.Dictionary postParameters ) : string

Post data to WebPage and get result.

IsAudio ( string fileName ) : bool

Is this an Audio file, which can be handled by MPTagThat

IsCDDrive ( string driveLetter ) : bool

Checks if the given Drive Letter is a CD/DVD Drive

IsPicture ( string fileName ) : bool

Is this a Picture file, which can be shown in Listview

IsReplayGain ( string description ) : bool

Checks, if we got a replaygain frame

LabelToParameter ( string label ) : string

Convert the Label to a Parameter

LeaveMethod ( MPTagThat.Core.CallingMethod method ) : void

write the Method Name into the log

LongestCommonSubstring ( string sourceString, string targetString ) : double

This function matches the Longet Common Substring of the source string found in target string

MakeValidFileName ( string str ) : string

Make a Valid Filename out of a given String

MakeValidFolderName ( string str ) : string

Make a Valid Foldername out of a given String

ReadFullStream ( Stream stream, int initialLength ) : byte[]

Reads data from a stream until the end is reached. The data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.

RelativePathTo ( string fromDirectory, string toPath ) : string

Creates a relative path from one file or folder to another.

RemoveInvalidChars ( string strText ) : string

Changes the Quote to a double Quote, to have correct SQL Syntax

RemoveTrailingSlash ( string strLine ) : string
ReplaceEx ( string original, string pattern, string replacement ) : string

Fast Case Sensitive Replace Method

ReplaceParametersWithTrackValues ( string parameter, TrackData track ) : string

Replace the given Parameter string with the values from the Track

SavePicture ( TrackData track ) : void

Save the Picture of the track as folder.jpg

SecondsToHMSString ( string sSeconds ) : string

Converts given seconds to HH:mm:ss

SendMessage ( string action, string data ) : void

Sends a message

SendProgress ( string message ) : void

Sends a Progress Message, so that the status bar can be updated

isARedBookCD ( string drive ) : bool

Checks, if the given Drive Letter is a Red Book (Audio) CD

비공개 메소드들

메소드 설명
CheckParmWithLengthIndicator ( int startIndex, string str, string &parmString ) : bool

Check a Parameter with a given Length Indicator for correctness

CreateIconIndirect ( System.Drawing.IconInfo &icon ) : IntPtr
GetIconInfo ( IntPtr hIcon, System.Drawing.IconInfo &pIconInfo ) : bool
MoveWindow ( IntPtr hWnd, int x, int y, int cx, int cy, bool repaint ) : bool
ReplaceStringWithLengthIndicator ( int startIndex, string replaceString, string replaceValue ) : string
SHFileOperation ( SHFILEOPSTRUCT &FileOp ) : int
SendMessage ( IntPtr hWnd, int msg, int len, IntPtr order ) : IntPtr
SetWindowText ( IntPtr hwnd, String lpString ) : bool
Util ( ) : System

메소드 상세

CheckParameterFormat() 공개 정적인 메소드

Check the Parameter Format for validity
public static CheckParameterFormat ( string str, Options formattype ) : bool
str string
formattype Options
리턴 bool

CreateCursorFromResource() 공개 정적인 메소드

Create a cursor from the given Resource Name
public static CreateCursorFromResource ( string resourceName, int xHotSpot, int yHotSpot ) : Cursor
resourceName string
xHotSpot int
yHotSpot int
리턴 System.Windows.Forms.Cursor

Drive2BassID() 공개 정적인 메소드

Converts the given CD/DVD Drive Letter to a number suiteable for BASS
public static Drive2BassID ( char driveLetter ) : int
driveLetter char
리턴 int

DurationToSeconds() 공개 정적인 메소드

Converts a time string "HH:mm:ss" to seconds
public static DurationToSeconds ( string durationString ) : int
durationString string
리턴 int

EnterMethod() 공개 정적인 메소드

write the Method Name into the log
public static EnterMethod ( MPTagThat.Core.CallingMethod method ) : void
method MPTagThat.Core.CallingMethod
리턴 void

FormatGridColumn() 공개 정적인 메소드

Formats a Grid Column based on the Settings
public static FormatGridColumn ( MPTagThat.Core.GridViewColumn setting ) : System.Windows.Forms.DataGridViewColumn
setting MPTagThat.Core.GridViewColumn
리턴 System.Windows.Forms.DataGridViewColumn

FormatID3Tag() 공개 정적인 메소드

Based on the Options set, use the correct version for ID3 Eventually remove V1 or V2 tags, if set in the options
public static FormatID3Tag ( File file ) : File
file TagLib.File
리턴 TagLib.File

GetCallingMethod() 공개 정적인 메소드

Example using CallingMethod within another method. This still returns information about the caller by excluding calls from this Utils class.
public static GetCallingMethod ( ) : MPTagThat.Core.CallingMethod
리턴 MPTagThat.Core.CallingMethod

GetFolderThumb() 공개 정적인 메소드

Return the folder.jpg as a Taglib.Picture
public static GetFolderThumb ( string folder ) : Common.MPTagThat.Core.Common.Picture
folder string
리턴 Common.MPTagThat.Core.Common.Picture

GetImageAssociatedWithFile() 공개 정적인 메소드

public static GetImageAssociatedWithFile ( string filePath, bool small ) : Image
filePath string
small bool
리턴 Image

GetQualifiedFilename() 공개 정적인 메소드

Returns a filename prefixed with the Path
public static GetQualifiedFilename ( string strBasePath, string &strFileName ) : void
strBasePath string
strFileName string
리턴 void

GetWebPage() 공개 정적인 메소드

Returns the requested WebPage
public static GetWebPage ( string requestString ) : string
requestString string
리턴 string

HttpPostRequest() 공개 정적인 메소드

Post data to WebPage and get result.
public static HttpPostRequest ( string url, string>.Dictionary postParameters ) : string
url string
postParameters string>.Dictionary
리턴 string

IsAudio() 공개 정적인 메소드

Is this an Audio file, which can be handled by MPTagThat
public static IsAudio ( string fileName ) : bool
fileName string
리턴 bool

IsCDDrive() 공개 정적인 메소드

Checks if the given Drive Letter is a CD/DVD Drive
public static IsCDDrive ( string driveLetter ) : bool
driveLetter string
리턴 bool

IsPicture() 공개 정적인 메소드

Is this a Picture file, which can be shown in Listview
public static IsPicture ( string fileName ) : bool
fileName string
리턴 bool

IsReplayGain() 공개 정적인 메소드

Checks, if we got a replaygain frame
public static IsReplayGain ( string description ) : bool
description string
리턴 bool

LabelToParameter() 공개 정적인 메소드

Convert the Label to a Parameter
public static LabelToParameter ( string label ) : string
label string
리턴 string

LeaveMethod() 공개 정적인 메소드

write the Method Name into the log
public static LeaveMethod ( MPTagThat.Core.CallingMethod method ) : void
method MPTagThat.Core.CallingMethod
리턴 void

LongestCommonSubstring() 공개 정적인 메소드

This function matches the Longet Common Substring of the source string found in target string
public static LongestCommonSubstring ( string sourceString, string targetString ) : double
sourceString string The Source String to match
targetString string The Target String to search within
리턴 double

MakeValidFileName() 공개 정적인 메소드

Make a Valid Filename out of a given String
public static MakeValidFileName ( string str ) : string
str string
리턴 string

MakeValidFolderName() 공개 정적인 메소드

Make a Valid Foldername out of a given String
public static MakeValidFolderName ( string str ) : string
str string
리턴 string

ReadFullStream() 공개 정적인 메소드

Reads data from a stream until the end is reached. The data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.
public static ReadFullStream ( Stream stream, int initialLength ) : byte[]
stream Stream The stream to read data from
initialLength int The initial buffer length
리턴 byte[]

RelativePathTo() 공개 정적인 메소드

Creates a relative path from one file or folder to another.
public static RelativePathTo ( string fromDirectory, string toPath ) : string
fromDirectory string /// Contains the directory that defines the /// start of the relative path. ///
toPath string /// Contains the path that defines the /// endpoint of the relative path. ///
리턴 string

RemoveInvalidChars() 공개 정적인 메소드

Changes the Quote to a double Quote, to have correct SQL Syntax
public static RemoveInvalidChars ( string strText ) : string
strText string
리턴 string

RemoveTrailingSlash() 공개 정적인 메소드

public static RemoveTrailingSlash ( string strLine ) : string
strLine string
리턴 string

ReplaceEx() 공개 정적인 메소드

Fast Case Sensitive Replace Method
public static ReplaceEx ( string original, string pattern, string replacement ) : string
original string
pattern string
replacement string
리턴 string

ReplaceParametersWithTrackValues() 공개 정적인 메소드

Replace the given Parameter string with the values from the Track
public static ReplaceParametersWithTrackValues ( string parameter, TrackData track ) : string
parameter string
track TrackData
리턴 string

SavePicture() 공개 정적인 메소드

Save the Picture of the track as folder.jpg
public static SavePicture ( TrackData track ) : void
track TrackData
리턴 void

SecondsToHMSString() 공개 정적인 메소드

Converts given seconds to HH:mm:ss
public static SecondsToHMSString ( string sSeconds ) : string
sSeconds string
리턴 string

SendMessage() 공개 정적인 메소드

Sends a message
public static SendMessage ( string action, string data ) : void
action string
data string
리턴 void

SendProgress() 공개 정적인 메소드

Sends a Progress Message, so that the status bar can be updated
public static SendProgress ( string message ) : void
message string
리턴 void

isARedBookCD() 공개 정적인 메소드

Checks, if the given Drive Letter is a Red Book (Audio) CD
public static isARedBookCD ( string drive ) : bool
drive string
리턴 bool