コード例 #1
0
ファイル: AllocationForm.cs プロジェクト: dakahler/alloclave
 public AllocationForm(Diff diff, int startWidth)
     : this()
 {
     Diff = diff;
     RenderManager.Rebuild(Diff.Difference, startWidth);
     SetupScroller(new History(diff.Difference));
 }
コード例 #2
0
ファイル: Profile.cs プロジェクト: dakahler/alloclave
 internal void RemoveDiff(Diff diff)
 {
     Diffs.Remove(diff);
 }
コード例 #3
0
ファイル: Main.cs プロジェクト: dakahler/alloclave
        void MainScrubber_DoubleClick(object sender, EventArgs e)
        {
            // React to double click based on current diff state
            if (CurrentDiff == null || CurrentDiff.Difference != null)
            {
                // Start a new diff
                CurrentDiff = new Diff();
                CurrentDiff.SetLeft(TransportForm.Profile.History.Snapshot);
                TransportForm.AllocationForm.DiffMarkers.SetDiff1((float)TransportForm.AllocationForm.MainScrubber._Position);
            }
            else if (CurrentDiff.Difference == null)
            {
                // Complete the diff
                CurrentDiff.SetRight(TransportForm.Profile.History.Snapshot);
                TransportForm.AllocationForm.DiffMarkers.SetDiff2((float)TransportForm.AllocationForm.MainScrubber._Position);
                AddDiffTab(CurrentDiff);

                // TODO: Remove diff on tab close
                TransportForm.Profile.AddDiff(CurrentDiff);

                if (Licensing.IsTrial && !SentDiffNag)
                {
                    MessagesForm.Add(MessagesForm.MessageType.Info, null,
                                    "Find your leak? Support Alloclave and purchase a license!");

                    SentDiffNag = true;
                }
            }
        }
コード例 #4
0
ファイル: Profile.cs プロジェクト: dakahler/alloclave
 internal void AddDiff(Diff diff)
 {
     Diffs.Add(diff);
 }
コード例 #5
0
ファイル: Main.cs プロジェクト: dakahler/alloclave
 private void AddDiffTab(Diff diff)
 {
     AllocationForm allocationForm = new AllocationForm(diff, TransportForm.AllocationForm.AddressSpaceControl.Width);
     allocationForm.Text = "Diff";
     allocationForm.ControllerContainer.Controls.Remove(allocationForm.MainScrubber);
     DiffButtons diffButtons = new DiffButtons();
     diffButtons.StartLabel.Click += (_, __) => allocationForm.SetDiffMode(AllocationForm.DiffMode.Left);
     diffButtons.DifferenceLabel.Click += (_, __) => allocationForm.SetDiffMode(AllocationForm.DiffMode.Middle);
     diffButtons.EndLabel.Click += (_, __) => allocationForm.SetDiffMode(AllocationForm.DiffMode.Right);
     allocationForm.ControllerContainer.Controls.Add(diffButtons);
     allocationForm.AddressSpaceControl.SnapshotOverride = diff.Difference;
     TransportForm.AddTab(allocationForm);
 }