Browse Source

Fixed SD2-428: Form designer does not load child controls in panels

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@415 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
0cbb2d6f34
  1. 30
      src/Libraries/NRefactory/Project/Src/Output/CodeDOM/CodeDOMOutputVisitor.cs

30
src/Libraries/NRefactory/Project/Src/Output/CodeDOM/CodeDOMOutputVisitor.cs

@ -627,20 +627,22 @@ namespace ICSharpCode.NRefactory.Parser @@ -627,20 +627,22 @@ namespace ICSharpCode.NRefactory.Parser
} else if (target is FieldReferenceExpression) {
FieldReferenceExpression fRef = (FieldReferenceExpression)target;
targetExpr = (CodeExpression)fRef.TargetObject.AcceptVisitor(this, data);
if (fRef.TargetObject is FieldReferenceExpression) {
FieldReferenceExpression fRef2 = (FieldReferenceExpression)fRef.TargetObject;
if (fRef2.FieldName != null && Char.IsUpper(fRef2.FieldName[0])) {
// an exception is thrown if it doesn't end in an indentifier exception
// for example for : this.MyObject.MyMethod() leads to an exception, which
// is correct in this case ... I know this is really HACKY :)
try {
CodeExpression tExpr = ConvertToIdentifier(fRef2);
if (tExpr != null) {
targetExpr = tExpr;
}
} catch (Exception) {}
}
}
// Commented out because of SD2-428: Form designer does not load child controls in panels
//
// if (fRef.TargetObject is FieldReferenceExpression) {
// FieldReferenceExpression fRef2 = (FieldReferenceExpression)fRef.TargetObject;
// if (fRef2.FieldName != null && Char.IsUpper(fRef2.FieldName[0])) {
// // an exception is thrown if it doesn't end in an indentifier exception
// // for example for : this.MyObject.MyMethod() leads to an exception, which
// // is correct in this case ... I know this is really HACKY :)
// try {
// CodeExpression tExpr = ConvertToIdentifier(fRef2);
// if (tExpr != null) {
// targetExpr = tExpr;
// }
// } catch (Exception) {}
// }
// }
methodName = fRef.FieldName;
// HACK for : Microsoft.VisualBasic.ChrW(NUMBER)
if (methodName == "ChrW") {

Loading…
Cancel
Save