Пример #1
0
 /// <summary>
 /// 加载所有的页面结构
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="msg"></param>
 void StartLoadPanelStruct <T>(MsgBase msg)
 {
     //读取所有的页面属性
     foreach (string panel in mainFrameData.GetOneElementAllContent("Panel"))
     {
         PanelInfo tmpPanel = new PanelInfo()
         {
             name      = panel,
             panelType = (PanelType)Enum.Parse(typeof(PanelType), mainFrameData.GetContent("Panel", panel, "PanelType")),
             package   = mainFrameData.GetContent("Panel", panel, "Package"),
             type      = mainFrameData.GetContent("Panel", panel, "Type"),
             link      = mainFrameData.GetOneElementAllContent("Panel", panel, "Link"),
             feature   = mainFrameData.GetOneElementAllContent("Panel", panel, "Feature"),
         };
         allPanelInfo.Add(panel, tmpPanel);
         CreatePanel(tmpPanel);
     }
     MsgCenter.SendMsg(new MsgBase(AllAppMsg.PanelCreateComplete));//框架加载结束
 }
Пример #2
0
        /// <summary>
        /// 加载一个模板
        /// </summary>
        void LoadTemplate <T>(MsgBase msg)
        {
            MsgVar <string> tmpMsg = (MsgVar <string>)msg;

            frameName = tmpMsg.parameter;
            //加载框架信息
            mainFrameData = new RXml(AppController.GetInstence().appPath + "Frame/" + frameName, "FrameData.xml");
            foreach (var path in mainFrameData.GetDoubleLayerElements("Load", "Xml"))
            {
                foreach (var file in path.Value)
                {
                    allFrameData.Add(file.Value, new RXml(AppController.GetInstence().appPath + "Frame/" + frameName + "/" + path.Key, file.Key + ".xml"));
                }
            }
            //加载框架所需的包
            foreach (var package in mainFrameData.GetAllElementContent("Load", "Package"))
            {
                FramePackage p = new FramePackage(package.Value);
                allPackage.Add(package.Key, p);
            }
            MsgCenter.SendMsg(new MsgBase(AllAppMsg.FrameLoadComplete));
        }
 void GetDataText <T>(MsgBase msg)
 {
     AppDataText = AllAppData["AppText_" + Language].GetAllElementContent();
 }
 void GetLanguage <T>(MsgBase msg)
 {
     Language = mainAppData.GetContent("Settings", "Language");
 }
Пример #5
0
 void GetTempleteText <T>(MsgBase msg)
 {
     FrameDataText = allFrameData["FrameText_" + FrameLanguage].GetAllElementContent();
 }
Пример #6
0
 /// <summary>
 /// 发送消息
 /// </summary>
 public static void SendMsg(MsgBase tmp)
 {
     Messenger.Default.Send <MsgBase>(tmp, tmp.msg);
 }