void ZoomInScale(double zoomFraction)
        {
            if (zoomFraction > 0.0001 && zoomFraction < 1000.0)
            {
                double range = (XShowEndTime.getDoubleValue() - XShowBeginTime.getDoubleValue()) * zoomFraction / 2.0;

                XShowBeginTime = XShowBeginTime + Convert.ToInt64(range);
                XShowEndTime   = XShowEndTime - Convert.ToInt64(range);
                canvasTimeLine.Children.Clear();
                Marks.Clear();
                ll.Clear();
                ShowXUnit();
                foreach (Panel p in SynchronizationPanelList)
                {
                    //Canvas.SetLeft(p, Canvas.GetLeft(p) * (1+zoomFraction/2));
                    //p.Width = p.Width * (1 + zoomFraction);
                    foreach (FrameworkElement u in p.Children)
                    {
                        if (u is ITimeLineControl)
                        {
                            SynchronizationControl(u as ITimeLineControl);
                        }
                        //Canvas.SetLeft(u, Canvas.GetLeft(u) * (1 + zoomFraction/2));
                        //u.Width = u.Width * (1 + zoomFraction);
                    }
                }
            }
        }
        public void ShowXUnit()
        {
            Marks.Clear();
            canvasTimeLine.Children.Clear();
            maxDimention     = LynxTime.getMaxCrossUnit(XShowBeginTime, XShowEndTime);
            FirstTopUnitTime = XShowBeginTime.getPastTime(maxDimention);
            LastTopUnitTime  = XShowEndTime.getNextTime(maxDimention);
            TimeUnitNum      = LynxTime.getUnitNum(FirstTopUnitTime, LastTopUnitTime, maxDimention);
            long     stepUnitNum = Convert.ToInt64(Math.Ceiling(TimeUnitNum / (double)SubNum));
            LynxTime pastTime    = FirstTopUnitTime;

            ShowLabel(FirstTopUnitTime, maxDimention);
            for (int i = 1; i < SubNum; i++)
            {
                LynxTime lt = new LynxTime(FirstTopUnitTime);
                lt.AddTimeSpan(stepUnitNum * i, maxDimention);

                ShowLabel(lt, maxDimention);
                LastTopUnitTime = lt;
                double w = getLynxTimeWidth(pastTime, lt);
                if (w > MinSpace)
                {
                    ShowXUnit(pastTime, lt, LynxTime.getLowTimeDim(maxDimention));
                }
                pastTime = lt;
            }
            ShowLabel(LastTopUnitTime, maxDimention);
            //LastTopUnitTime = FirstTopUnitTime + (LastTopUnitTime)XShowEndTime.getNextTime(maxDimention);
            //ShowXUnit(XShowBeginTime, XShowEndTime, canvasTimeLine.Width);
        }
 public void SetMarks(List <KVPBase> data)
 {
     data = data.OrderBy(p => p.Name).ToList();
     Marks.Clear();
     foreach (var item in data)
     {
         Marks.Add(item);
     }
 }
Exemple #4
0
 public void SetMarks(List <KVPBase> data)
 {
     data = data.OrderBy(p => p.Name).ToList();
     Marks.Clear();
     data.ForEach(o => Marks.Add(o));
     if (LoadMarksComplete != null)
     {
         LoadMarksComplete(this, new EventArgs());
     }
 }
        public List <PipelineStagePropagation>?GetTopologySorted(IEnumerable <IPipelineStage> initial)
        {
            Marks.Clear();
            var result = new List <PipelineStagePropagation>();

            foreach (var n in initial)
            {
                if (Visit(n, result))
                {
                    return(null);
                }
            }

            result.Reverse();
            return(result);
        }
Exemple #6
0
 private void ClearLists()
 {
     Marks.Clear(); Models.Clear();
     EngineTypes.Clear(); EngineVolumes.Clear(); BodyTypes.Clear(); TransTypes.Clear();
 }