Ejemplo n.º 1
0
 public bool MoveNext()
 {
     if (!IsAllExecutionColumnItemEmpty())
     {
         List <TraceRecordCellItem> list = new List <TraceRecordCellItem>();
         DateTime minDateTime            = GetMinDateTime();
         foreach (ExecutionColumnItem executionItem in executionItems)
         {
             if (executionItem.GetTopTraceRecordCellItem() != null && executionItem.GetTopTraceRecordCellItem().CurrentTraceRecord.Time == minDateTime)
             {
                 TraceRecordCellItem topTraceRecordCellItem = executionItem.GetTopTraceRecordCellItem();
                 list.Add(topTraceRecordCellItem);
                 SaveResultTraceRecordCellItem(topTraceRecordCellItem);
                 executionItem.RemoveTopTraceRecordCellItem();
                 if (topTraceRecordCellItem.CurrentTraceRecord.IsTransfer && executionItem.GetTopTraceRecordCellItem() != null && topTraceRecordCellItem.CurrentTraceRecord.TraceID == executionItem.GetTopTraceRecordCellItem().CurrentTraceRecord.TraceID)
                 {
                     TraceRecordCellItem topTraceRecordCellItem2 = executionItem.GetTopTraceRecordCellItem();
                     list.Add(topTraceRecordCellItem2);
                     SaveResultTraceRecordCellItem(topTraceRecordCellItem2);
                     executionItem.RemoveTopTraceRecordCellItem();
                 }
             }
         }
         currentHorzBundRowItem = new HorzBundRowItem(list, executionItems);
         return(true);
     }
     currentHorzBundRowItem = null;
     return(false);
 }
        public HorzBundRowControl(ActivityTraceModeAnalyzer analyzer, HorzBundRowItem rowItem, IWindowlessControlContainer parentContainer, Point location, IErrorReport errorReport)
            : base(5, parentContainer.GetCurrentScale(), parentContainer, location, errorReport)
        {
            base.BackColor = defaultBackColor;
            currentRowItem = rowItem;
            int width = GetTimeBoxSize(base.Scale).Width;

            width += GetDefaultBlank(base.Scale);
            int num = 0;

            foreach (ExecutionColumnItem executionColumnItem in analyzer.ExecutionColumnItems)
            {
                ExecutionCellControl item = new ExecutionCellControl(analyzer, executionColumnItem, rowItem, base.Container, new Point(width, base.Location.Y), this, base.ErrorReport);
                base.ChildControls.Add(item);
                width += ExecutionCellControl.GetControlSize(base.Scale, executionColumnItem.ActivityColumnCount).Width + GetDefaultBlock(base.Scale);
                num++;
            }
            base.FontSize = GetFontSize(base.Scale);
            base.Size     = new Size(width - GetDefaultBlock(base.Scale), GetTimeBoxSize(base.Scale).Height);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
 public void Reset()
 {
     currentHorzBundRowItem = null;
 }