public void ActivatePad(PadDescriptor padContent) { if ((padContent != null) && this.contentHash.ContainsKey(padContent.Class)) { this.contentHash[padContent.Class].Show(); } }
public MyMenuItem(PadDescriptor padDescriptor) : base((string) null, (EventHandler) null) { this.padDescriptor = padDescriptor; this.Text = SkyMap.Net.Core.StringParser.Parse(padDescriptor.Title); if (!string.IsNullOrEmpty(padDescriptor.Icon)) { base.Image = IconService.GetBitmap(padDescriptor.Icon); } if (!string.IsNullOrEmpty(padDescriptor.Shortcut)) { base.ShortcutKeys = MenuCommand.ParseShortcut(padDescriptor.Shortcut); } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing && (this.padDescriptor != null)) { this.padDescriptor.Dispose(); this.padDescriptor = null; } }
public PadContentWrapper(PadDescriptor padDescriptor) { if (padDescriptor == null) { throw new ArgumentNullException("padDescriptor"); } this.padDescriptor = padDescriptor; base.DockAreas = DockAreas.DockBottom | DockAreas.DockTop | DockAreas.DockRight | DockAreas.DockLeft | DockAreas.Float; base.HideOnClose = true; }
public void DetachContent() { base.Controls.Clear(); this.padDescriptor = null; }
private PadContentWrapper CreateContent(PadDescriptor content) { if (this.contentHash.ContainsKey(content.Class)) { return this.contentHash[content.Class]; } Properties properties = PropertyService.Get<Properties>("Workspace.ViewMementos", new Properties()); PadContentWrapper wrapper = new PadContentWrapper(content); if (!string.IsNullOrEmpty(content.Icon)) { wrapper.Icon = IconService.GetIcon(content.Icon); } wrapper.Text = SkyMap.Net.Core.StringParser.Parse(content.Title); this.contentHash[content.Class] = wrapper; return wrapper; }
public void ShowPad(PadDescriptor content) { if (content != null) { if (!this.contentHash.ContainsKey(content.Class)) { this.CreateContent(content).Show(this.dockPanel); } else { this.contentHash[content.Class].Show(); } } }
public bool IsVisible(PadDescriptor padContent) { return (((padContent != null) && this.contentHash.ContainsKey(padContent.Class)) && !this.contentHash[padContent.Class].IsHidden); }
public void HidePad(PadDescriptor padContent) { if ((padContent != null) && this.contentHash.ContainsKey(padContent.Class)) { this.contentHash[padContent.Class].Hide(); } }
public virtual void ShowPad(PadDescriptor content) { this.PadContentCollection.Add(content); if (this.layout != null) { this.layout.ShowPad(content); } }