C# Class booruReader.Model.BasePost

Inheritance: BaseIObservable
显示文件 Open project: earlnuclear/DanbooruBrowser Class Usage Examples

Public Properties

Property Type Description
FileMD string
ImageRating PostRating
PostId string
_height int
_width int

Public Methods

Method Description
BasePost ( ) : System
BasePost ( BasePost post, bool isUIImage = false ) : System

Constructor that SHOULD be used for images

SaveImage ( ) : void

This call will try to save the image and report its completion

SaveImage ( string imageLocation ) : void

This save method is invoked from preview screen. We already have full-size image downloaded so just copy it.

_downloadClient_DownloadFileCompleted ( object sender, AsyncCompletedEventArgs e ) : void

Private Methods

Method Description
GetHumanFilename ( string extension ) : string

Returns human readable filename in format of: booru postid tag1 tag2... .extension Function will try adding as many tags as possible until we hit the 256 char limit for filename + folder path. Refer to http://msdn.microsoft.com/en-us/library/ee681827(VS.85).aspx#limits for the filename size limit.

LateFilePath ( object e, AsyncCompletedEventArgs args ) : void
client_DownloadProgressChanged ( object sender, DownloadProgressChangedEventArgs e ) : void

Progress callback for updating the image download progressbar

Method Details

BasePost() public method

public BasePost ( ) : System
return System

BasePost() public method

Constructor that SHOULD be used for images
public BasePost ( BasePost post, bool isUIImage = false ) : System
post BasePost
isUIImage bool
return System

SaveImage() public method

This call will try to save the image and report its completion
public SaveImage ( ) : void
return void

SaveImage() public method

This save method is invoked from preview screen. We already have full-size image downloaded so just copy it.
public SaveImage ( string imageLocation ) : void
imageLocation string
return void

_downloadClient_DownloadFileCompleted() public method

public _downloadClient_DownloadFileCompleted ( object sender, AsyncCompletedEventArgs e ) : void
sender object
e System.ComponentModel.AsyncCompletedEventArgs
return void

Property Details

FileMD public_oe property

public string FileMD
return string

ImageRating public_oe property

public PostRating ImageRating
return PostRating

PostId public_oe property

public string PostId
return string

_height public_oe property

public int _height
return int

_width public_oe property

public int _width
return int