private void debugModuleButton_Click(object sender, EventArgs e) { VerticalButton vb = sender as VerticalButton; DebugModule debugModule = debugModuleButtonMap[vb]; CurrentDebugModule = debugModule; }
public void UnregisterDebugModule(DebugModule module) { if (debugModules.ContainsKey(module.Name)) { debugModules.Remove(module.Name); module.OnDeactivateDebugModule(); } }
private VerticalButton GetDebugModuleButton(DebugModule module) { foreach (KeyValuePair <VerticalButton, DebugModule> pair in debugModuleButtonMap) { if (pair.Value == module) { return(pair.Key); } } return(null); }
public void RegisterDebugModule(DebugModule module, bool isDefault = false) { if (!debugModules.ContainsKey(module.Name)) { debugModules.Add(module.Name, module); module.OnInitDebugModule(); } if (isDefault) { defaultModule = module; } }
private DebugModule AddDebugModuleButton(DebugModule module) { VerticalButton button = new VerticalButton(); button.BackColor = System.Drawing.Color.White; button.FlatAppearance.BorderSize = 0; button.FlatStyle = System.Windows.Forms.FlatStyle.Flat; button.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); button.ForeColor = System.Drawing.Color.Black; button.Location = new System.Drawing.Point(4, 0); button.Margin = new System.Windows.Forms.Padding(4, 0, 0, 0); button.Name = "timelineLogButton"; button.Size = new System.Drawing.Size(24, 100); button.TabIndex = 1; button.UseVisualStyleBackColor = false; button.VerticalText = module.ModuleName; button.Click += new System.EventHandler(this.debugModuleButton_Click); this.componenFlowLayout.Controls.Add(button); debugModuleButtonMap.Add(button, module); return(module); }