void CLoginDialog::OnEnSetfocusPhone()
{
	CString test;
	GetDlgItemText(IDC_PHONE,test);
	if(test.Compare(L"Phone")==0 || test.Compare(L"Phone Number")==0){
		SetDlgItemText(IDC_PHONE,L"");
	}

	// TODO: Add your control notification handler code here
	//IDC_PASSWORD
}
void CLoginDialog::OnEnSetfocusPassword()
{
	CString text;
	GetDlgItemText(IDC_PASSWORD,text);
	if(text.Compare(_T("Pin"))==0)
		SetDlgItemText(IDC_PASSWORD,L"");
}
Example #3
0
/**
 * @brief Read left path different ways.
 */
void SimpleLeft::GetLeftPath()
{
	// Has left path (only)
	BOOL bIsLeft = m_pProjectFile->HasLeft();
	CPPUNIT_ASSERT(bIsLeft == TRUE);
	
	// Get left path without read-only info
	CString left = m_pProjectFile->GetLeft();
	CPPUNIT_ASSERT(left.Compare(LeftPath) == 0);

	// Get left path with read-only info
	BOOL bReadOnly;
	left = m_pProjectFile->GetLeft(&bReadOnly);
	CPPUNIT_ASSERT(left.Compare(LeftPath) == 0);
	CPPUNIT_ASSERT(bReadOnly == FALSE);
}
Example #4
0
void CSaveOptionPage::RegFileType(LPCTSTR pszType)
{
	POSITION posTmpl = AfxGetApp()->GetFirstDocTemplatePosition();
	if(posTmpl != NULL)
	{
		CDocTemplate* pTemplate = AfxGetApp()->GetNextDocTemplate(posTmpl);
		CString strFileTypeId;
		if (pTemplate->GetDocString(strFileTypeId, CDocTemplate::regFileTypeId))
		{
			CString strTemp;
			LONG lSize = _MAX_PATH * 2;
			LONG lResult = AfxRegQueryValue(HKEY_CLASSES_ROOT, pszType,
				strTemp.GetBuffer(lSize), &lSize);
			strTemp.ReleaseBuffer();

			if(strTemp.Compare(strFileTypeId) != 0)
			{
				AfxRegSetValue(
					HKEY_CLASSES_ROOT, pszType, REG_SZ,
					strFileTypeId, lstrlen(strFileTypeId) * sizeof(TCHAR));
				AfxGetApp()->WriteProfileString(_T("Settings"), pszType, strTemp);
			}
		}
	}
}
bool CHorseRaceMainDlg::IsExist(int nQ,int nIndex,std::list<QDATA> * q_list )
{
	std::list<QDATA>::iterator iter;	
	for ( iter = q_list->begin(); iter != q_list->end(); ++iter)
	{
		CString tem =  m_ListQ[nQ].GetItemText(nIndex,0);
		if(iter->race == atoi(tem))//场相等
		{
			tem =  m_ListQ[nQ].GetItemText(nIndex,1);
			CString tem2;
			tem2.Format(_T("%d-%d"),iter->horse1,iter->horse2);
			if(tem.Compare(tem2) == 0)//马相等
			{
				tem =  m_ListQ[nQ].GetItemText(nIndex,3);
				if(iter->amount == atoi(tem))//折扣
				{
					tem =  m_ListQ[nQ].GetItemText(nIndex,4);
					if(iter->limit == atoi(tem))
					{
						return true;
					}
					continue;
				}
				continue;
			}
			continue;
		}
	}
	return false;
}
Example #6
0
void CFilesHashDlg::OnBnClickedContext()
{
	if(m_bLimited)
	{
		OSVERSIONINFOEX osvi;
		BOOL bOsVersionInfoEx;
		if(GetWindowsVersion(osvi, bOsVersionInfoEx) &&
			osvi.dwMajorVersion >= 6)
		{
			if(ElevateProcess())
				ExitProcess(0);
		}
	}

	// May not a limited process.
	CStatic* pWnd = (CStatic *)GetDlgItem(IDC_STATIC_ADDRESULT);
	CString buttonText = _T("");

	m_btnContext.GetWindowText(buttonText);

	if(buttonText.Compare(MAINDLG_ADD_CONTEXT_MENU) == 0)
	{
		RemoveContextMenu(); // Try to delete all items related to fHash
		if(AddContextMenu())
		{
			pWnd->SetWindowText(MAINDLG_ADD_SUCCEEDED);
			m_btnContext.SetWindowText(MAINDLG_REMOVE_CONTEXT_MENU);
		}
		else
		{
			pWnd->SetWindowText(MAINDLG_ADD_FAILED);
		}
	}
	else if(buttonText.Compare(MAINDLG_REMOVE_CONTEXT_MENU) == 0)
	{
		if(RemoveContextMenu())
		{
			pWnd->SetWindowText(MAINDLG_REMOVE_SUCCEEDED);
			m_btnContext.SetWindowText(MAINDLG_ADD_CONTEXT_MENU);
		}
		else
		{
			pWnd->SetWindowText(MAINDLG_REMOVE_FAILED);
		}
	}
}
Example #7
0
DROPEFFECT CCFDropTarget::OnDragOver( CWnd* pWnd,COleDataObject* pDataObject, DWORD dwKeyState, CPoint point )
{
	if (pDataObject->IsDataAvailable(CF_HDROP))
	{
		CRect rcSrc, rcDes;
		CConfigUtilityDlg* pDlg = (CConfigUtilityDlg*)pWnd;
		pDlg->m_edtSrcPath.GetWindowRect(rcSrc);
		pDlg->ScreenToClient(rcSrc);
		pDlg->m_edtDesPath.GetWindowRect(rcDes);
		pDlg->ScreenToClient(rcDes);
		if (!((rcSrc.PtInRect(point) && pDlg->m_edtSrcPath.IsWindowEnabled()) || rcDes.PtInRect(point)))
		{
			return DROPEFFECT_NONE;
		}

		HGLOBAL hData =pDataObject->GetGlobalData(CF_HDROP);
		if (hData)
		{

			TCHAR szBuffer[MAX_PATH];
			ZeroMemory(szBuffer, sizeof(szBuffer));
			HDROP hdrop = (HDROP)GlobalLock(hData);
			DragQueryFile((HDROP)hdrop, 0, szBuffer, MAX_PATH);
			GlobalLock(hData);
			if (szBuffer[0] != L'\0')
			{
				CString strPath = szBuffer;
				int nPos = strPath.ReverseFind(L'.');
				if (nPos > 0)
				{
					CString strExt = strPath.Right(strPath.GetLength() - nPos-1);
					strExt.MakeLower();
					if (strExt.Compare(TEXT("ini"))== 0 || strExt.Compare(TEXT("clsid"))== 0)
					{

						return DROPEFFECT_LINK;
					}

				}

			}
		}
	}
	return DROPEFFECT_NONE;
}
void CCollectionCreateDialog::OnEnKillFocusCollectionName()
{
	CString sFileName;
	CString sNewFileName;
	m_CollectionNameEdit.GetWindowText(sFileName);
	sNewFileName = ValidFilename(sFileName);
	if (sNewFileName.Compare(sFileName))
		m_CollectionNameEdit.SetWindowText(sNewFileName);
}
Example #9
0
	PropTest()
	{
		CString msg = _T("this is a test logmessage: issue 222\nIssue #456, #678, 901  #456");
		CString sUrl = _T("http://tortoisesvn.tigris.org/issues/show_bug.cgi?id=%BUGID%");
		CString sCheckRe = _T("[Ii]ssue #?(\\d+)(,? ?#?(\\d+))+");
		CString sBugIDRe = _T("(\\d+)");
		ProjectProperties props;
		props.sCheckRe = _T("PAF-[0-9]+");
		props.sUrl = _T("http://tortoisesvn.tigris.org/issues/show_bug.cgi?id=%BUGID%");
		CString sRet = props.FindBugID(_T("This is a test for PAF-88"));
		ATLASSERT(sRet.IsEmpty());
		props.sCheckRe = _T("[Ii]ssue #?(\\d+)");
		props.regExNeedUpdate = true;
		sRet = props.FindBugID(_T("Testing issue #99"));
		sRet.Trim();
		ATLASSERT(sRet.Compare(_T("99"))==0);
		props.sCheckRe = _T("[Ii]ssues?:?(\\s*(,|and)?\\s*#\\d+)+");
		props.sBugIDRe = _T("(\\d+)");
		props.sUrl = _T("http://tortoisesvn.tigris.org/issues/show_bug.cgi?id=%BUGID%");
		props.regExNeedUpdate = true;
		sRet = props.FindBugID(_T("This is a test for Issue #7463,#666"));
		ATLASSERT(props.HasBugID(_T("This is a test for Issue #7463,#666")));
		ATLASSERT(!props.HasBugID(_T("This is a test for Issue 7463,666")));
		sRet.Trim();
		ATLASSERT(sRet.Compare(_T("666 7463"))==0);
		sRet = props.FindBugID(_T("This is a test for Issue #850,#1234,#1345"));
		sRet.Trim();
		ATLASSERT(sRet.Compare(_T("850 1234 1345"))==0);
		props.sCheckRe = _T("^\\[(\\d+)\\].*");
		props.sUrl = _T("http://tortoisesvn.tigris.org/issues/show_bug.cgi?id=%BUGID%");
		props.regExNeedUpdate = true;
		sRet = props.FindBugID(_T("[000815] some stupid programming error fixed"));
		sRet.Trim();
		ATLASSERT(sRet.Compare(_T("000815"))==0);
		props.sCheckRe = _T("\\[\\[(\\d+)\\]\\]\\]");
		props.sUrl = _T("http://tortoisesvn.tigris.org/issues/show_bug.cgi?id=%BUGID%");
		props.regExNeedUpdate = true;
		sRet = props.FindBugID(_T("test test [[000815]]] some stupid programming error fixed"));
		sRet.Trim();
		ATLASSERT(sRet.Compare(_T("000815"))==0);
		ATLASSERT(props.HasBugID(_T("test test [[000815]]] some stupid programming error fixed")));
		ATLASSERT(!props.HasBugID(_T("test test [000815]] some stupid programming error fixed")));
	}
Example #10
0
void CRevisionGraphDlg::UpdateZoomBox()
{
	CString strText;
	CString strItem;
	CComboBoxEx* pCBox = (CComboBoxEx*)m_ToolBar.GetDlgItem(ID_REVGRAPH_ZOOMCOMBO);
	pCBox->GetWindowText(strItem);
	strText.Format(L"%.0f%%", (m_fZoomFactor * 100.0));
	if (strText.Compare(strItem) != 0)
		pCBox->SetWindowText(strText);
}
Example #11
0
int CRulesList::CompareFunc(LPARAM lParam1, LPARAM lParam2)
{
	LV_FINDINFO find1 = { LVFI_PARAM, NULL, lParam1, NULL, NULL };
	LV_FINDINFO find2 = { LVFI_PARAM, NULL, lParam2, NULL, NULL };
	const int nIndex1 = FindItem (&find1);
	const int nIndex2 = FindItem (&find2);
	const CString str1 = GetItemText (nIndex1, m_nLastCol & 0x7fffffff);
	const CString str2 = GetItemText (nIndex2, m_nLastCol & 0x7fffffff);
	return (m_nLastCol & 0x80000000) ^ str1.Compare (str2);
}
Example #12
0
bool CDz3Handler::DataHandler(CString op,CString scmd)
{
	if(op.Compare("compensate") == 0)
	{
		SqlSelect(PathQuery(CLSMDB,IDDATA),m_RGroup.sDataSel,m_RGroup.sRegSel);
		SqlSelect(PathQuery(CLSMDB,IDJH),m_RGroup.sJhSel1,PathQuery(CLSGROUP,IDJH));
		DataIntegrateForCompensate(g_msTemp,ZINDEX_MAX);
	}
	return CHtmlHandler::DataHandler(op,scmd);
}
Example #13
0
BOOL
CDynamoRIOView::UpdateProcessList()
{
    EnumerateInstances();
    CString first;
    m_ProcessList.GetLBText(0, first);
    if (first.Compare(_T("<select an instance>")) != 0)
        return FALSE;
    // Incredibly, VC6.0 says "error unreachable code" if I use an else here
    return TRUE;
}
bool
ArxDbgUiDlgGenericDefId::isNone() const
{
    CString str;
    AcDbObjectId id;
    if (m_entries.GetAtIndex(m_curIndex, str, id)) {
        if ((id == AcDbObjectId::kNull) && (str.Compare(AcadString::none) == 0))
            return true;
    }
    return false;
}
void CSpritePropPage::OnChangeName()
{
    if(m_View) {
        CString str;
        m_Name.GetWindowText(str);
        if(str.Compare(m_View->m_Sprite->m_Name)!=0) {
            m_View->SetUndoState("Change name");
            m_View->m_Sprite->SetName((char*)LPCSTR(str));
        }
    }
}
void CConfigurationDlg::OnBnClickedCancel()
{
   // TODO: Add your control notification handler code here
   CString windowText;
   this->GetParent()->GetWindowText(windowText);
   if (!windowText.Compare(_T("StaticDI")))
   {
      ::SendMessage(this->GetParent()->m_hWnd,WM_CUSTOME_CFG_CHGED,1,0);
      this->CloseWindow();
   } 
   OnCancel();
}
Example #17
0
void CSta::AddChan(CString ChanName, double dSpS, BOOL bSelected)
	{
	for(int i=0; i<ChanInfo.GetSize(); ++i)
		{
		if(ChanName.Compare(ChanInfo[i]->Chan)==0)
			{
			return;
			}
		}
	CChanInfo *ci=new CChanInfo(ChanName,dSpS,bSelected);
	ChanInfo.Add(ci);
	}
Example #18
0
void CSimSysManager::vSaveSimSys(CString omStrSimSysName)
{
    PSSIMSYSINFO psSimSys = m_ouSimSysNodeInfo.psReturnSimsysInfoListPtr();
    while (psSimSys != NULL)
    {
        if ( omStrSimSysName.Compare(psSimSys->m_omStrSimSysName) == 0 )
        {
            m_omSimSysConfig.nSaveConfiguration(psSimSys->m_omStrSimSysName,
                                                psSimSys );
        }
        psSimSys = psSimSys->m_psSimsysNext;
    }
}
/*-----------------------------------------------------------------------------
-----------------------------------------------------------------------------*/
bool CWinInetEvents::RegexMatch(CString str, CString regex) {
    bool matched = false;

    if (str.GetLength()) {
        if (!regex.GetLength() || !regex.Compare(_T("*")) || !str.CompareNoCase(regex)) {
            matched = true;
        } else if (regex.GetLength()) {
            std::tr1::regex match_regex(CT2A(regex), std::tr1::regex_constants::icase | std::tr1::regex_constants::ECMAScript);
            matched = std::tr1::regex_match((LPCSTR)CT2A(str), match_regex);
        }
    }

    return matched;
}
void CAddVideoDeviceJovisionDlg::OnEnChangeEditPasswd()
{
    CString txt;
    m_user_passwd.GetWindowTextW(txt);

    if (g_prev_check_use_default_passwd && user_) {
        if (txt.Compare(utf8::a2w(user_->get_global_user_passwd()).c_str()) != 0) {
            g_prev_check_use_default_passwd = 0;
            m_chk_use_default_user_passwd.SetCheck(0);
        }
    }

    device_->set_user_passwd(utf8::w2a((LPCTSTR)txt));
}
void CAddVideoDeviceJovisionDlg::OnEnChangeEditName()
{
    CString txt;
    m_user_name.GetWindowTextW(txt);

    if (g_prev_check_use_default_name && user_) {
        if (txt.Compare(user_->get_global_user_name().c_str()) != 0) {
            g_prev_check_use_default_name = 0;
            m_chk_use_default_user_name.SetCheck(0);
        }
    }

    device_->set_user_name((LPCTSTR)txt);
}
bool CTableFilterDlgForNotificationPlan::Initialize(CJQGridAPI* pJqGridAPI)
{
	bool bRet = false;

	do 
	{
		CSettingManager *pobjSettingManager = CSettingManager::GetInstance();
		if (NULL == pobjSettingManager)
		{
			break;
		}
		
		m_pJqGridAPI = pJqGridAPI;
		
		if (NULL == m_pJqGridAPI)
		{
			break;
		}
		

		CString strValue;

		for (int i = 0; i < nsNotification::end; ++i)
		{

			pobjSettingManager->GetTableFilterSettingForNotificationPlan(g_TableFilterSettingName[i][0], strValue);

			if (0 != strValue.Compare(IDS_SETTING_ITEM_TABLEFILTER_VALUE_CHECKED))
			{
				m_pJqGridAPI->HideCol(i);
			}
			else
			{
				m_pJqGridAPI->ShowCol(i);
			}

		}

		for (int i = 0; i < _countof(g_ColsMustBeHidden); i++)
		{
			m_pJqGridAPI->HideCol(g_ColsMustBeHidden[i]);
		}

		bRet = true;

	} while (false);

	return bRet;
}
Example #23
0
void CLoginDialog::OnBnClickedLoginbtn()
{
	GetDlgItem(IDC_SAVE)->ShowWindow(SW_NORMAL);
	GetDlgItem(IDC_BACK)->ShowWindow(SW_NORMAL);
	CString text;
	GetDlgItem(IDC_LoginBTN)->GetWindowText(text);
	SetDlgItemText(IDC_LOGTEXT,L"Log In");
	if(0==text.Compare(L"Submit")){
		accountSettings.SettingsSave();
		m_Account.Country=((CComboBox*) GetDlgItem(IDC_COUNTRY))->GetCurSel();
		std::string userPhone=countries[m_Account.Country][1];
		userPhone.erase(std::find(userPhone.begin(), userPhone.end(), '+'));
		userPhone.erase(std::find(userPhone.begin(), userPhone.end(), '-'));
		CString user(m_Account.username);
		user.Replace((CString)userPhone.c_str(),NULL);
		GetDlgItemText(IDC_PHONE,m_Account.username);
		CT2CA ansistring (m_Account.username);
		userPhone.append(ansistring);
		m_Account.username=(CString)userPhone.c_str();
		GetDlgItemText(IDC_PASSWORD,m_Account.password);
		accountSettings.accountId = accountId;
		
		//m_Account.rememberPassword=1;
		accountSettings.AccountSave(accountId, &m_Account);
		//accountSettings.SettingsSave();
		if(requestPassword()){
			accountSettings.account = m_Account;
			EndDialog(IDOK);
		}
		else
			SetDlgItemText(IDC_LOGTEXT,L"Wrong username or password");
	}
	else{
		caption="Log In";
		SetWindowText(caption);
		SetDlgItemText(IDC_LoginBTN,L"Submit");
		GetDlgItem(IDC_EMAIL)->ShowWindow(SW_HIDE);
		GetDlgItem(IDC_LOGTEXT)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_LOGO)->ShowWindow(SW_HIDE);
		GetDlgItem(IDC_COUNTRY)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_PHONE)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_CountryCode)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_PASSWORD)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_Register)->ShowWindow(SW_HIDE);
		((CButton*) GetDlgItem(IDC_SAVE))->SetCheck(BST_CHECKED);
		m_Account.rememberPassword=BST_CHECKED;
	}
	
}
Example #24
0
void CFilesHashDlg::OnBnClickedClean()
{
	if(!m_thrdData.threadWorking)
	{
		CString strBtnText;
		m_btnClr.GetWindowText(strBtnText);
		if(strBtnText.Compare(MAINDLG_CLEAR) == 0)
		{
			EnterCriticalSection(&g_criticalSection);
			{
				m_thrdData.strAll = _T("");
				m_thrdData.resultList.clear();
			
				m_editMain.SetWindowText(m_thrdData.strAll);
			}
			LeaveCriticalSection(&g_criticalSection);

			CStatic* pWnd =(CStatic *)GetDlgItem(IDC_STATIC_TIME);
			pWnd->SetWindowText(_T(""));
			pWnd = (CStatic*)GetDlgItem(IDC_STATIC_SPEED);
			pWnd->SetWindowText(_T(""));

			m_prog.SetPos(0);
			//m_progWhole.SetPos(0);
			SetWholeProgPos(0);
		}
		else if(strBtnText.Compare(MAINDLG_CLEAR_VERIFY) == 0)
		{
			m_bFind = FALSE; // 退出搜索模式
			m_btnClr.SetWindowText(MAINDLG_CLEAR);

			RefreshResult();
			RefreshMainText();
		}
	}
}
// FindMenuItem() will find a menu item string from the specified
// popup menu and returns its position (0-based) in the specified 
// popup menu. It returns -1 if no such menu item string is found.
int FindMenuItem(CMenu* Menu, LPCTSTR MenuString)
{
   ASSERT(Menu);
   ASSERT(::IsMenu(Menu->GetSafeHmenu()));

   int count = Menu->GetMenuItemCount();
   for (int i = 0; i < count; i++)
   {
      CString str;
      if (Menu->GetMenuString(i, str, MF_BYPOSITION) &&
         str.Compare(MenuString) == 0)
         return i;
   }

   return -1;
}
Example #26
0
void CLoginDialog::OnBnClickedRegister()
{
	GetDlgItem(IDC_SAVE)->ShowWindow(SW_HIDE);
	caption="Register";
	SetWindowText(caption);

	CStatic *m_Label;
	CFont *m_Font1 = new CFont;
	m_Font1->CreatePointFont(160, (CString)"Arial Bold");
	m_Label = (CStatic *)GetDlgItem(IDC_LOGTEXT);
	
	m_Label->SetWindowText(caption);
	m_Label->SetFont(m_Font1);

	CString text;
	GetDlgItemText(IDC_Register,text);

	if(0==text.Compare(_T("Submit"))){
		if(registration()){
			GetDlgItem(IDC_PinRem)->ShowWindow(SW_NORMAL);
			SetDlgItemText(IDC_PinRem,L"Submit");
			OnBnClickedPinrem();
		}
	}else{
		CString fieldText= _T("Phone Number");
		GetDlgItem(IDC_LOGTEXT)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_LOGO)->ShowWindow(SW_HIDE);
		GetDlgItem(IDC_COUNTRY)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_PHONE)->ShowWindow(SW_NORMAL);
		((CEdit*)GetDlgItem(IDC_PHONE))->SetWindowText(fieldText);
		GetDlgItem(IDC_CountryCode)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_Register)->ShowWindow(SW_NORMAL);
		GetDlgItem(IDC_LoginBTN)->ShowWindow(SW_HIDE);
		fieldText= _T("Please enter your email");
		GetDlgItem(IDC_EMAIL)->ShowWindow(SW_NORMAL);
		((CEdit*)GetDlgItem(IDC_EMAIL))->SetWindowText(fieldText);
		GetDlgItem(IDC_NAME)->ShowWindow(SW_NORMAL);
		fieldText= _T("Please enter your name");
		((CEdit*)GetDlgItem(IDC_NAME))->SetWindowText(fieldText);
		GetDlgItem(IDC_PinRem)->ShowWindow(SW_HIDE);
		GetDlgItem(IDC_BACK)->ShowWindow(SW_NORMAL);
		SetDlgItemText(IDC_Register,L"Submit");
	}
	
}
Example #27
0
BOOL CTestSetBatchView::SearchFile(CString strFileName)
{
	CFileFind finder;
	CString strTempFileName;

	BOOL bWorking = finder.FindFile("*.*");
	while ( bWorking )
	{
		bWorking = finder.FindNextFile();
		strTempFileName = finder.GetFileName();
		// 查找到文件名相同的返回true, 否则返回false
		if ( strTempFileName.Compare( strFileName ) == 0 )
		{
			return TRUE;
		}
	}
	return FALSE;
}
Example #28
0
void CWriteLogThread::RefreshLogFileName()
{
    CString strCurrentData;
    CTime testCTime;

    strCurrentData = CTime::GetCurrentTime().Format("%Y:%m:%d");

    if(strCurrentData.Compare(m_strCurrData) != 0)
    {
        //判断是否要进行日志文件清理,需要则清理之
        CheckCleanupFileLogFile();  

        m_strCurrData = strCurrentData;
        m_nLogFileIndex = 0;
        
        UpDataLogFileName();
    }
}
Example #29
0
bool CImportManager::HasSuppliersInstalled(bool bExcludeMtorrent)
{
	CString sMtorrentSupplier = LS (L_UTORRENT_MANAGER);

	int i = 0;
	for (i = 0; i <= m_arrSuppliers.GetUpperBound(); i++) {
		TSupplier& tSupplier = m_arrSuppliers[i];
		IDownloadSupplier* pSupplier = tSupplier.pSupplier;
		if (pSupplier) {
			CString sSupplierName = pSupplier->GetSupplierName();
			if (bExcludeMtorrent && sMtorrentSupplier.Compare(sSupplierName) == 0)
				continue;
			if (pSupplier->CheckSupplier())
				return true;
		}
	}
	return false;
}
BOOL CTableFilterDlgForNotificationPlan::OnInitDialog()
{
	__super::OnInitDialog();
	Util_Tools::Util::SetClientSize(m_hWnd, 837, 480);
	m_btnOK.MoveWindow(556, 40 * 11 - 20, 114, 30);
	m_btnCancel.MoveWindow(690, 40 * 11 - 20, 114, 30);
	CenterWindow();

	m_checkboxSelectAll = Util_Tools::Util::CreateCheckBox(this, IDC_CHECKBOX_SELECTALL, _T("全选"), _T("Microsoft YaHei"), 12);
	m_checkboxSelectAll->MoveWindow(80 * 1 + 80 * 0, 40 * 11 - 20, 100, 20);

	//const std::set<int>& hiddenCols = m_pJqGridAPI->getHiddenCols();

	//init check box according to user setting
	
	CSettingManager *pobjSettingManager = CSettingManager::GetInstance();
	if (NULL == pobjSettingManager)
	{
		return FALSE;
	}

	CString strValue;
	for (int i = 0; i < _countof(g_CheckBoxPos); ++i)
	{
		m_aCheckBoxs[i] = NULL;
		m_aCheckBoxs[i] = Util_Tools::Util::CreateCheckBox(this, IDC_CHECKBOX_BASE + i, g_CheckBoxCaptions[i][0], _T("Microsoft YaHei"), 12);
		m_aCheckBoxs[i]->MoveWindow(g_CheckBoxPos[i][0], g_CheckBoxPos[i][1], g_CheckBoxPos[i][2], g_CheckBoxPos[i][3]);

		pobjSettingManager->GetTableFilterSettingForNotificationPlan(g_TableFilterSettingName[i][0], strValue);

		if (0 == strValue.Compare(IDS_SETTING_ITEM_TABLEFILTER_VALUE_CHECKED))
		{
			m_aCheckBoxs[i]->SetCheck(TRUE);
		}
		else
		{
			m_aCheckBoxs[i]->SetCheck(FALSE);
		}

	}

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}