Inheritance: System.Windows.Forms.UserControl
 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)
         );
 }
Example #4
0
        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);
            }
        }
Example #5
0
        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;
 }
Example #7
0
        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;
 }
Example #9
0
 public UIModule()
 {
     UIModuleParent = this;
 }
Example #10
0
 protected static void DockModule(MessageBus MessageBus, UIModule uiModule, DockState dockState = DockState.Document)
 {
     MessageBus.SendMessage(new DockRequest(uiModule, dockState) );
 }
Example #11
0
 protected void DockModule(UIModule uiModule, DockState dockState = DockState.Document)
 {
     DockModule(MessageBus, uiModule, dockState);
 }
Example #12
0
 public abstract void SetSelectedModule(UIModule module);
Example #13
0
 public void RequestDockModule(UIModule uiModule, DockState dockState=DockState.Document)
 {
     MessageBus.SendMessage(new DockRequest(uiModule, dockState));
 }
Example #14
0
 public DockRequest(UIModule uiModule, DockState dockState = DockState.Document)
 {
     UIModule = uiModule;
     DockState = dockState;
 }
 public ModuleEventMessage(UIModule module, ModuleEventType moduleEvent)
 {
     Module = module;
     ModuleEvent = moduleEvent;
 }
Example #16
0
 public CloseRequest(UIModule module)
 {
     Module = module;
 }
Example #17
0
 public ActivationRequest(UIModule module)
 {
     Module = module;
 }