protected void FillCodeDomDesignerData(CodeObject newElement, int line, int col)
        {
            CodeDomDesignerData data = new CodeDomDesignerData();

            //
            data.CaretPosition = new System.Drawing.Point(col, line);
            data.FileName      = this.CurrentFile;
            // point is where the designer will try to focus if the
            // user wants to add event handler stuff.
            newElement.UserData[typeof(CodeDomDesignerData)]  = data;
            newElement.UserData[typeof(System.Drawing.Point)] = data.CaretPosition;
        }
Esempio n. 2
0
        private static void SetDesignerData(CodeTypeMember member)
        {
            var li = member.UserData["LexicalInfo"] as LexicalInfo;

            if (li == null)
            {
                return;
            }

            var designerData = new CodeDomDesignerData
            {
                CaretPosition = new System.Drawing.Point(li.Column, li.Line),
                FileName      = li.FileName
            };

            member.UserData[typeof(CodeDomDesignerData)]  = designerData;
            member.UserData[typeof(System.Drawing.Point)] = designerData.CaretPosition;
        }
Esempio n. 3
0
 private void FillCodeDomDesignerData(CodeObject newElement, int line, int col)
 {
     CodeDomDesignerData data = new CodeDomDesignerData();
     //
     data.CaretPosition = new System.Drawing.Point(col, line);
     data.FileName = this.CurrentFile;
     // point is where the designer will try to focus if the
     // user wants to add event handler stuff.  
     newElement.UserData[typeof(CodeDomDesignerData)] = data;
     newElement.UserData[typeof(System.Drawing.Point)] = data.CaretPosition;
 }