亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dduallistmanager.cpp

?? 這個程序是有關于考勤的應用系統
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::AddItemToChoosenList(LPCTSTR lpszItem, long lItemData)
{
    m_ArrayChoosen.Add(lItemData);
    m_KeyMap.SetAt(lItemData, lpszItem);
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			MoveAll
//
//  Purpose:		Moves all of the selected items from one listbox to the
//                  other.
//
//  Inputs:
//
//		CListBox & rLBFrom - listbox moving from
//
//		CArray<long, long> & rArrayFrom - array moving from
//
//		CArray<long, long> & rArrayTo - array moving to
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::MoveAll(CListBox & rLBFrom, CListBox & rLBTo, CArray<long, long> & rArrayFrom, CArray<long, long> & rArrayTo) 
{
    CString csName;

    // Move all of the remaining items in the listbox to the opposite array
    int iCount = rLBFrom.GetCount();
    for(int iIndex = 0; iIndex < iCount; ++iIndex)
    {
        long lVal = rLBFrom.GetItemData(iIndex);
        rArrayTo.Add(lVal);
    }

    // Clear the array of items we are clearing out
    rArrayFrom.RemoveAll();

    // Re-fill the listboxes with the contents of the array
    FillListboxes();

    // Select the first item in the to listbox
    SelectLBItem(rLBTo, 0);
}


///////////////////////////////////////////////////////////////////////////////
//
//  Method:			MoveSelected
//
//  Purpose:		Moves the selected items from one listbox and places them
//                  in the other listbox.
//
//  Inputs:
//
//		CListBox & rLBFrom - listbox moving from
//
//		CArray<long, long> & rArrayFrom - array moving from
//
//		CArray<long, long> & rArrayTo - array moving to
//
//		BOOL bRemoving - TRUE if we are removing items 
//                       FALSE if we are adding items
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::MoveSelected(CListBox & rLBFrom, CArray<long, long> & rArrayFrom, CArray<long, long> & rArrayTo, BOOL bRemoving)
{
    CArray<long, long>  SelectedArray;

    // Loops through all of the items in the from listbox 
    int iSelFirst = -1;
    int iCount    = rLBFrom.GetCount();
    for(int iIndex = 0; iIndex < iCount; ++iIndex)
    {
        // Check to see if this item is currently selected
        if( 0 < rLBFrom.GetSel( iIndex ) )
        {
            // Hang onto the first selected item in the list so we can keep
            // the item at that position selected.
            if(-1 == iSelFirst)
                iSelFirst = iIndex;

            // Get the item data for this item
            long lItemData = rLBFrom.GetItemData(iIndex);

            // Add the item data value to the list of selected items
            SelectedArray.Add(lItemData);

            // Add this item to the other array of items 
            rArrayTo.Add(lItemData);

            // Find this item in the array we are moving it out of and remove it
            int iCount2 = rArrayFrom.GetSize();
            for(int iIndex2 = 0; iIndex2 < iCount2; ++iIndex2)
            {
                if( lItemData == rArrayFrom[iIndex2] )
                {
                    rArrayFrom.RemoveAt(iIndex2);
                    break;
                }
            }
        }
    }

    // Re-fill the listboxes with the contents of the array
    FillListboxes(&SelectedArray, bRemoving);

    // Select one item in the from listbox at the location of the first 
    // selected item before the items were moved.
    if(-1 != iSelFirst)
    {
        SelectLBItem(rLBFrom, rLBFrom.GetCount() <= iSelFirst 
                              ? rLBFrom.GetCount() - 1 : iSelFirst);
    }
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			MoveUpOrDown
//
//  Purpose:		Moves the hilighted items in the list of choosen items 
//                  either up or down depending on the value of the passed in
//                  flag.
//                  
//                  If more than one item is selected all of the items are
//                  moved as a block. If one or more items have reached the 
//                  top or bottom while other haven't those items stay at their
//                  current location and the other continue to move.
//
//  Inputs:
//
//		BOOL bMovingUp - TRUE if the items should be moved up
//                       FALSE if the items should be moved down
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::MoveUpOrDown(BOOL bMovingUp) 
{
    int                 iIndex, iIndex2, iCount, iCount2, iOffset, iInsertAt;
    int                 iIndexSelectedMarker = -1;
    long                lItemData;
    CString             csName;
    CArray<long, long>  SelectedArray;

    // Get the count of items in the list control
    iCount = m_ctrlChoosenList.GetCount();

    // Set the base loop index and the increment/decrement value based on the
    // direction the item are being moved (up or down).
    iIndex  = (TRUE  == bMovingUp) ? 0  : iCount - 1;
    iOffset = (TRUE  == bMovingUp) ? -1 : 1;
    
    // Loop through all of the items in the list.
    while( (TRUE  == bMovingUp && iIndex < iCount) || 
           (FALSE == bMovingUp && iIndex >= 0) )
    {
        // Check if this item is selected.
        if( 0 < m_ctrlChoosenList.GetSel( iIndex ) )
        {
            // Get the item data for this item
            lItemData = m_ctrlChoosenList.GetItemData(iIndex);

            // Build a list of the selected items so we can reselect them
            // later.
            SelectedArray.Add(lItemData);

            // Don't move selected items past other selected items
            if(-1 != iIndexSelectedMarker)
            {
                // Loop through the enabled list looking for the current item
                // which is identified by the item data value.
                iCount2 = m_ArrayChoosen.GetSize();

                for(iIndex2 = 0; iIndex2 < iCount2; ++iIndex2)
                {
                    // Find the index of this item in enabled list
                    if( lItemData == m_ArrayChoosen[iIndex2] )
                    {
                        // Remove the item from its current position
                        m_ArrayChoosen.RemoveAt(iIndex2);

                        // Reinsert the item in the array one space higher 
                        // than its previous position
                        iInsertAt = (iIndex2 + iOffset) < 0 ? 0 : iIndex2 + iOffset;
                        m_ArrayChoosen.InsertAt(iInsertAt, lItemData);
                        break;
                    }
                }
            }
        }
        // If this item wasn't selected save the index so we can check it later
        // so we don't move past the any selected items.
        else if(-1 == iIndexSelectedMarker)
        {
            iIndexSelectedMarker = iIndex;
        }

        iIndex = (TRUE  == bMovingUp) ? iIndex + 1 : iIndex - 1;
    }

    // Re-fill the listboxes with the contents of the array
    FillListboxes(&SelectedArray);
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			FillListboxes
//
//  Purpose:		Fills both listboxes with the current contents of their
//                  associated arrays. This method also reselects the items
//                  in the passed in array of selected items in appropriate
//                  list.
//
//  Inputs:
//
//		CArray<long
//
//		long> * pSelectedArray
//
//		BOOL bRemoving
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::FillListboxes(CArray<long, long> * pSelectedArray, BOOL bRemoving)
{
    int     iIndex, iIndex2, iCount;
    CString csName;

    // Clear and refill the listbox of disabled commands from the disabled
    // command array.
    m_ctrlAvailableList.ResetContent();
    iCount = m_ArrayAvailable.GetSize();
    for(iIndex = 0; iIndex < iCount; ++iIndex)
    {
        m_KeyMap.Lookup(m_ArrayAvailable[iIndex], csName);
        iIndex2 = m_ctrlAvailableList.AddString(csName);
        m_ctrlAvailableList.SetItemData(iIndex2, m_ArrayAvailable[iIndex]);
    }

    // Clear and refill the listbox of enabled commands from the enabled
    // command array.
    m_ctrlChoosenList.ResetContent();
    iCount = m_ArrayChoosen.GetSize();
    for(iIndex = 0; iIndex < iCount; ++iIndex)
    {
        m_KeyMap.Lookup(m_ArrayChoosen[iIndex], csName);
        iIndex2 = m_ctrlChoosenList.AddString(csName);
        m_ctrlChoosenList.SetItemData(iIndex2, m_ArrayChoosen[iIndex]);
    }

    // Now reselect the items that were selected before we moved them.
    if(NULL != pSelectedArray)
    {
        iCount = pSelectedArray->GetSize();
        for(iIndex = 0; iIndex < iCount; ++iIndex)
        {
            m_KeyMap.Lookup(pSelectedArray->GetAt(iIndex), csName);
            if(TRUE == bRemoving)
            {
                iIndex2 = m_ctrlAvailableList.FindStringExact(-1, csName);
                SelectLBItem(m_ctrlAvailableList, iIndex2);
            }
            else
            {
                iIndex2 = m_ctrlChoosenList.FindStringExact(-1, csName);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久婷婷色综合| 日韩欧美成人午夜| 国产精品一区二区三区99| 中文字幕欧美区| 欧美二区乱c少妇| 91亚洲永久精品| 99精品视频在线观看| 国产揄拍国内精品对白| 亚洲综合一区二区三区| 亚洲人成伊人成综合网小说| 国产婷婷精品av在线| 日韩欧美美女一区二区三区| 欧美一级一区二区| 99久久99久久免费精品蜜臀| 国产精品99久久久久久久vr| 蜜桃精品在线观看| 国产女人18毛片水真多成人如厕| 欧美va亚洲va国产综合| 日韩三级免费观看| 在线不卡a资源高清| 精品国产乱码久久| 久久免费看少妇高潮| 中文字幕一区二区三区视频| 国产精品美女久久久久高潮| 亚洲午夜激情av| 亚洲国产cao| 麻豆精品一二三| 国产不卡视频在线播放| 国产精品一区免费视频| 精品影视av免费| av成人免费在线观看| 欧美在线高清视频| 欧美大片一区二区| 久久久久久久综合色一本| 亚洲人成网站影音先锋播放| 日韩精品一二三区| 老司机精品视频导航| va亚洲va日韩不卡在线观看| 91成人网在线| 91精品黄色片免费大全| 国产日韩精品一区二区三区 | 亚洲国产va精品久久久不卡综合 | 午夜电影网一区| 99国内精品久久| 欧美日韩三级一区二区| 亚洲精品一二三区| 久久99久久99精品免视看婷婷 | 亚洲欧美视频在线观看| 黄色资源网久久资源365| 99久久国产综合精品麻豆 | 久久综合丝袜日本网| 午夜精品久久久久久久蜜桃app| 岛国精品在线播放| 久久蜜桃av一区精品变态类天堂| 天天综合网 天天综合色| 成人不卡免费av| 一区二区日韩av| 国产综合色在线视频区| 欧美一区二区精品久久911| 亚洲另类在线一区| 成人动漫一区二区| 国产精品乱人伦一区二区| 国产福利一区二区三区视频| 久久嫩草精品久久久精品一| 亚洲成av人在线观看| 在线不卡一区二区| 久久激情综合网| 国产精品超碰97尤物18| 色综合久久久久| 视频在线观看91| 久久一日本道色综合| 国产激情一区二区三区四区 | 欧美精品精品一区| 中文字幕国产一区| 国产呦萝稀缺另类资源| 亚洲欧洲综合另类在线| 久久综合狠狠综合久久激情| 色老汉av一区二区三区| 欧美a一区二区| 国产精品短视频| 久久精品视频在线免费观看| 91官网在线免费观看| 成人性生交大合| 国产精品18久久久久久久久| 日韩精品1区2区3区| 一区二区三区日本| 中文字幕精品—区二区四季| 精品国产乱码久久久久久蜜臀| 欧美日韩国产首页| 欧美性大战久久久久久久| av一二三不卡影片| 韩国精品主播一区二区在线观看| 国产精品嫩草影院av蜜臀| 欧美精品tushy高清| 91精品国产综合久久久久久久久久 | 国产精品国产三级国产普通话99 | 亚洲成人黄色影院| 免费在线观看一区| 极品销魂美女一区二区三区| 国模一区二区三区白浆| 国产成人亚洲精品狼色在线| 不卡一区二区中文字幕| 色婷婷久久久综合中文字幕| 91福利精品第一导航| 精品国产乱码久久久久久浪潮 | 亚洲尤物在线视频观看| 亚洲丝袜美腿综合| 亚洲成人激情自拍| 成人app网站| 日韩美一区二区三区| 国产精品久久久久久久久久久免费看 | 久久久99精品免费观看| 中文字幕一区二区在线观看| 亚洲国产人成综合网站| 男人的j进女人的j一区| 国产成人免费视| 欧美日韩五月天| 国产精品网站在线| 亚洲1区2区3区4区| 成人午夜电影网站| 欧美日韩国产综合视频在线观看| 日韩欧美电影在线| 天天av天天翘天天综合网| 国产传媒欧美日韩成人| 欧美成人女星排行榜| 亚洲精品少妇30p| 久久精品国产亚洲一区二区三区| 色综合色综合色综合色综合色综合| 国产天堂亚洲国产碰碰| 北条麻妃一区二区三区| 精品国产在天天线2019| 午夜精品福利在线| 99精品视频免费在线观看| 精品国产91乱码一区二区三区 | 国产99久久精品| 国产人久久人人人人爽| 国产精品自拍毛片| 国产色婷婷亚洲99精品小说| 国产在线不卡一区| 久久综合色播五月| 国产在线一区二区| 国产精品日日摸夜夜摸av| 91国在线观看| 日本免费在线视频不卡一不卡二| 欧美群妇大交群中文字幕| 午夜影视日本亚洲欧洲精品| 精品理论电影在线| 色综合网站在线| 毛片一区二区三区| 欧美一级黄色录像| 琪琪久久久久日韩精品| 国产亚洲精品资源在线26u| 91美女福利视频| 国模一区二区三区白浆| 国产精品天干天干在观线| 色综合久久综合中文综合网| 亚洲超碰精品一区二区| 欧美sm极限捆绑bd| 一本久道久久综合中文字幕| 久久99精品国产麻豆婷婷| 久久麻豆一区二区| 色素色在线综合| 国产精品一色哟哟哟| 日韩精品成人一区二区三区 | 日本视频在线一区| 自拍偷拍欧美激情| wwwwxxxxx欧美| 欧美一区二区三区小说| 欧美日韩三级一区| 91视频观看免费| 丁香桃色午夜亚洲一区二区三区| 一区二区三区免费看视频| 亚洲国产成人在线| 国产欧美日韩精品a在线观看| 在线看国产一区| 91美女在线视频| 成人黄色片在线观看| 国产美女精品人人做人人爽| 丝袜美腿亚洲一区| 精品一区二区三区免费观看| 视频一区中文字幕国产| 亚洲国产综合91精品麻豆| 亚洲三级理论片| 亚洲制服丝袜av| 麻豆精品在线视频| 国产酒店精品激情| 国产99久久久国产精品潘金网站| 国产成人av网站| 成人黄色免费短视频| 日本道精品一区二区三区| 欧美在线视频全部完| 99久久国产免费看| 欧美三级一区二区| 久久久国产一区二区三区四区小说| 国产免费观看久久| 亚洲婷婷国产精品电影人久久| 亚洲精品免费看| 精品一二线国产| 在线免费观看成人短视频| 日韩三级在线免费观看|