internal void PushExecutionColumnItem(ExecutionColumnItem item)
 {
     if (!executionItemOrder.Contains(item.CurrentExecutionInfo.ExecutionID))
     {
         executionItemOrder.AddLast(item.CurrentExecutionInfo.ExecutionID);
     }
 }
示例#2
0
 public ActivityColumnItem(Activity activity, ExecutionColumnItem item, int index, ActivityTraceModeAnalyzer analyzer)
 {
     currentActivity = activity;
     executionItem   = item;
     itemIndex       = index;
     this.analyzer   = analyzer;
 }
示例#3
0
        public ExecutionCellControl(ActivityTraceModeAnalyzer analyzer, ExecutionColumnItem currentExecutionColumn, HorzBundRowItem rowItem, IWindowlessControlContainer parentContainer, Point location, HorzBundRowControl horzBundRowCtrl, IErrorReport errorReport)
            : base(4, parentContainer.GetCurrentScale(), parentContainer, location, errorReport)
        {
            int i   = 0;
            int num = base.Location.X + GetDefaultBlank(base.Scale);
            Dictionary <int, TraceRecordCellItem> dictionary = new Dictionary <int, TraceRecordCellItem>();

            currentExecutionColumnItem = currentExecutionColumn;
            this.horzBundRowCtrl       = horzBundRowCtrl;
            base.Size      = GetControlSize(base.Scale, currentExecutionColumn.ActivityColumnCount);
            base.BackColor = defaultBackColor;
            foreach (TraceRecordCellItem traceRecordCellItem in rowItem.TraceRecordCellItems)
            {
                if (traceRecordCellItem.RelatedExecutionItem == currentExecutionColumn && !dictionary.ContainsKey(traceRecordCellItem.RelatedActivityItem.ItemIndex))
                {
                    dictionary.Add(traceRecordCellItem.RelatedActivityItem.ItemIndex, traceRecordCellItem);
                }
            }
            for (; i < currentExecutionColumn.ActivityColumnCount; i++)
            {
                if (dictionary.ContainsKey(i))
                {
                    TraceRecordCellControl traceRecordCellControl = new TraceRecordCellControl(dictionary[i], base.Container, new Point(num, base.Location.Y), currentExecutionColumn[i], this, base.ErrorReport);
                    base.ChildControls.Add(traceRecordCellControl);
                    if (dictionary[i].IsParentTransferTrace)
                    {
                        bool  isToLeft = (dictionary[i].RelatedActivityItem.ItemIndex >= dictionary[i].RelatedTraceRecordCellItem.RelatedActivityItem.ItemIndex) ? true : false;
                        Point interActivityConnectionPoint = GetInterActivityConnectionPoint(base.Container.GetCurrentScale(), isToLeft, traceRecordCellControl.Location);
                        ActivityTransferCellControl item   = new ActivityTransferCellControl(dictionary[i], base.Container, interActivityConnectionPoint, base.ErrorReport);
                        base.ChildControls.Add(item);
                    }
                }
                else if (currentExecutionColumn[i].WithinActivityBoundary)
                {
                    TraceRecordCellControl item2 = new TraceRecordCellControl(null, base.Container, new Point(num, base.Location.Y), currentExecutionColumn[i], this, base.ErrorReport);
                    base.ChildControls.Add(item2);
                }
                num += TraceRecordCellControl.GetControlSize(base.Scale).Width + GetDefaultBlock(base.Scale);
            }
            if (CurrentExecutionColumnItem.Analyzer.AllInvolvedExecutionItems.Count > 1)
            {
                contextMenuStrip = new ContextMenuStrip();
                ToolStripMenuItem value = new ToolStripMenuItem(SR.GetString("SL_HideProcess"));
                contextMenuStrip.Click += menuItem_Click;
                contextMenuStrip.Items.Add(value);
                disposedControls.Add(contextMenuStrip);
            }
        }
示例#4
0
 private void ProcessListItem_Click(object sender, EventArgs e)
 {
     if (sender != null && sender is ToolStripMenuItem && ((ToolStripMenuItem)sender).Tag != null && ((ToolStripMenuItem)sender).Tag is ExecutionColumnItem)
     {
         ExecutionColumnItem executionColumnItem = (ExecutionColumnItem)((ToolStripMenuItem)sender).Tag;
         if (currentAnalyzer != null)
         {
             ActivityTraceModeAnalyzerParameters activityTraceModeAnalyzerParameters = currentAnalyzer.Parameters;
             activityTraceModeAnalyzerParameters = ((activityTraceModeAnalyzerParameters != null) ? new ActivityTraceModeAnalyzerParameters(activityTraceModeAnalyzerParameters) : new ActivityTraceModeAnalyzerParameters());
             ((ToolStripMenuItem)sender).Checked = !((ToolStripMenuItem)sender).Checked;
             if (((ToolStripMenuItem)sender).Checked)
             {
                 activityTraceModeAnalyzerParameters.RemoveSuppressedExecution(executionColumnItem.CurrentExecutionInfo);
             }
             else
             {
                 activityTraceModeAnalyzerParameters.AppendSuppressedExecution(executionColumnItem.CurrentExecutionInfo);
             }
             base.Container.AnalysisActivityInTraceMode(currentAnalyzer.ActiveActivity, null, activityTraceModeAnalyzerParameters);
         }
     }
 }
 public MessageExchangeCellControl(IWindowlessControlContainer parentContainer, MessageExchangeCellItem item, IErrorReport errorReport)
     : base(3, parentContainer.GetCurrentScale(), parentContainer, new Point(0, 0), errorReport)
 {
     if (item != null && item.SentTraceRecordCellItem != null && item.ReceiveTraceRecordCellItem != null)
     {
         WindowlessControlBase windowlessControlBase  = base.Container.FindWindowlessControl(item.SentTraceRecordCellItem);
         WindowlessControlBase windowlessControlBase2 = base.Container.FindWindowlessControl(item.ReceiveTraceRecordCellItem);
         if (windowlessControlBase != null && windowlessControlBase2 != null && windowlessControlBase is TraceRecordCellControl && windowlessControlBase2 is TraceRecordCellControl)
         {
             sendExecutionColumnItem    = item.SentExecutionColumnItem;
             receiveExecutionColumnItem = item.ReceiveExecutionColumnItem;
             loggedMessageItems         = item.RelatedMessageTraceCellItems;
             isToArrow         = (sendExecutionColumnItem.ItemIndex < receiveExecutionColumnItem.ItemIndex);
             isInSameExecution = (sendExecutionColumnItem.ItemIndex == receiveExecutionColumnItem.ItemIndex);
             InitializeRedrawData((TraceRecordCellControl)windowlessControlBase, (TraceRecordCellControl)windowlessControlBase2);
             relatedControls.Add(windowlessControlBase);
             relatedControls.Add(windowlessControlBase2);
             if (loggedMessageItems != null && loggedMessageItems.Count != 0)
             {
                 foreach (TraceRecordCellItem loggedMessageItem in loggedMessageItems)
                 {
                     WindowlessControlBase windowlessControlBase3 = base.Container.FindWindowlessControl(loggedMessageItem);
                     if (windowlessControlBase3 != null && windowlessControlBase3 is TraceRecordCellControl)
                     {
                         relatedControls.Add(windowlessControlBase3);
                     }
                 }
             }
             relatedControls.Add(this);
             foreach (WindowlessControlBase relatedControl in relatedControls)
             {
                 if (relatedControl is TraceRecordCellControl)
                 {
                     AddRelatedControlsForTraceRecord((TraceRecordCellControl)relatedControl, relatedControls);
                 }
             }
         }
     }
 }
示例#6
0
        private void SortResults()
        {
            Dictionary <int, List <TraceRecord> > dictionary  = new Dictionary <int, List <TraceRecord> >();
            Dictionary <int, List <TraceRecord> > dictionary2 = new Dictionary <int, List <TraceRecord> >();
            long          num           = 0L;
            ExecutionInfo executionInfo = null;
            DateTime      t             = DateTime.MaxValue;

            foreach (TraceRecord value in results.Values)
            {
                if (Parameters == null || !Parameters.SuppressedExecutions.ContainsKey(value.Execution.ExecutionID))
                {
                    num += value.TraceID;
                }
                if (value.Time < t)
                {
                    executionInfo = value.Execution;
                    t             = value.Time;
                }
                if (!dictionary.ContainsKey(value.Execution.ExecutionID))
                {
                    dictionary.Add(value.Execution.ExecutionID, new List <TraceRecord>());
                }
                dictionary[value.Execution.ExecutionID].Add(value);
            }
            renderingHashCode = (int)num;
            SortedList <TraceRecord, int> sortedList = new SortedList <TraceRecord, int>(new TraceRecordComparer());

            foreach (int key in dictionary.Keys)
            {
                sortedList.Add(dictionary[key][0], key);
            }
            for (int i = 0; i < sortedList.Count; i++)
            {
                dictionary2.Add(sortedList.Values[i], dictionary[sortedList.Values[i]]);
            }
            int num2 = (executionInfo != null) ? 1 : 0;
            Queue <ExecutionColumnItem> queue = new Queue <ExecutionColumnItem>();
            ExecutionColumnItem         executionColumnItem = null;

            foreach (int key2 in dictionary2.Keys)
            {
                dictionary2[key2].Sort(new TraceRecordComparer());
                ExecutionColumnItem executionColumnItem2 = null;
                if (executionInfo == null)
                {
                    executionColumnItem2 = new ExecutionColumnItem(dictionary2[key2][0].Execution, ActiveActivity, AllActivities, num2++, suppressedActivityIds, this);
                    queue.Enqueue(executionColumnItem2);
                }
                else
                {
                    executionColumnItem2 = new ExecutionColumnItem(dictionary2[key2][0].Execution, ActiveActivity, AllActivities, (executionInfo.ExecutionID != dictionary2[key2][0].Execution.ExecutionID) ? num2++ : 0, suppressedActivityIds, this);
                    if (executionInfo.ExecutionID == dictionary2[key2][0].Execution.ExecutionID)
                    {
                        executionColumnItem = executionColumnItem2;
                    }
                    else
                    {
                        queue.Enqueue(executionColumnItem2);
                    }
                }
                foreach (TraceRecord item in dictionary2[key2])
                {
                    TraceRecordCellItem traceRecordCellItem = executionColumnItem2.AppendTraceRecord(item);
                    if (traceRecordCellItem != null && (traceRecordCellItem.CurrentTraceRecord.IsMessageSentRecord || traceRecordCellItem.CurrentTraceRecord.IsMessageReceivedRecord || traceRecordCellItem.CurrentTraceRecord.IsMessageLogged))
                    {
                        messageRelatedItems.Add(traceRecordCellItem);
                    }
                }
            }
            if (parameters == null)
            {
                parameters = new ActivityTraceModeAnalyzerParameters();
            }
            if (executionColumnItem != null && executionColumnItem.ActivityColumnCount != 0)
            {
                if (!Parameters.SuppressedExecutions.ContainsKey(executionColumnItem.CurrentExecutionInfo.ExecutionID))
                {
                    executionItems.Add(executionColumnItem);
                }
                allInvolvedExecutionItems.Add(executionColumnItem);
                Parameters.PushExecutionColumnItem(executionColumnItem);
            }
            while (queue.Count != 0)
            {
                ExecutionColumnItem executionColumnItem3 = queue.Dequeue();
                if (executionColumnItem3.ActivityColumnCount != 0)
                {
                    if (!Parameters.SuppressedExecutions.ContainsKey(executionColumnItem3.CurrentExecutionInfo.ExecutionID))
                    {
                        executionItems.Add(executionColumnItem3);
                    }
                    allInvolvedExecutionItems.Add(executionColumnItem3);
                    parameters.PushExecutionColumnItem(executionColumnItem3);
                }
            }
            Parameters.ReorderExecutionColumnItems(executionItems);
            AnalyzeCrossExecutionMessageExchange();
            AnalyzePairedActivities();
        }