C# Class ZSCY.Util.Utils

显示文件 Open project: RedrockMobile/CyxbsMobile_Win

Public Methods

Method Description
ConvertUnicodeStringToChinese ( string unicodeString ) : string

UNICODE字符转为中文

DownloadAndScale ( string outfileName, string downloadUriString, Size scaleSize ) : System.Threading.Tasks.Task

异步从网络下载图片

GetTime ( string timeStamp ) : DateTime

时间戳转时间

GetTimeStamp ( DateTimeOffset date, TimeSpan time ) : string

时间转时间戳

GetWeek ( int mode = 1 ) : string

获取星期

Message ( string text, string title = "错误" ) : void

弹出对话框

ReadJso ( string jsonstring, string sdata = "data" ) : Newtonsoft.Json.Linq.JArray
ShowSystemTrayAsync ( Color backgroundColor, Color foregroundColor, double opacity = 1, string text = "", bool isIndeterminate = false ) : System.Threading.Tasks.Task
Toast ( string text ) : void

Toast

getPhoneHeight ( ) : double

屏幕高度

getPhoneWidth ( ) : double

屏幕宽度

Private Methods

Method Description
ConverUnicodeStringToChar ( string str ) : char

Method Details

ConvertUnicodeStringToChinese() public static method

UNICODE字符转为中文
public static ConvertUnicodeStringToChinese ( string unicodeString ) : string
unicodeString string
return string

DownloadAndScale() public static method

异步从网络下载图片
public static DownloadAndScale ( string outfileName, string downloadUriString, Size scaleSize ) : System.Threading.Tasks.Task
outfileName string 下载保存到本地的图片文件名
downloadUriString string 图片uri
scaleSize Windows.Foundation.Size 图片尺寸
return System.Threading.Tasks.Task

GetTime() public static method

时间戳转时间
public static GetTime ( string timeStamp ) : DateTime
timeStamp string Unix时间戳格式
return DateTime

GetTimeStamp() public static method

时间转时间戳
public static GetTimeStamp ( DateTimeOffset date, TimeSpan time ) : string
date DateTimeOffset
time TimeSpan
return string

GetWeek() public static method

获取星期
public static GetWeek ( int mode = 1 ) : string
mode int 默认1.返回数字,2.返回中文
return string

Message() public static method

弹出对话框
public static Message ( string text, string title = "错误" ) : void
text string
title string
return void

ReadJso() public static method

public static ReadJso ( string jsonstring, string sdata = "data" ) : Newtonsoft.Json.Linq.JArray
jsonstring string
sdata string
return Newtonsoft.Json.Linq.JArray

ShowSystemTrayAsync() public static method

public static ShowSystemTrayAsync ( Color backgroundColor, Color foregroundColor, double opacity = 1, string text = "", bool isIndeterminate = false ) : System.Threading.Tasks.Task
backgroundColor Color
foregroundColor Color
opacity double
text string
isIndeterminate bool
return System.Threading.Tasks.Task

Toast() public static method

Toast
public static Toast ( string text ) : void
text string
return void

getPhoneHeight() public static method

屏幕高度
public static getPhoneHeight ( ) : double
return double

getPhoneWidth() public static method

屏幕宽度
public static getPhoneWidth ( ) : double
return double