德国世界杯_2012年世界杯 - fyycdq.com

德国世界杯_2012年世界杯 - fyycdq.com

WPF 打开文件、文件夹,另存为文件

不登对:

写一个Converter就好了,具体怎么转是你的需求了

[code=java]

public class Double2TimeConverter : IValueConverter

{

const int minutes = 60;

const int hours = 60 * 60;

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

{

return D2t((int)(double)value);

}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

{

throw new NotImplementedException();

}

private string D2t(int seconds)

{

int convertHours = seconds / hours;

int convertMinutese = seconds % hours / minutes;

int convertSeconds = seconds % hours % minutes % minutes;

string result = string.Empty;

if (convertHours == 0)

{

result = string.Format("{0}:{1}", convertMinutese.ToString("d2"), convertSeconds.ToString("d2"));

}

else

{

[/code]