diff --git a/QRCoderGUITreeData.cs b/QRCoderGUITreeData.cs index 68d4b68..07ab2fe 100644 --- a/QRCoderGUITreeData.cs +++ b/QRCoderGUITreeData.cs @@ -467,14 +467,16 @@ public object GetInvokeCtor(ConstructorInfo ctor, Dictionary cnt if (ctor.GetParameters().Length == 0) //constrictor without parameters = there is no constructor { ctorObj = ctor.Invoke(new object[] { }); - //сопоставить параметры по имени - foreach (KeyValuePair entry in cntrlFromForm) + + try + { + //сопоставить параметры по имени + foreach (KeyValuePair entry in cntrlFromForm) { ctorObj.GetType().GetProperty(entry.Key).SetValue(ctorObj, entry.Value); } - try - { + object instance = ctor.Invoke(ctorObj, new object[] { }); } catch (Exception e)