1
This commit is contained in:
@@ -175,10 +175,29 @@ namespace BITFactory.Cutting
|
||||
var button = _brushFieldsContainer.Create<Button>();
|
||||
button.text =string.IsNullOrEmpty(exportAttribute.Name) ? methodInfo.Name:exportAttribute.Name;
|
||||
|
||||
button.clicked += () =>
|
||||
button.clicked += OnClicked;
|
||||
|
||||
return;
|
||||
void OnClicked()
|
||||
{
|
||||
methodInfo.Invoke(arg2, null);
|
||||
};
|
||||
try
|
||||
{
|
||||
methodInfo.Invoke(arg2, null);
|
||||
}
|
||||
catch (TargetInvocationException targetInvocationException)
|
||||
{
|
||||
if (targetInvocationException.InnerException is InGameException e is false) return;
|
||||
switch (e)
|
||||
{
|
||||
case {InnerException:not null}:
|
||||
Alert.Print(e.Message,e.InnerException.Message);
|
||||
break;
|
||||
default:
|
||||
Alert.Print(e.Message,e.Source);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user