Beispiel #1
0
        public void SelectProcessor(int procNum, int intervalNum)
        {
            SelectedProc = procNum;
            ClearGPUStackView();
            var inter = LoadedStat.Info.inter[intervalNum];

            //---  If there is no GPU return  ---//
            if (inter.proc_times[procNum].gpu_times == null)
            {
                return;
            }

            //---  Init GPU-cards  ---//
            nfloat maxSize = 0;
            int    i       = 1;

            foreach (var gpu in inter.proc_times[procNum].gpu_times)
            {
                var GPUCardController = storyboard.InstantiateControllerWithIdentifier("GPUId") as GPUViewController;
                GPUCardController.LoadView();
                GPUCardController.Init(gpu, i++);
                GPUStackView.AddView(GPUCardController.View, NSStackViewGravity.Top);
                if (GPUCardController.Height > maxSize)
                {
                    maxSize = GPUCardController.Height;
                }
            }

            GPUStackView.SetFrameSize(new CGSize(675, maxSize * inter.proc_times[procNum].num_gpu + 5));

            if (GPUScrollView.Frame.Height < 10)
            {
                PlotSplitView.SetPositionOfDivider(
                    (nfloat)Math.Max(PlotSplitView.Frame.Height - 250,
                                     PlotSplitView.Frame.Height - GPUStackView.Frame.Height), 0);
            }
            //TODO: Скроллить наверх
            //CGPoint newScrollOrigin;
            //if (GPUScrollView.ContentView.IsFlipped)
            //    newScrollOrigin = new CGPoint(0.0, 0.0);
            //else
            //    newScrollOrigin = new CGPoint(0.0, (GPUScrollView.DocumentView as NSView).Frame.Height -
            //                  GPUScrollView.Frame.Height/2 - 50);
            //    //GPUScrollView.ContentView.ScrollToPoint(new CGPoint(0, maxSize * inter.proc_times[procNum].num_gpu - maxSize));
            //GPUScrollView.ContentView.ScrollToPoint(newScrollOrigin);
        }
Beispiel #2
0
 public void DeselectProcessors()
 {
     SelectedProc = -1;
     ClearGPUStackView();
     PlotSplitView.SetPositionOfDivider(PlotSplitView.Frame.Height, 0);
 }
        void ReleaseDesignerOutlets()
        {
            if (LoadStatLabel != null)
            {
                LoadStatLabel.Dispose();
                LoadStatLabel = null;
            }

            if (ChooseLabel != null)
            {
                ChooseLabel.Dispose();
                ChooseLabel = null;
            }

            if (CompareDiagramSelect != null)
            {
                CompareDiagramSelect.Dispose();
                CompareDiagramSelect = null;
            }

            if (CompareIntervalTree != null)
            {
                CompareIntervalTree.Dispose();
                CompareIntervalTree = null;
            }

            if (CompareSort != null)
            {
                CompareSort.Dispose();
                CompareSort = null;
            }

            if (CompareSplitView != null)
            {
                CompareSplitView.Dispose();
                CompareSplitView = null;
            }

            if (GPUPlotView != null)
            {
                GPUPlotView.Dispose();
                GPUPlotView = null;
            }

            if (GPUScrollView != null)
            {
                GPUScrollView.Dispose();
                GPUScrollView = null;
            }

            if (GPUStackView != null)
            {
                GPUStackView.Dispose();
                GPUStackView = null;
            }

            if (InterText != null)
            {
                InterText.Dispose();
                InterText = null;
            }

            if (InterTreePlotView != null)
            {
                InterTreePlotView.Dispose();
                InterTreePlotView = null;
            }

            if (InterTreeSegmentController != null)
            {
                InterTreeSegmentController.Dispose();
                InterTreeSegmentController = null;
            }

            if (InterTreeSplitView != null)
            {
                InterTreeSplitView.Dispose();
                InterTreeSplitView = null;
            }

            if (IntervalCompareButton != null)
            {
                IntervalCompareButton.Dispose();
                IntervalCompareButton = null;
            }

            if (InterView != null)
            {
                InterView.Dispose();
                InterView = null;
            }

            if (PlotSplitView != null)
            {
                PlotSplitView.Dispose();
                PlotSplitView = null;
            }

            if (plotView != null)
            {
                plotView.Dispose();
                plotView = null;
            }

            if (StatPath != null)
            {
                StatPath.Dispose();
                StatPath = null;
            }

            if (StatTableView != null)
            {
                StatTableView.Dispose();
                StatTableView = null;
            }

            if (TableHeader != null)
            {
                TableHeader.Dispose();
                TableHeader = null;
            }

            if (TabView != null)
            {
                TabView.Dispose();
                TabView = null;
            }
        }