Пример #1
0
            public int Compare(object x, object y)
            {
                MessageChainComponent xx = (MessageChainComponent)x;
                MessageChainComponent yy = (MessageChainComponent)y;
                int value = xx.Count.CompareTo(yy.Count);

                if (value == 0)
                {
                    value = xx.Length.CompareTo(yy.Length);
                }
                return(value * (m_direction == SortDirection.Ascending ? 1 : -1));
            }
Пример #2
0
		public void MakeMessageChainComponent( string strLine )
		{
			string method = @"\w+\s*([(][^)]*[)])?";
			string chain = "(" + method + "[.])*" + method;
			Match m = Regex.Match( strLine, chain, RegexOptions.Compiled );
			if( m.Success )
			{
				string strChain = m.Groups[1].Value;

				int periodCount = CountPeriod( strChain );
				if( periodCount > 3 )
				{
					if( ! m_htMessageChains.ContainsKey( strChain ) )
					{
						m_htMessageChains[ strChain ] = new MessageChainComponent( strChain, periodCount );
					}
					MessageChainComponent comp = (MessageChainComponent)m_htMessageChains[ strChain ];
					comp.Count++;
				}
			}
		}
Пример #3
0
        public void MakeMessageChainComponent(string strLine)
        {
            string method = @"\w+\s*([(][^)]*[)])?";
            string chain  = "(" + method + "[.])*" + method;
            Match  m      = Regex.Match(strLine, chain, RegexOptions.Compiled);

            if (m.Success)
            {
                string strChain = m.Groups[1].Value;

                int periodCount = CountPeriod(strChain);
                if (periodCount > 3)
                {
                    if (!m_htMessageChains.ContainsKey(strChain))
                    {
                        m_htMessageChains[strChain] = new MessageChainComponent(strChain, periodCount);
                    }
                    MessageChainComponent comp = (MessageChainComponent)m_htMessageChains[strChain];
                    comp.Count++;
                }
            }
        }
		protected void CreateMethodClip( MessageChainComponent chain, 
			int x, int y, int w, int h )
		{
			MovieClip clip = m_panelClip.CreateSubMovieClip( x, y, w, h );
			clip.Object = chain;
			// Back rectangle
			clip.Graphics.FillRectangle( m_backBrush, 0, 0, w, h);

			// Dots
			MovieClip dots = clip.CreateSubMovieClip( 0, 0, w/4, h );
			//dots.Graphics.FillRectangle( Brushes.Wheat, 0, 0, w/4, h );
			for( int d = 0; d < chain.Length; d++ )
			{   // extra spacing in between disconnected chains?
				MovieClip dot = dots.CreateSubMovieClip( 0, 0, 10, 10 );
				dot.Graphics.FillEllipse( Brushes.LightGreen, 0, 0, 9, 9 );
			}
			Space( 3, 3, dots.Children, dots.Width );

			// Text
			MovieClip text = clip.CreateSubMovieClip( dots.Width, 0, w - dots.Width, h );
			text.LeftString( "(" + chain.Count +")  " + chain.MessageChain, Brushes.White);
		}
Пример #5
0
        public void MakeChain(string line)
        {
            //Match m = Regex.Match( strLine, chain, RegexOptions.Compiled );
            //if( m.Success )
            //{
            Hashtable bounds = Boundary.Boundaries(line);

            foreach (ArrayList depth in bounds.Values)
            {
                string dLine     = "";
                int    index     = 0;
                int    lastIndex = 0;
                foreach (Boundary b in depth)
                {
                    dLine += line.Substring(index, (b.start - index) + 1);
                    if (b.end > index)
                    {
                        index     = b.end;
                        lastIndex = b.end;
                    }
                }
                if (lastIndex < line.Length - 1)
                {
                    dLine += line.Substring(lastIndex, line.Length - lastIndex);
                }
                string chainLine   = GetChainPart(dLine);
                int    periodCount = CountPeriod(chainLine);
                if (periodCount > 3)
                {
                    if (!m_htMessageChains.ContainsKey(chainLine))
                    {
                        m_htMessageChains[chainLine] = new MessageChainComponent(chainLine, periodCount);
                    }
                    MessageChainComponent comp = (MessageChainComponent)m_htMessageChains[chainLine];
                    comp.Count++;
                }
            }
        }
Пример #6
0
		public void MakeChain( string line )
		{
			//Match m = Regex.Match( strLine, chain, RegexOptions.Compiled );
			//if( m.Success )
			//{
			Hashtable bounds = Boundary.Boundaries( line );
			foreach( ArrayList depth in bounds.Values )
			{
				string dLine = "";
				int index = 0;
				int lastIndex = 0;
				foreach( Boundary b in depth )
				{
					dLine += line.Substring( index, (b.start-index)+1 );
					if( b.end > index )
					{
						index = b.end;
						lastIndex = b.end;
					}
				}
				if( lastIndex < line.Length - 1)
				{
					dLine += line.Substring( lastIndex, line.Length - lastIndex );
				}
				string chainLine = GetChainPart( dLine );
				int periodCount = CountPeriod( chainLine );
				if( periodCount > 3 )
				{
					if( ! m_htMessageChains.ContainsKey( chainLine ) )
					{
						m_htMessageChains[ chainLine ] = new MessageChainComponent( chainLine, periodCount );
					}
					MessageChainComponent comp = (MessageChainComponent)m_htMessageChains[ chainLine ];
					comp.Count++;
				}
			}
		}