예제 #1
0
        public void UnloadPad(PadDescriptor padDescriptor)
        {
            AvalonPadContent p = pads[padDescriptor];

            p.Hide();
            DockablePane pane = p.Parent as DockablePane;

            if (pane != null)
            {
                pane.Items.Remove(p);
            }
            p.Dispose();
        }
예제 #2
0
        public void ShowPad(PadDescriptor padDescriptor)
        {
            AvalonPadContent pad;

            if (pads.TryGetValue(padDescriptor, out pad))
            {
                pad.Show(dockingManager);
            }
            else
            {
                LoggingService.Debug("Add pad " + padDescriptor.Class + " at " + padDescriptor.DefaultPosition);

                pad = new AvalonPadContent(this, padDescriptor);
                pads.Add(padDescriptor, pad);
                padsByClass.Add(padDescriptor.Class, pad);
                pad.ShowInDefaultPosition();
            }
        }