コード例 #1
0
        public LaunchProfiling(ProfilingTargetView viewModel) {
            _viewModel = viewModel;

            InitializeComponent();

            DataContext = _viewModel;
        }
コード例 #2
0
        private void StartPerfAnalysis(object sender, EventArgs e)
        {
            var view = new ProfilingTargetView();

            var         sessions      = ShowPerformanceExplorer().Sessions;
            SessionNode activeSession = sessions.ActiveSession;

            if (activeSession == null ||
                activeSession.Target.ProjectTarget == null ||
                !ProjectTarget.IsSame(activeSession.Target.ProjectTarget, view.Project.GetTarget()))
            {
                // need to create a new session
                var target = new ProfilingTarget()
                {
                    ProjectTarget = view.Project.GetTarget()
                };

                activeSession = AddPerformanceSession(
                    view.Project.Name,
                    target
                    );
            }

            ProfileProjectTarget(activeSession, activeSession.Target.ProjectTarget, true);
        }
コード例 #3
0
        public LaunchProfiling(ProfilingTargetView viewModel)
        {
            _viewModel = viewModel;

            InitializeComponent();

            DataContext = _viewModel;
        }
コード例 #4
0
        /// <summary>
        /// This function is the callback used to execute a command when the a menu item is clicked.
        /// See the Initialize method to see how the menu item is associated to this function using
        /// the OleMenuCommandService service and the MenuCommand class.
        /// </summary>
        private void StartProfilingWizard(object sender, EventArgs e)
        {
            var targetView = new ProfilingTargetView();
            var dialog     = new LaunchProfiling(targetView);
            var res        = dialog.ShowModal() ?? false;

            if (res && targetView.IsValid)
            {
                var target = targetView.GetTarget();
                if (target != null)
                {
                    ProfileTarget(target);
                }
            }
        }
コード例 #5
0
        internal ProfilingTarget OpenTargetProperties()
        {
            var targetView = new ProfilingTargetView(_target);
            var dialog     = new LaunchProfiling(targetView);
            var res        = dialog.ShowModal() ?? false;

            if (res && targetView.IsValid)
            {
                var target = targetView.GetTarget();
                if (target != null && !ProfilingTarget.IsSame(target, _target))
                {
                    _target = target;
                    MarkDirty();
                    return(_target);
                }
            }
            return(null);
        }
コード例 #6
0
 /// <summary>
 /// This function is the callback used to execute a command when the a menu item is clicked.
 /// See the Initialize method to see how the menu item is associated to this function using
 /// the OleMenuCommandService service and the MenuCommand class.
 /// </summary>
 private void StartProfilingWizard(object sender, EventArgs e) {
     var targetView = new ProfilingTargetView();
     var dialog = new LaunchProfiling(targetView);
     var res = dialog.ShowModal() ?? false;
     if (res && targetView.IsValid) {
         var target = targetView.GetTarget();
         if (target != null) {
             ProfileTarget(target);
         }
     }
 }
コード例 #7
0
        private void StartPerfAnalysis(object sender, EventArgs e) {
            var view = new ProfilingTargetView();
            
            var sessions = ShowPerformanceExplorer().Sessions;
            SessionNode activeSession = sessions.ActiveSession;
            if (activeSession == null ||
                activeSession.Target.ProjectTarget == null ||
                !ProjectTarget.IsSame(activeSession.Target.ProjectTarget, view.Project.GetTarget())) {
                // need to create a new session
                    var target = new ProfilingTarget() { ProjectTarget = view.Project.GetTarget() };
                    
                    activeSession = AddPerformanceSession(
                        view.Project.Name, 
                        target
                    );
            }

            ProfileProjectTarget(activeSession, activeSession.Target.ProjectTarget, true);
        }
コード例 #8
0
 internal ProfilingTarget OpenTargetProperties() {
     var targetView = new ProfilingTargetView(_target);
     var dialog = new LaunchProfiling(targetView);
     var res = dialog.ShowModal() ?? false;
     if (res && targetView.IsValid) {
         var target = targetView.GetTarget();
         if (target != null && !ProfilingTarget.IsSame(target, _target)) {
             _target = target;
             MarkDirty();
             return _target;
         }
     }
     return null;
 }