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

Loading…
Cancel
Save