Example #1
0
        public void ProcessSwitchForm(CtrlPlatformCommandInfo cmd)
        {
            //-->开始进行解析信息了
            var pds = Wrapper.ConvertToModel <PageDirectorySub>(cmd.ExecSql[0].Result);

            if (null == pds)
            {
                return;
            }
            var old_page_guid = cmd.TempValue.GetAttributeValue("PageGuid");

            if (dictTabItem.ContainsKey(old_page_guid))
            {
                var ti  = dictTabItem[old_page_guid];
                var ipr = ti.Content as IPageRuntime;
                ipr.Dispose();

                RuntimePage rp = new RuntimePage();
                rp.PageInfo            = pds;
                rp.IRuntimePageManager = this as IRuntimeManagerPage;
                ti.IsSelected          = true;
                ti.Content             = rp;
                ti.Header = pds.PageName;
                dictTabItem.Add(pds.PageGuid, ti);
                rp.Redraw();
                dictTabItem.Remove(old_page_guid);
            }
        }
Example #2
0
 void OpenNewPage(PageDirectorySub child)
 {
     if (dictTabItem.ContainsKey(child.PageGuid))
     {
         var ti = dictTabItem[child.PageGuid];
         ti.IsSelected = true;
     }
     else
     {
         RuntimePage rp = new RuntimePage();
         rp.PageInfo            = child;
         rp.IRuntimePageManager = this as IRuntimeManagerPage;
         TabItem ti = new TabItem();
         ti.IsSelected = true;
         ti.Content    = rp;
         ti.Header     = child.PageName;
         dictTabItem.Add(child.PageGuid, ti);
         this.tc_Manager.Items.Add(ti);
         rp.Redraw();
     }
 }