Beispiel #1
0
 /// <summary>
 /// 格子事件委托
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnGridEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UICtrTypeGrid)
         {
             UICtrTypeGrid tGrid = data as UICtrTypeGrid;
             SetSelectFirstType((uint)tGrid.ID);
         }
         else if (data is UISecondTypeGrid)
         {
             UISecondTypeGrid sGrid = data as UISecondTypeGrid;
             SetSelectSecondType(sGrid.Data);
         }
         else if (data is UIComposeGrid)
         {
             UIComposeGrid cGrid = data as UIComposeGrid;
             SetSelectId(cGrid.Id);
         }
     }
     break;
     }
 }
Beispiel #2
0
    /// <summary>
    /// 设置选中id
    /// </summary>
    /// <param name="composeId"></param>
    private void SetSelectId(uint composeId)
    {
        if (m_uint_composeId == composeId || null == m_ctor_ComposeDatasScrollview)
        {
            return;
        }
        UIComposeGrid cGrid = (m_list_composeDatas.Contains(m_uint_composeId))
            ? m_ctor_ComposeDatasScrollview.GetGrid <UIComposeGrid>(m_list_composeDatas.IndexOf(m_uint_composeId)) : null;

        if (null != cGrid)
        {
            cGrid.SetHightLight(false);
        }
        m_uint_composeId = composeId;
        cGrid            = (m_list_composeDatas.Contains(m_uint_composeId))
           ? m_ctor_ComposeDatasScrollview.GetGrid <UIComposeGrid>(m_list_composeDatas.IndexOf(m_uint_composeId)) : null;
        if (null != cGrid)
        {
            cGrid.SetHightLight(true);
        }
        UpdateComposeUI();
    }
Beispiel #3
0
 /// <summary>
 /// 格子更新
 /// </summary>
 /// <param name="gridBase"></param>
 /// <param name="index"></param>
 private void OnGridUpdate(UIGridBase gridBase, int index)
 {
     if (gridBase is UIComposeGrid)
     {
         UIComposeGrid cGrid = gridBase as UIComposeGrid;
         if (m_list_composeDatas.Count > index)
         {
             cGrid.SetGridData(m_list_composeDatas[index]);
             cGrid.SetHightLight(m_uint_composeId == m_list_composeDatas[index]);
         }
     }
     else if (gridBase is UICtrTypeGrid)
     {
         if (index < mlstFirstTabIds.Count)
         {
             UICtrTypeGrid    ctg  = gridBase as UICtrTypeGrid;
             CategoryTypeData fctd = null;
             if (index == 0)
             {
                 fctd = new CategoryTypeData(0, "可合成");
                 ctg.EnableArrow(false);
             }
             else
             {
                 ctg.SetRedPointStatus(false);
                 fctd = m_mgr.GetCategoryTypeDataByType(CategoryTypeData.CategoryType.First
                                                        , mlstFirstTabIds[index]);
             }
             if (null != fctd)
             {
                 ctg.SetData(fctd.m_uint_categoryId
                             , fctd.m_str_categoryName
                             , fctd.Count);
             }
         }
     }
 }