Esempio n. 1
0
 private void DefaultButton_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(_tweak.InputHelper))
     {
         if (_tweak.InputHelper.Contains("picture"))
         {
             var photoChooser = new PhotoChooserTask();
             photoChooser.Completed += (object _, PhotoResult result) =>
             {
                 if (result.ChosenPhoto != null)
                 {
                     ValueInput.Text = result.OriginalFileName;
                 }
             };
             photoChooser.Show();
         }
     }
     else
     {
         string value = _tweak.DefaultValueToString;
         if (!string.IsNullOrEmpty(value))
         {
             ValueInput.SetValue(TextBox.TextProperty, _tweak.DefaultValueToString);
         }
     }
 }
Esempio n. 2
0
 void ValueChanged(object sender, string hashedKeys)
 {
     if (string.IsNullOrEmpty(hashedKeys))
     {
         ValueInput.SetValue(TextBox.TextProperty, _tweak.ValueToString);
     }
 }
Esempio n. 3
0
 private void ReadButton_Click(object sender, RoutedEventArgs e)
 {
     ValueInput.SetValue(TextBox.TextProperty, _tweak.ValueToString);
 }