示例#1
0
 /// <summary>
 /// Converts the value back from ComboBoxitem to a number that can be set for the current month
 /// </summary>
 /// <param name="value">The comboBoxItem Selected</param>
 /// <param name="targetType">Target type</param>
 /// <param name="parameter">The parameter to use</param>
 /// <param name="culture">The current culture in use</param>
 /// <returns>Returns a number that represents the month selected</returns>
 public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     return(MonthsDefines.GetMonthNumber((string)value));
 }
示例#2
0
 /// <summary>
 /// Converts the month from a number to the actual string
 /// </summary>
 /// <param name="value">The value as integer</param>
 /// <param name="targetType">Target type</param>
 /// <param name="parameter">The parameter to use</param>
 /// <param name="culture">The current culture in use</param>
 /// <returns>Returns the selected item to select for the drop down list</returns>
 public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     return(MonthsDefines.GetMonthString((int)value));
 }