예제 #1
0
 internal LaunchProfiling(IServiceProvider serviceProvider, ProfilingTargetView viewModel)
 {
     _serviceProvider = serviceProvider;
     _viewModel       = viewModel;
     DataContext      = _viewModel;
     InitializeComponent();
 }
예제 #2
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(this);
            var dialog     = new LaunchProfiling(this, targetView);
            var res        = dialog.ShowModal() ?? false;

            if (res && targetView.IsValid)
            {
                var target = targetView.GetTarget();
                if (target != null)
                {
                    ProfileTarget(target);
                }
            }
        }
예제 #3
0
        internal ProfilingTarget OpenTargetProperties()
        {
            var targetView = new ProfilingTargetView(_serviceProvider, _target);
            var dialog     = new LaunchProfiling(_serviceProvider, 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);
        }
예제 #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)
        {
            if (!IsProfilingInstalled())
            {
                MessageBox.Show("Profiling support seems to be missing or corrupt. Try repairing your Visual Studio installation.");
                return;
            }

            var targetView = new ProfilingTargetView(this);
            var dialog     = new LaunchProfiling(this, targetView);
            var res        = dialog.ShowModal() ?? false;

            if (res && targetView.IsValid)
            {
                var target = targetView.GetTarget();
                if (target != null)
                {
                    ProfileTarget(target);
                }
            }
        }
예제 #5
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)
        {
            if (!IsProfilingInstalled())
            {
                MessageBox.Show(Strings.ProfilingSupportMissingError);
                return;
            }

            var targetView = new ProfilingTargetView(this);
            var dialog     = new LaunchProfiling(this, targetView);
            var res        = dialog.ShowModal() ?? false;

            if (res && targetView.IsValid)
            {
                var target = targetView.GetTarget();
                if (target != null)
                {
                    ProfileTarget(target);
                }
            }
        }
예제 #6
0
파일: SessionNode.cs 프로젝트: RussBaz/PTVS
 internal ProfilingTarget OpenTargetProperties() {
     var targetView = new ProfilingTargetView(_serviceProvider, _target);
     var dialog = new LaunchProfiling(_serviceProvider, 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;
 }
예제 #7
0
 public LaunchProfiling(IServiceProvider serviceProvider, ProfilingTargetView viewModel) {
     _serviceProvider = serviceProvider;
     _viewModel = viewModel;
     DataContext = _viewModel;
     InitializeComponent();
 }
예제 #8
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) {
            if (!IsProfilingInstalled()) {
                MessageBox.Show("Profiling support seems to be missing or corrupt. Try repairing your Visual Studio installation.");
                return;
            }

            var targetView = new ProfilingTargetView(this);
            var dialog = new LaunchProfiling(this, targetView);
            var res = dialog.ShowModal() ?? false;
            if (res && targetView.IsValid) {
                var target = targetView.GetTarget();
                if (target != null) {
                    ProfileTarget(target);
                }
            }
        }
예제 #9
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(this);
     var dialog = new LaunchProfiling(this, targetView);
     var res = dialog.ShowModal() ?? false;
     if (res && targetView.IsValid) {
         var target = targetView.GetTarget();
         if (target != null) {
             ProfileTarget(target);
         }
     }
 }