public void SetMasterModule(UIModule module) { SetSelectedModule(module); if( module != null) { module.Disposed += OnDisposedMasterModule; } }
public static void Create(ClrDumpType clrDumpType, UIModule parent, Action<InstancesModule> postInit) { if (clrDumpType == null) { MessageBox.Show("No type selected !", "Error", MessageBoxButtons.OK); return; } UIModuleFactory.CreateModule<TypeInstancesModule>( mod => { mod.UIModuleParent = parent; mod.Setup(clrDumpType); }, mod => postInit(mod) ); }
public static void Create(ClrDump clrDump, IAddressContainer addresses, UIModule parent, Action<InstancesMixedModule> postInit, string name = null) { if (addresses == null) { MessageBox.Show("No instances selected !", "Error", MessageBoxButtons.OK); return; } UIModuleFactory.CreateModule<InstancesMixedModule>( mod => { mod.UIModuleParent = parent; mod.Setup(clrDump, addresses); if (name != null) { mod.Name = name; } }, mod => postInit(mod) ); }
public void Remove(UIModule module) { logger.Debug($"{nameof(Remove)}: {module.Name}"); if( rootModules.Remove(module) ) { logger.Debug($"{nameof(Remove)}: removed root module {module.Name}"); } if(modules.ContainsKey(module) ) { var b = modules.Remove(module); logger.Debug($"{nameof(Remove)}: removed module {module.Name}: {b}"); } var parentChildren = GetChildren(module.UIModuleParent); if( parentChildren != null && parentChildren.Any()) { parentChildren.Remove(module); } }
public void Add(UIModule uiModule) { if (uiModule.UIModuleParent == null) { return; } if (uiModule.UIModuleParent == uiModule) { rootModules.Add(uiModule); } else { List<UIModule> children; if (!modules.TryGetValue(uiModule.UIModuleParent, out children)) { children = new List<UIModule>(); modules[uiModule.UIModuleParent] = children; } children.Add(uiModule); modules[uiModule] = new List<UIModule>(); } }
public override void SetSelectedModule(UIModule module) { selectedModule = module; Enabled = true; }
public void CloseModule(UIModule module) { var children = GetChildren(module); var count = children == null ? 0 : children.Count; logger.Debug($"{nameof(CloseModule)}: {module.Name}, children: {count}"); if (children != null && children.Any()) { foreach (var child in children) { logger.Debug($"RequestCloseModule: Child={child.Name}"); MessageBus.SendMessage(new CloseRequest(child)); } } logger.Debug($"{nameof(CloseModule)}: Remove/Close {module.Name}"); Remove(module); module.Close(); MessageBus.SendMessage(new CloseRequest(module)); }
public SummaryChangedMessage(UIModule module) { Module = module; }
public UIModule() { UIModuleParent = this; }
protected static void DockModule(MessageBus MessageBus, UIModule uiModule, DockState dockState = DockState.Document) { MessageBus.SendMessage(new DockRequest(uiModule, dockState) ); }
protected void DockModule(UIModule uiModule, DockState dockState = DockState.Document) { DockModule(MessageBus, uiModule, dockState); }
public abstract void SetSelectedModule(UIModule module);
public void RequestDockModule(UIModule uiModule, DockState dockState=DockState.Document) { MessageBus.SendMessage(new DockRequest(uiModule, dockState)); }
public DockRequest(UIModule uiModule, DockState dockState = DockState.Document) { UIModule = uiModule; DockState = dockState; }
public ModuleEventMessage(UIModule module, ModuleEventType moduleEvent) { Module = module; ModuleEvent = moduleEvent; }
public CloseRequest(UIModule module) { Module = module; }
public ActivationRequest(UIModule module) { Module = module; }