Esempio n. 1
0
 public CycleEventArgs(TimerStyle p_timerStyle, bool p_isPing, bool p_isLoop, bool p_finished)
 {
     m_timerStyle = p_timerStyle;
     m_isPing     = p_isPing;
     m_isLoop     = p_isLoop;
     m_finished   = p_finished;
 }
Esempio n. 2
0
 public TimerEnd(uint fileLine, uint line, string identifier, int process, ItemPos placement, ItemStyle iStyle)
 {
     this.mName 				= "";
     this.mLine 				= line;
     this.mProcess 			= process;
     this.mInitialHeight 	= 10;
     this.mItemPen 			= new Pen(Color.Black, 1);
     this.mPos 				= placement;
     this.mFileLine 			= fileLine;
     this.mItemStyle 		= iStyle;
     this.mIdentifier		= identifier;
     this.mTimerStyle		= TimerStyle.End;
 }
Esempio n. 3
0
 public InterpretResult AddTimerEnd(uint fileLine, uint line, string identifier, string name, TimerStyle tStyle)
 {
     IEnumerator enumerator = processes.GetEnumerator();
     IEnumerator lEnumerator = lines.GetEnumerator();
     bool lineFound = false;
     for(uint i=0;i<lines.Count;i++){
         lEnumerator.MoveNext();
         if ( lEnumerator.Current is ItemVerticalLine)
             if((((ItemVerticalLine) lEnumerator.Current).LineEnd==0)&&(((ItemVerticalLine) lEnumerator.Current).Identifier == identifier)){
                 ((ItemVerticalLine) lEnumerator.Current).LineEnd = line-1;
                 items.Add(new TimerEnd(fileLine, line, identifier,((ItemVerticalLine) lEnumerator.Current).Process, name, ((ItemVerticalLine) lEnumerator.Current).ItemPlacement, ((ItemVerticalLine) lEnumerator.Current).Itemstyle, tStyle));
                 lineFound = true;
                 break;
             }
     }
     if (lineFound==false)
         return InterpretResult.LineNotExists;
     mLines = Math.Max(mLines, line);
     return InterpretResult.Ok;
 }
	public CycleEventArgs(TimerStyle p_timerStyle, bool p_isPing, bool p_isLoop, bool p_finished)
	{
		m_timerStyle = p_timerStyle;
		m_isPing = p_isPing;
		m_isLoop = p_isLoop;
		m_finished = p_finished;
	}
Esempio n. 5
0
 public static void RepertoryImage(Graphics drawDestination, ItemPos pos, ItemStyle style, MscStyle style2, TimerStyle tStyle)
 {
     StringFormat itemStringFormat = new StringFormat();
     if (style2 == MscStyle.UML2){
         if (pos == ItemPos.Left){
             if(style == ItemStyle.Normal){
                 RectangleF itemBox = new RectangleF(10,40,65,20);
                 itemStringFormat.Alignment = StringAlignment.Far;
                 drawDestination.DrawLine(Pens.DarkGray,85,10,85,70);
                 drawDestination.DrawLine(Pens.Black,70,60,85,60);
                 drawDestination.DrawLine(Pens.Black,75,10,75,60);
                 if (tStyle == TimerStyle.End){
                     drawDestination.DrawLine(Pens.Black,75,59,72,53);
                     drawDestination.DrawLine(Pens.Black,75,59,78,53);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,70,55,80,65);
                     drawDestination.DrawLine(Pens.Black,70,65,80,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedOuter){
                 RectangleF itemBox = new RectangleF(0,40,35,20);
                 itemStringFormat.Alignment = StringAlignment.Far;
                 drawDestination.DrawLine(Pens.DarkGray,85,10,85,70);
                 drawDestination.DrawLine(Pens.Black,30,60,85,60);
                 drawDestination.DrawLine(Pens.Black,35,10,35,60);
                 if (tStyle == TimerStyle.End){
                     drawDestination.DrawLine(Pens.Black,35,59,32,53);
                     drawDestination.DrawLine(Pens.Black,35,59,38,53);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,30,55,40,65);
                     drawDestination.DrawLine(Pens.Black,30,65,40,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedInner){
                 RectangleF itemBox = new RectangleF(36,40,35,20);
                 itemStringFormat.Alignment = StringAlignment.Near;
                 drawDestination.DrawLine(Pens.DarkGray,85,10,85,70);
                 drawDestination.DrawLine(Pens.Black,30,60,85,60);
                 drawDestination.DrawLine(Pens.Black,35,10,35,60);
                 if (tStyle == TimerStyle.End){
                     drawDestination.DrawLine(Pens.Black,35,59,32,53);
                     drawDestination.DrawLine(Pens.Black,35,59,38,53);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,30,55,40,65);
                     drawDestination.DrawLine(Pens.Black,30,65,40,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
         }
         else if (pos == ItemPos.Right){
             if(style == ItemStyle.Normal){
                 RectangleF itemBox = new RectangleF(25,40,65,20);
                 itemStringFormat.Alignment = StringAlignment.Near;
                 drawDestination.DrawLine(Pens.DarkGray,15,10,15,70);
                 drawDestination.DrawLine(Pens.Black,15,60,30,60);
                 drawDestination.DrawLine(Pens.Black,25,10,25,60);
                 if (tStyle == TimerStyle.End){
                     drawDestination.DrawLine(Pens.Black,25,59,22,53);
                     drawDestination.DrawLine(Pens.Black,25,59,28,53);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,20,55,30,65);
                     drawDestination.DrawLine(Pens.Black,20,65,30,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedOuter){
                 RectangleF itemBox = new RectangleF(65,40,35,20);
                 itemStringFormat.Alignment = StringAlignment.Near;
                 drawDestination.DrawLine(Pens.DarkGray,15,10,15,70);
                 drawDestination.DrawLine(Pens.Black,15,60,70,60);
                 drawDestination.DrawLine(Pens.Black,65,10,65,60);
                 if (tStyle == TimerStyle.End){
                     drawDestination.DrawLine(Pens.Black,65,59,62,53);
                     drawDestination.DrawLine(Pens.Black,65,59,68,53);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,60,55,70,65);
                     drawDestination.DrawLine(Pens.Black,60,65,70,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedInner){
                 RectangleF itemBox = new RectangleF(0,40,65,20);
                 itemStringFormat.Alignment = StringAlignment.Far;
                 drawDestination.DrawLine(Pens.DarkGray,15,10,15,70);
                 drawDestination.DrawLine(Pens.Black,15,60,70,60);
                 drawDestination.DrawLine(Pens.Black,65,10,65,60);
                 if (tStyle == TimerStyle.End){
                     drawDestination.DrawLine(Pens.Black,65,59,62,53);
                     drawDestination.DrawLine(Pens.Black,65,59,68,53);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,60,55,70,65);
                     drawDestination.DrawLine(Pens.Black,60,65,70,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
         }
     }
     else if (style2 == MscStyle.SDL){
         if (pos == ItemPos.Left){
             if(style == ItemStyle.Normal){
                 RectangleF itemBox = new RectangleF(10,40,65,20);
                 itemStringFormat.Alignment = StringAlignment.Far;
                 drawDestination.DrawLine(Pens.DarkGray,85,10,85,70);
                 drawDestination.DrawLine(Pens.Black,75,60,85,60);
                 drawDestination.DrawLine(Pens.Black,75,10,75,60);
                 if (tStyle == TimerStyle.End){
                     PointF[] capPolygon = new PointF[3];
                     capPolygon[0] = new PointF(85, 60);
                     capPolygon[1] = new PointF(79, 57);
                     capPolygon[2] = new PointF(79, 63);
                     drawDestination.FillPolygon(Brushes.Black,capPolygon);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,70,55,80,65);
                     drawDestination.DrawLine(Pens.Black,70,65,80,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedOuter){
                 RectangleF itemBox = new RectangleF(0,40,35,20);
                 itemStringFormat.Alignment = StringAlignment.Far;
                 drawDestination.DrawLine(Pens.DarkGray,85,10,85,70);
                 drawDestination.DrawLine(Pens.Black,35,60,85,60);
                 drawDestination.DrawLine(Pens.Black,35,10,35,60);
                 if (tStyle == TimerStyle.End){
                     PointF[] capPolygon = new PointF[3];
                     capPolygon[0] = new PointF(85, 60);
                     capPolygon[1] = new PointF(79, 57);
                     capPolygon[2] = new PointF(79, 63);
                     drawDestination.FillPolygon(Brushes.Black,capPolygon);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,30,55,40,65);
                     drawDestination.DrawLine(Pens.Black,30,65,40,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedInner){
                 RectangleF itemBox = new RectangleF(36,40,35,20);
                 itemStringFormat.Alignment = StringAlignment.Near;
                 drawDestination.DrawLine(Pens.DarkGray,85,10,85,70);
                 drawDestination.DrawLine(Pens.Black,35,60,85,60);
                 drawDestination.DrawLine(Pens.Black,35,10,35,60);
                 if (tStyle == TimerStyle.End){
                     PointF[] capPolygon = new PointF[3];
                     capPolygon[0] = new PointF(85, 60);
                     capPolygon[1] = new PointF(79, 57);
                     capPolygon[2] = new PointF(79, 63);
                     drawDestination.FillPolygon(Brushes.Black,capPolygon);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,30,55,40,65);
                     drawDestination.DrawLine(Pens.Black,30,65,40,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
         }
         else if (pos == ItemPos.Right){
             if(style == ItemStyle.Normal){
                 RectangleF itemBox = new RectangleF(25,40,65,20);
                 itemStringFormat.Alignment = StringAlignment.Near;
                 drawDestination.DrawLine(Pens.DarkGray,15,10,15,70);
                 drawDestination.DrawLine(Pens.Black,15,60,25,60);
                 drawDestination.DrawLine(Pens.Black,25,10,25,60);
                 if (tStyle == TimerStyle.End){
                     PointF[] capPolygon = new PointF[3];
                     capPolygon[0] = new PointF(15, 60);
                     capPolygon[1] = new PointF(21, 57);
                     capPolygon[2] = new PointF(21, 63);
                     drawDestination.FillPolygon(Brushes.Black,capPolygon);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,20,55,30,65);
                     drawDestination.DrawLine(Pens.Black,20,65,30,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedOuter){
                 RectangleF itemBox = new RectangleF(65,40,35,20);
                 itemStringFormat.Alignment = StringAlignment.Near;
                 drawDestination.DrawLine(Pens.DarkGray,15,10,15,70);
                 drawDestination.DrawLine(Pens.Black,15,60,65,60);
                 drawDestination.DrawLine(Pens.Black,65,10,65,60);
                 if (tStyle == TimerStyle.End){
                     PointF[] capPolygon = new PointF[3];
                     capPolygon[0] = new PointF(15, 60);
                     capPolygon[1] = new PointF(21, 57);
                     capPolygon[2] = new PointF(21, 63);
                     drawDestination.FillPolygon(Brushes.Black,capPolygon);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,60,55,70,65);
                     drawDestination.DrawLine(Pens.Black,60,65,70,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
             else if(style == ItemStyle.ExtendedInner){
                 RectangleF itemBox = new RectangleF(0,40,65,20);
                 itemStringFormat.Alignment = StringAlignment.Far;
                 drawDestination.DrawLine(Pens.DarkGray,15,10,15,70);
                 drawDestination.DrawLine(Pens.Black,15,60,65,60);
                 drawDestination.DrawLine(Pens.Black,65,10,65,60);
                 if (tStyle == TimerStyle.End){
                     PointF[] capPolygon = new PointF[3];
                     capPolygon[0] = new PointF(15, 60);
                     capPolygon[1] = new PointF(21, 57);
                     capPolygon[2] = new PointF(21, 63);
                     drawDestination.FillPolygon(Brushes.Black,capPolygon);
                 }
                 else if (tStyle == TimerStyle.Break){
                     drawDestination.DrawLine(Pens.Black,60,55,70,65);
                     drawDestination.DrawLine(Pens.Black,60,65,70,55);
                 }
                 drawDestination.DrawString("Timer",new Font("Arial",8),Brushes.Black,itemBox,itemStringFormat);
             }
         }
     }
     itemStringFormat.Dispose();
 }