Esempio n. 1
0
 public Safe()
 {
     InitializeComponent();
     DigitTemplatesHelper.SetTemplates((ObjectList)Resources["digits"]);
     firstDigit.EditValue  = 0d;
     secondDigit.EditValue = 0d;
     thirdDigit.EditValue  = 0d;
 }
Esempio n. 2
0
 object IValueConverter.Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     if (value == null)
     {
         return(null);
     }
     if (value as string == null)
     {
         return(DigitTemplatesHelper.GetTemplate((int)((double)value)));
     }
     else
     {
         return(DigitTemplatesHelper.GetTemplate((int)Convert.ToDouble((string)value)));
     }
 }