示例#1
0
		public void removeForm(Form form)
		{
            if (m_winDic.ContainsKey(form.id))
			{
                m_winDic.Remove(form.id);
			}
		}
示例#2
0
        public TuJianData(Form form)
        {
            m_form = form;

            m_pClassFilterPnl = new ClassFilterPnl(this);
            m_wdscCardSetPnl = new TuJianCardSetPnl(this);
            m_wdscCardPnl = new TuJianCardPnl(this);
            m_leftBtnPnl = new LeftBtnPnl(this);
        }
示例#3
0
 public TuJianTopData(UITuJianTop form)
 {
     m_form = form;
     if (Ctx.m_instance.m_auxUIHelp.m_auxTuJian.m_eTuJianMenu == ETuJianMenu.eCard)
     {
         m_tuJianCardHandlePnl = new TuJianCardHandlePnl(this);
     }
     else if (Ctx.m_instance.m_auxUIHelp.m_auxTuJian.m_eTuJianMenu == ETuJianMenu.eCardSet)
     {
         m_tuJianCardSetMenuPnl = new TuJianCardSetMenuPnl(this);
     }
     else if (Ctx.m_instance.m_auxUIHelp.m_auxTuJian.m_eTuJianMenu == ETuJianMenu.eJobSel)
     {
         m_tuJianJobSelPnl = new TuJianJobSelPnl(this);
     }
     else if (Ctx.m_instance.m_auxUIHelp.m_auxTuJian.m_eTuJianMenu == ETuJianMenu.eFilter)
     {
         m_tuJianFilterMenuPnl = new TuJianFilterMenuPnl(this);
     }
 }
示例#4
0
 public MainData(Form form_)
 {
     m_form = form_;
 }
示例#5
0
		public void addForm(Form form)
		{
			m_winDic[form.id] = form;
		}
示例#6
0
		public bool hasForm(Form form)
		{
			return m_winDic.ContainsKey(form.id);
		}
示例#7
0
 public LuaCSBridgeForm(string tableName, Form form_)
     : base(tableName)
 {
     m_form = form_;
 }
示例#8
0
 public void onCodeFormLoaded(Form form)
 {
     
 }
示例#9
0
 public void onWidgetLoaded(Form form)
 {
     
 }
示例#10
0
 protected void onCodeLoadedByForm(Form form)
 {
     if (null != Ctx.m_instance.m_cbUIEvent)
     {
         Ctx.m_instance.m_cbUIEvent.onCodeFormLoaded(form);  // 资源加载完成
     }
 }
示例#11
0
        // 这个事加载界面需要的代码
        //public void loadForm<T>(UIFormID ID) where T : Form, new()
        public void loadForm(UIFormID ID)
        {
            UIAttrItem attrItem = m_UIAttrs.m_id2AttrDic[ID];
            Form window = getForm(ID);

            if (window != null)     // 本地已经创建了这个窗口,
            {
                if (window.IsResReady)      // 如果资源也已经加载进来了
                {
                    if(null != Ctx.m_instance.m_cbUIEvent)
                    {
                        Ctx.m_instance.m_cbUIEvent.onCodeFormLoaded(window);  // 资源加载完成
                    }
                }
            }
            else if (!m_ID2CodeLoadingItemDic.ContainsKey(ID))                       // 如果什么都没有创建,第一次加载
            {
                // 创建窗口
                Form form = null;
                if (attrItem.m_bNeedLua)
                {
                    form = new Form();
                }
                else
                {
                    form = Ctx.m_instance.m_scriptDynLoad.getScriptObject(attrItem.m_scriptTypeName) as Form;
                }
                
                if (form != null)                   // 如果代码已经在本地
                {
                    (form as Form).id = ID;
                    if (attrItem.m_bNeedLua)
                    {
                        form.luaCSBridgeForm = new LuaCSBridgeForm(attrItem.m_luaScriptTableName, form);
                        form.luaCSBridgeForm.DoFile(attrItem.m_luaScriptPath);
                    }

                    addFormNoReady(form);           // 仅仅是创建数据,资源还没有加载完成
                    onCodeLoadedByForm(form);
                }

                // 这个地方应该抛出异常
                if(null == form)    // 本地没有代码
                {
                    m_ID2CodeLoadingItemDic[ID] = new UILoadingItem();
                    m_ID2CodeLoadingItemDic[ID].m_ID = ID;

                    loadFromFile(attrItem.m_codePath, onCodeLoadEventHandle);
                }
            }
        }
示例#12
0
        // 内部接口
        private void addFormNoReady(Form form)
        {
            UILayer layer = getLayer(m_UIAttrs.m_id2AttrDic[form.id].m_canvasID, m_UIAttrs.m_id2AttrDic[form.id].m_LayerID);
            form.uiLayer = layer;
            layer.addForm(form);

            m_id2FormDic[form.id] = form;
            form.init();        // 初始化
        }
示例#13
0
 public void addForm(Form form)
 {
     addFormNoReady(form);
     form.onInit();
 }
示例#14
0
 public InfoData(Form form)
 {
     m_form = form;
 }