我现在在使用MagicLibrary 1.7.0 有它的源码,现在我想用一个按钮点击修改浮动窗体的Visible,让停靠的窗体可以隐藏或显示,但不知道在源代码中怎么修改,麻烦高手指教一下  谢谢

解决方案 »

  1.   

    我现在的代码是这样的,调用了  MagicLibrary.dll中的Content     
          public static Crownwood.Magic.Docking.DockingManager _dockingManager = null;
               public void DockAndFloat(FormNavigation formNavigation, FormLayerControl formLayerControl)
            {
                _dockingManager = new DockingManager(this, VisualStyle.Plain);
                _dockingManager.OuterControl = formLayerControl;
                _dockingManager.InnerControl = formNavigation;
                Content formlay = new Content(_dockingManager, formLayerControl, "图层控制");
                Content formNav = new Content(_dockingManager, formNavigation, "导航图");
                formlay.Title = "图层控制";
                formlay.FullTitle = "图层控制";
                formlay.Control = formLayerControl;
                Size formLaySize = formlay.Control.Size;
                formlay.DisplaySize = formLaySize;
                formlay.AutoHideSize = formLaySize;            formNav.Title = "导航图";
                formNav.FullTitle = "导航图";
                formNav.Control = formNavigation;
                Size formNavigationSize = formNav.Control.Size;
                formNav.DisplaySize = formNavigationSize;
                formNav.AutoHideSize = formNavigationSize;
                _dockingManager.Contents.Add(formNav);
                _dockingManager.Contents.Add(formlay);            WindowContent wc = _dockingManager.AddContentWithState(formlay, State.DockLeft);
                // _dockingManager.ShowContent(_dockingManager.Contents["导航图"]);
                //   _dockingManager.ShowContent(_dockingManager.Contents["图层控制"]);
                _dockingManager.AddContentToWindowContent(formNav, wc);
            }
    然后在按钮事件中是这么写的
               if (content.Visible == true)
                {
                    content.Visible = false;
                }
                else
                {
                    content.Visible = true;
                }我还修改了dll中的代码,本来Content.cs中的_Visible是只读的, 我给他加了个set{_visible=value}可是点按钮时不能隐藏或显示
      

  2.   

    大哥,我急求MagicLibrary 的源码,能不能给我发一份?
    拜托---
    [email protected]