예제 #1
0
        protected override void Run(object ob)
        {
            profiler = (IProfiler)ob;

            Solution sol = IdeApp.ProjectOperations.CurrentSelectedSolution;

            if (sol != null)
            {
                IAsyncOperation op = IdeApp.ProjectOperations.Build(sol);
                op.Completed += delegate {
                    if (op.Success)
                    {
                        ProfilingOperations.Profile(profiler, sol);
                    }
                };
            }
            else
            {
                doc = IdeApp.Workbench.ActiveDocument;
                if (doc != null)
                {
                    IAsyncOperation op = doc.Build();
                    op.Completed += new OperationHandler(ExecuteFile);
                }
            }
        }
예제 #2
0
        protected override void Run()
        {
            SelectProcessDialog dlg = new SelectProcessDialog();

            if (dlg.Run() == (int)ResponseType.Ok)
            {
                IProfiler profiler = dlg.Profiler;
                Process   process  = dlg.Process;

                ProfilingOperations.ProfileProcess(profiler, process);
            }
            dlg.Destroy();
        }
예제 #3
0
        protected override void Run()
        {
            SelectExecutableDialog dlg = new SelectExecutableDialog();

            if (dlg.Run() == (int)ResponseType.Ok)
            {
                IProfiler profiler   = dlg.Profiler;
                string    executable = dlg.Executable;
                string    arguments  = dlg.Arguments;
                string    workingDir = Path.GetDirectoryName(executable);

                ProfilingOperations.ProfileApplication(profiler, executable, workingDir, arguments);
            }
            dlg.Destroy();
        }