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)); } }
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" )); }
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"); } } }