Ejemplo n.º 1
0
 public void ActivatePad(PadDescriptor padContent)
 {
     if ((padContent != null) && this.contentHash.ContainsKey(padContent.Class))
     {
         this.contentHash[padContent.Class].Show();
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (disposing && (this.padDescriptor != null))
     {
         this.padDescriptor.Dispose();
         this.padDescriptor = null;
     }
 }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
 public void DetachContent()
 {
     base.Controls.Clear();
     this.padDescriptor = null;
 }
Ejemplo n.º 6
0
 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;
 }
Ejemplo n.º 7
0
 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();
         }
     }
 }
Ejemplo n.º 8
0
 public bool IsVisible(PadDescriptor padContent)
 {
     return (((padContent != null) && this.contentHash.ContainsKey(padContent.Class)) && !this.contentHash[padContent.Class].IsHidden);
 }
Ejemplo n.º 9
0
 public void HidePad(PadDescriptor padContent)
 {
     if ((padContent != null) && this.contentHash.ContainsKey(padContent.Class))
     {
         this.contentHash[padContent.Class].Hide();
     }
 }
Ejemplo n.º 10
0
 public virtual void ShowPad(PadDescriptor content)
 {
     this.PadContentCollection.Add(content);
     if (this.layout != null)
     {
         this.layout.ShowPad(content);
     }
 }