void SaveLayout(string LayoutName)
 {
     if (!string.IsNullOrEmpty(LayoutName))
     {
         XmlLayoutSerializer serializer = new XmlLayoutSerializer(WorkingArea);                                                                                            //创建序列化器
         serializer.Serialize(FileFolder.LinkPath(AppController.GetInstence().appPath, "Frame", FrameController.GetInstence().frameName, "Layout") + LayoutName + ".xml"); //根据路径储存布局
         MsgCenter.SendMsg(new MsgVar <string>(AllAppMsg.SaveUserVisible, LayoutName));
     }
 }
Example #2
0
        public void LoadUserVisible <T>(MsgBase msg)
        {
            MsgVar <string> tmpMSg = msg as MsgVar <string>;

            userVisible = bool.Parse(RWXml.TemporaryReadContent(
                                         PanelInfo.name,
                                         FileFolder.LinkPath(AppController.GetInstence().appPath, "Frame", FrameController.GetInstence().frameName, "Layout") + tmpMSg.parameter + ".xml",
                                         "UserVisible"
                                         ));
        }
Example #3
0
        public void SaveUserVisible <T>(MsgBase msg)
        {
            MsgVar <string> tmpMSg = msg as MsgVar <string>;

            RWXml.TemporaryAddPropertySetContent(
                PanelInfo.name,
                userVisible.ToString(),
                FileFolder.LinkPath(AppController.GetInstence().appPath, "Frame", FrameController.GetInstence().frameName, "Layout") + tmpMSg.parameter + ".xml",
                "UserVisible"
                );
        }
        void LoadLayout(string LayoutName)
        {
            if (!string.IsNullOrEmpty(LayoutName))
            {
                using (AppController.GetInstence().LoadLayoutState.SetScope())
                {
                    MsgCenter.SendMsg(new MsgVar <string>(AllAppMsg.LoadUserVisible, LayoutName));
                    List <string> tmp = new List <string>(ViewModelLocator.instence.Main.WindowActionList.Keys);
                    foreach (string t in tmp)
                    {
                        ViewModelLocator.instence.Main.WindowActionList[t] = true;
                    }

                    MsgCenter.SendMsg(new MsgVar <string>(AllAppMsg.LoadUserVisible, LayoutName));
                    XmlLayoutSerializer serializer = new XmlLayoutSerializer(WorkingArea);//创建序列化器
                    serializer.Deserialize(FileFolder.LinkPath(AppController.GetInstence().appPath, "Frame", FrameController.GetInstence().frameName, "Layout") + LayoutName + ".xml");
                }
            }
        }