Example #1
0
 public InterpretResult AddComment2(uint fileLine, uint line, string name, string instanceName, CommentPos pos)
 {
     Process process;
     IEnumerator enumerator = processes.GetEnumerator();
     int instance=-1;
     if(instanceName==ENV_LEFT_STRING){
         instance = ENV_LEFT;
     }
     if(instanceName==ENV_RIGHT_STRING){
         instance = ENV_RIGHT;
     }
     for(int i=0;i<processes.Count;i++){
         enumerator.MoveNext();
         process = (Process) enumerator.Current;
         if(process.ProcessName == instanceName){
             instance=i;
         }
     }
     if(instance != -1){
         items.Add(new Comment(fileLine, line, instance, name, pos));
         mLines = Math.Max(mLines, line);
         return InterpretResult.Ok;
     }
     else
         return InterpretResult.InstanceNotFound;
 }
Example #2
0
 public LineComment(uint fileLine, string name, uint line, int process, CommentPos pos, bool drawLine)
 {
     this.mName 			= name;
     this.mLine 			= line;
     this.mProcess 		= process;
     this.mItemPen 		= new Pen(Color.Black, 1);
     this.mPos 			= pos;
     this.mDrawLine 		= drawLine;
     this.mFileLine 		= fileLine;
 }
Example #3
0
 public LineComment(uint fileLine, string name, uint line, int process)
 {
     this.mName 			= name;
     this.mLine 			= line;
     this.mProcess 		= process;
     this.mItemPen 		= new Pen(Color.Black, 1);
     this.mPos 			= CommentPos.Left;
     this.mDrawLine 		= true;
     this.mFileLine 		= fileLine;
 }
Example #4
0
 public Comment(uint fileLine, uint line, int instance, string name)
 {
     this.mName 					= name;
     this.mItemPen 				= new Pen(Color.Black, 1);
     this.mLine 					= line;
     if (instance == Generator.ENV_RIGHT)
         this.pos 				= CommentPos.Right;
     else
         this.pos 				= CommentPos.Left;
     this.mFileLine 				= fileLine;
     this.mCommentInstance 		= instance;
 }
Example #5
0
 public InterpretResult AddComment2(uint fileLine, uint line, string name, CommentPos pos)
 {
     items.Add(new Comment(fileLine, line, 0, name, pos));
     mLines = Math.Max(mLines, line);
     return InterpretResult.Ok;
 }
Example #6
0
 public InterpretResult AddLineComment(uint fileLine, string processName, uint line, string name, CommentPos pos, bool drawLine)
 {
     Process process;
     IEnumerator enumerator = processes.GetEnumerator();
     bool instanceFound = false;
     for(int i=0;i<processes.Count;i++){
         enumerator.MoveNext();
         process = (Process) enumerator.Current;
         if(process.ProcessName == processName){
             items.Add(new LineComment(fileLine, name, line, i, pos, drawLine));
             instanceFound = true;
             break;
         }
     }
     if (instanceFound==false)
         return InterpretResult.InstanceNotFound;
     mLines = Math.Max(mLines, line);
     return InterpretResult.Ok;
 }