Exemple #1
0
 public CPOrchestrator()
 {
     cpServProv = ICPServiceProvider.GetProvider();
     cpServProv.GetService <ICPDebugService>(out debugServ);
     if (debugServ != null)
     {
         debugServ.debugProcCreateCPEvent  += OnProcDebugCreate;
         debugServ.debugProcDestroyCPEvent += OnProcDebugDestroy;
     }
     cpServProv.GetService <ICPExtension>(out extensionServ);
 }
Exemple #2
0
        private void OnProcDebugDestroy(CPProcEvArgs args)
        {
            CPTraceHandler tracer = traceHandlers.FirstOrDefault((h) => (h.id == args.procId));

            if (tracer != null)
            {
                tracer.Dispose();
                traceHandlers.Remove(tracer);
                tracer = null;
                if (traceHandlers.Count == 0)
                {
                    TraceTransport.Close();
                    ICPTracerService traceServ;
                    cpServProv.GetService <ICPTracerService>(out traceServ);
                    traceServ.Show();
                }
            }
        }
        public CPTrackService()
        {
            ICPServiceProvider cpServProv = ICPServiceProvider.GetProvider();
            ICPEventService    cpEvsService;

            cpServProv.GetService <ICPEventService>(out cpEvsService);
            IConstructEvents constrEvents = cpEvsService.GetConstructEvents();

            constrEvents.createdFileCPsEvent += OnFileCPsCreated;
            constrEvents.deletedFileCPsEvent += OnFileCPsDeleted;
        }
Exemple #4
0
        public CPListTWCtrl()
        {
            InitializeComponent();
            this.list.CellDoubleClick  += OnListOnCellDoubleClick;
            this.list.KeyDown          += OnListOnKeyDown;
            this.list.CellValueChanged += OnCellValueChanged;
            this.list.CellMouseUp      += OnCellMouseUp;
            ICPServiceProvider cpServProv = ICPServiceProvider.GetProvider();
            ICPEventService    cpEvsService;

            cpServProv.GetService <ICPEventService>(out cpEvsService);
            IConstructEvents constrEvents = cpEvsService.GetConstructEvents();

            constrEvents.createdLineCPsEvent += OnCreatedLineCPsEvent;
            constrEvents.createdFileCPsEvent += OnCreatedFileCPsEvent;
        }
        public CPTraceHandler(ulong _id, string name)
        {
            id = _id;
            ICPServiceProvider cpServProv = ICPServiceProvider.GetProvider();
            ICPTracerService   traceServ;

            cpServProv.GetService <ICPTracerService>(out traceServ);
            traceServ.RegProcTracer(_id, name, out localProcTracer);

            //Globals.outputWindow.GetPane(Microsoft.VisualStudio.VSConstants.OutputWindowPaneGuid.DebugPane_guid, out outputWindowPane);
            //if (outputWindowPane != null)
            //  outputWindowPane.Activate();
            if (TraceTransport.GetProcTracer(id, out procTracer))
            {
                procTracer.OnRegElem += RegElem;
                procTracer.OnTrace   += Trace;
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ChartPntToggleCmd"/> class.
        /// Adds our command handlers for menu (commands must exist in the command table file)
        /// </summary>
        /// <param name="package">Owner package, not null.</param>
        private ChartPntToggleCmd(Package package)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            this.package = package;
            cpServProv   = ICPServiceProvider.GetProvider();
            cpServProv.GetService <ICPExtension>(out extensionServ);

            OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                var menuCommandID = new CommandID(CommandSet, CommandId);
                var menuItem      = new OleMenuCommand(this.MenuItemCallback, menuCommandID);
                menuItem.BeforeQueryStatus += CheckAvailability;
                commandService.AddCommand(menuItem);
            }
        }