Beispiel #1
0
        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            string value = ValueUCTextEditor.textEditor.Text;

            //Update the obj attr with new Value
            if (mObj is ExpandoObject)
            {
                ((IDictionary <string, object>)mObj)[mAttrName] = value;
            }
            else if (mObj is JObject)
            {
                ((JObject)mObj).Property(mAttrName).Value = value;
            }
            else
            {
                mObj.GetType().GetProperty(mAttrName).SetValue(mObj, value);
            }

            mWin.Close();
        }
Beispiel #2
0
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     //Update the obj attr with new Value
     mObj.GetType().GetProperty(mAttrName).SetValue(mObj, ValueUCTextEditor.textEditor.Text);
     mWin.Close();
 }