private void processAdded(object sender, CollectionItemEventArgs <Process> e) { if (Process.DebugMode == DebugModeFlag.Enc) { managers.Add(e.Item, new EnCManager(e.Item)); } }
private void Entities_EntityRemoved(Entity entity, CollectionItemEventArgs <Entity> e) { if (entity.GivesOffLight) { DirtyLighting(); } }
/// <summary> /// Callback for adding any module to debugged process. /// </summary> /// <param name="sender">Paramters for callback, not used here.</param> /// <param name="args">Arguments with description of module.</param> public void ProcessModuleAdded(object sender, CollectionItemEventArgs <Module> args) { if (resource.TryToCatchModule(args.Item)) { eventCreator.Attach(); } }
protected override void RemoveItem(int index) { var item = this[index]; var args = new CollectionItemEventArgs <T>(item); OnItemRemoving(args); base.RemoveItem(index); OnItemRemoved(args); OnChanged(); }
private void processRemoved(object sender, CollectionItemEventArgs <Process> e) { EnCManager manager; if (managers.TryGetValue(e.Item, out manager)) { manager.StopEnC(); } managers.Remove(e.Item); }
protected override void InsertItem(int index, T item) { ValidateItem(item); var args = new CollectionItemEventArgs <T>(item); OnItemAdding(args); base.InsertItem(index, item); OnItemAdded(args); OnChanged(); }
void debugger_ProcessStarted(object sender, CollectionItemEventArgs <Process> e) { if (debugger.Processes.Count == 1) { if (DebugEvent != null) { DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.Started)); } } e.Item.LogMessage += LogMessage; }
void process_Modules_Added(object sender, CollectionItemEventArgs <Module> e) { if (ProjectService.OpenSolution == null) { return; } ProjectService.OpenSolution.Projects .Where(p => e.Item.Name.IndexOf(p.Name) >= 0) .ForEach(p => e.Item.LoadSymbolsFromDisk(new [] { Path.GetDirectoryName(p.OutputAssemblyFullPath) })); }
void debugger_ProcessStarted(object sender, CollectionItemEventArgs <Process> e) { if (debugger.Processes.Count == 1) { if (DebugStarted != null) { DebugStarted(this, EventArgs.Empty); } } e.Item.LogMessage += LogMessage; }
void debugger_ProcessExited(object sender, CollectionItemEventArgs <Process> e) { if (debugger.Processes.Count == 0) { SelectProcess(null, e); } else { SelectProcess(debugger.Processes[0]); } }
void debugger_ProcessExited(object sender, CollectionItemEventArgs <Process> e) { if (debugger.Processes.Count == 0) { if (DebugStopped != null) { DebugStopped(this, e); } SelectProcess(null); } else { SelectProcess(debugger.Processes[0]); } }
protected override void SetItem(int index, T item) { ValidateItem(item); var oldItem = this[index]; var removeArgs = new CollectionItemEventArgs <T>(oldItem); OnItemRemoving(removeArgs); var addArgs = new CollectionItemEventArgs <T>(item); OnItemAdding(addArgs); base.SetItem(index, item); OnItemRemoved(removeArgs); OnItemAdded(addArgs); OnChanged(); }
public void SelectProcess(Process process, CollectionItemEventArgs <Process> e = null) { if (debuggedProcess != null) { debuggedProcess.Paused -= debuggedProcess_DebuggingPaused; debuggedProcess.ExceptionThrown -= debuggedProcess_ExceptionThrown; debuggedProcess.Resumed -= debuggedProcess_DebuggingResumed; debuggedProcess.ModulesAdded -= debuggedProcess_ModulesAdded; } debuggedProcess = process; if (debuggedProcess != null) { debuggedProcess.Paused += debuggedProcess_DebuggingPaused; debuggedProcess.ExceptionThrown += debuggedProcess_ExceptionThrown; debuggedProcess.Resumed += debuggedProcess_DebuggingResumed; debuggedProcess.ModulesAdded += debuggedProcess_ModulesAdded; debuggedProcess.BreakAtBeginning = BreakAtBeginning; if (DebugEvent != null) { DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.ProcessSelected)); } } else { if (DebugEvent != null) { DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.ProcessSelected)); } if (DebugEvent != null) { DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.Stopped)); } } BreakAtBeginning = false; }
private void OnRowAdded(object sender, CollectionItemEventArgs<DynamicListRow> e) { e.Item.HeightChanged += new EventHandler(this.RowHeightChanged); e.Item.ItemChanged += new EventHandler(this.RowItemChanged); if (base.Visible && (base.Parent != null)) { e.Item.NotifyListVisibilityChange(this, true); } }
protected void OnItemAdding(CollectionItemEventArgs <T> args) { Fire(ItemAdding, args); }
private void OnColumnRemoved(object sender, CollectionItemEventArgs<DynamicListColumn> e) { e.Item.MinimumWidthChanged -= new EventHandler(this.ColumnMinimumWidthChanged); e.Item.WidthChanged -= new EventHandler(this.ColumnWidthChanged); this.RecalculateColumnWidths(); }
void debugger_ProcessStarted(object sender, CollectionItemEventArgs<Process> e) { e.Item.Threads.Added += delegate(object sender2, CollectionItemEventArgs<Thread> f) { ObjectDump("ThreadStartedEvent", f.Item); }; }
void debugger_ProcessStarted(object sender, CollectionItemEventArgs<Process> e) { if (debugger.Processes.Count == 1) { if (DebugStarted != null) { DebugStarted(this, EventArgs.Empty); } } e.Item.LogMessage += LogMessage; }
void OnRowAdded(object sender, CollectionItemEventArgs<DynamicListRow> e) { e.Item.HeightChanged += RowHeightChanged; e.Item.ItemChanged += RowItemChanged; if (Visible && Parent != null) e.Item.NotifyListVisibilityChange(this, true); }
void debuggedProcess_ThreadStarted(object sender, CollectionItemEventArgs <Thread> e) { AddThread(e.Item); }
void debuggedProcess_ModuleUnloaded(object sender, CollectionItemEventArgs<Module> e) { RemoveModule(e.Item); }
/// <summary> /// Callback for adding any module to debugged process. /// </summary> /// <param name="sender">Paramters for callback, not used here.</param> /// <param name="args">Arguments with description of module.</param> public void ProcessModuleAdded(object sender, CollectionItemEventArgs<Module> args) { if (resource.TryToCatchModule(args.Item)) eventCreator.Attach(); }
public void SelectProcess(Process process, CollectionItemEventArgs<Process> e = null) { if (debuggedProcess != null) { debuggedProcess.Paused -= debuggedProcess_DebuggingPaused; debuggedProcess.ExceptionThrown -= debuggedProcess_ExceptionThrown; debuggedProcess.Resumed -= debuggedProcess_DebuggingResumed; debuggedProcess.ModulesAdded -= debuggedProcess_ModulesAdded; } debuggedProcess = process; if (debuggedProcess != null) { debuggedProcess.Paused += debuggedProcess_DebuggingPaused; debuggedProcess.ExceptionThrown += debuggedProcess_ExceptionThrown; debuggedProcess.Resumed += debuggedProcess_DebuggingResumed; debuggedProcess.ModulesAdded += debuggedProcess_ModulesAdded; debuggedProcess.BreakAtBeginning = BreakAtBeginning; if (DebugEvent != null) DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.ProcessSelected)); } else { if (DebugEvent != null) DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.ProcessSelected)); if (DebugEvent != null) DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.Stopped)); } BreakAtBeginning = false; }
void debuggedProcess_ThreadStarted(object sender, CollectionItemEventArgs<Thread> e) { AddThread(e.Item); }
void debugger_ProcessStarted(object sender, CollectionItemEventArgs <Process> e) { e.Item.Threads.Added += delegate(object sender2, CollectionItemEventArgs <Thread> f) { ObjectDump("ThreadStartedEvent", f.Item); }; }
void debugger_ProcessExited(object sender, CollectionItemEventArgs<Process> e) { if (debugger.Processes.Count == 0) { SelectProcess(null, e); } else { SelectProcess(debugger.Processes[0]); } }
void debugger_ProcessStarted(object sender, CollectionItemEventArgs<Process> e) { if (debugger.Processes.Count == 1) { if (DebugEvent != null) DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.Started)); } e.Item.LogMessage += LogMessage; }
private void OnRowRemoved(object sender, CollectionItemEventArgs<DynamicListRow> e) { e.Item.HeightChanged -= new EventHandler(this.RowHeightChanged); e.Item.ItemChanged -= new EventHandler(this.RowItemChanged); if (base.Visible) { e.Item.NotifyListVisibilityChange(this, false); } }
void debuggedProcess_ModuleLoaded(object sender, CollectionItemEventArgs <Module> e) { AddModule(e.Item); }
void OnColumnRemoved(object sender, CollectionItemEventArgs<DynamicListColumn> e) { e.Item.MinimumWidthChanged -= ColumnMinimumWidthChanged; e.Item.WidthChanged -= ColumnWidthChanged; RecalculateColumnWidths(); }
void debuggedProcess_ModuleUnloaded(object sender, CollectionItemEventArgs <Module> e) { RemoveModule(e.Item); }
void OnRowRemoved(object sender, CollectionItemEventArgs<DynamicListRow> e) { e.Item.HeightChanged -= RowHeightChanged; e.Item.ItemChanged -= RowItemChanged; if (Visible) e.Item.NotifyListVisibilityChange(this, false); }
void debuggedProcess_ModuleLoaded(object sender, CollectionItemEventArgs<Module> e) { AddModule(e.Item); }
private static void HandleItemAdded(IHCollection <string> sender, CollectionItemEventArgs <string> args) { var state = (EventState)args.State; Interlocked.Increment(ref state.EventsCount); }
private void processAdded(object sender, CollectionItemEventArgs<Process> e) { if(Process.DebugMode == DebugModeFlag.Enc){ managers.Add(e.Item,new EnCManager(e.Item)); } }
void process_Modules_Added(object sender, CollectionItemEventArgs<Module> e) { if (ProjectService.OpenSolution == null) return; ProjectService.OpenSolution.Projects .Where(p => e.Item.Name.IndexOf(p.Name) >= 0) .ForEach(p => e.Item.LoadSymbolsFromDisk(new []{ Path.GetDirectoryName(p.OutputAssemblyFullPath) })); }
private void processRemoved(object sender, CollectionItemEventArgs<Process> e) { EnCManager manager; if(managers.TryGetValue(e.Item,out manager)){ manager.StopEnC(); } managers.Remove(e.Item); }
void debugger_ProcessExited(object sender, CollectionItemEventArgs<Process> e) { if (debugger.Processes.Count == 0) { if (DebugStopped != null) { DebugStopped(this, e); } SelectProcess(null); } else { SelectProcess(debugger.Processes[0]); } }
protected void OnItemRemoved(CollectionItemEventArgs <T> args) { Fire(ItemRemoved, args); }
private void OnModulesAdded(object sender, CollectionItemEventArgs<Module> e) { if (BreakAtBeginning) { if (e.Item.SymReader == null) return; // No symbols try { // create a BP at entry point uint entryPoint = e.Item.SymReader.GetUserEntryPoint(); if (entryPoint == 0) return; // no EP var mainFunction = e.Item.CorModule.GetFunctionFromToken(entryPoint); var corBreakpoint = mainFunction.CreateBreakpoint(); corBreakpoint.Activate(1); // create a SD BP var breakpoint = new Breakpoint(this.debugger, corBreakpoint); this.debugger.Breakpoints.Add(breakpoint); breakpoint.Hit += delegate { if (breakpoint != null) breakpoint.Remove(); breakpoint = null; }; } catch { // the app does not have an entry point - COM exception } BreakAtBeginning = false; } }
private Unit Switch(CollectionItemEventArgs args) { switch (args) { case { EventType: EventType.Add } :