當前位置: 首頁>>代碼示例>>C++>>正文


C++ CheckChange函數代碼示例

本文整理匯總了C++中CheckChange函數的典型用法代碼示例。如果您正苦於以下問題:C++ CheckChange函數的具體用法?C++ CheckChange怎麽用?C++ CheckChange使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CheckChange函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: wxT

void dlgTablespace::OnVarAdd(wxCommandEvent &ev)
{
    wxString name=cbVarname->GetValue();
    wxString value;
    if (chkValue->IsShown())
        value = chkValue->GetValue() ? wxT("on") : wxT("off");
    else
        value = txtValue->GetValue().Strip(wxString::both);

    if (value.IsEmpty())
        value = wxT("DEFAULT");

    if (!name.IsEmpty())
    {
        long pos=lstVariables->FindItem(-1, name);
        if (pos < 0)
        {
            pos = lstVariables->GetItemCount();
            lstVariables->InsertItem(pos, name, 0);
        }
        lstVariables->SetItem(pos, 1, value);
    }
	dirtyVars = true;
    CheckChange();
}
開發者ID:xiul,項目名稱:Database-Designer-for-pgAdmin,代碼行數:25,代碼來源:dlgTablespace.cpp

示例2: CheckChange

void dlgTrigger::OnChange(wxCommandEvent &ev)
{
	if (chkUpdate->GetValue())
	{
		cbColumns->Enable();
	}
	else
	{
		if (lstColumns->GetItemCount() > 0)
		{
			if (wxMessageBox(_("Removing the UPDATE event will cause the column list to be cleared. Do you wish to continue?"), _("Remove UPDATE event?"), wxYES_NO) != wxYES)
			{
				chkUpdate->SetValue(true);
				return;
			}

			// Move all the columns back to the combo
			for (int pos = lstColumns->GetItemCount(); pos > 0; pos--)
			{
				wxString colName = lstColumns->GetItemText(pos - 1);

				lstColumns->DeleteItem(pos - 1);
				cbColumns->Append(colName);
			}
		}

		cbColumns->Disable();
		btnAddCol->Disable();
		btnRemoveCol->Disable();
	}

	CheckChange();
}
開發者ID:kleopatra999,項目名稱:pgadmin3,代碼行數:33,代碼來源:dlgTrigger.cpp

示例3: StrToLong

void dlgJob::OnChangeSchedule(wxCommandEvent &ev)
{
	long pos = lstSchedules->GetSelection();
	pgaSchedule *obj = (pgaSchedule *) StrToLong(lstSchedules->GetText(pos, 3));

	dlgSchedule schedule(&scheduleFactory, mainForm, obj, job);
	schedule.CenterOnParent();
	schedule.SetConnection(connection);

	if (schedule.Go(true) != wxID_CANCEL)
	{
		lstSchedules->SetItem(pos, 0, schedule.GetName());
		lstSchedules->SetItem(pos, 1, schedule.GetComment());

		if (lstSchedules->GetText(pos, 3).IsEmpty())
		{
			wxString *scheduleSql = new wxString(schedule.GetInsertSql());
			lstSchedules->SetItemData(pos, (long)scheduleSql);
		}
		else
		{
			wxString *scheduleSql = new wxString(schedule.GetUpdateSql());
			lstSchedules->SetItemData(pos, (long)scheduleSql);
		}

		CheckChange();
	}
}
開發者ID:GHnubsST,項目名稱:pgadmin3,代碼行數:28,代碼來源:dlgJob.cpp

示例4: wxLogError

void dlgFunction::OnChangeArg(wxCommandEvent &ev)
{
	if (GetSelectedDirection() == wxT("VARIADIC") &&
	        !cbDatatype->GetValue().EndsWith(wxT("[]")))
	{
		wxLogError(_("Only array types can be VARIADIC."));
		return;
	}

	int row = lstArguments->GetSelection();

	if (row >= 0)
	{
		lstArguments->SetItem(row, 0, cbDatatype->GetValue());
		lstArguments->SetItem(row, 1, GetSelectedDirection());
		lstArguments->SetItem(row, 2, txtArgName->GetValue());
		if (isBackendMinVer84)
			lstArguments->SetItem(row, 3, txtArgDefVal->GetValue());

		if (!function)
			argOids.Item(row) = typOids.Item(cbDatatype->GetGuessedSelection());
		txtArguments->SetValue(GetArgs());
	}
	OnChangeArgName(ev);
	CheckChange();
}
開發者ID:xiul,項目名稱:pgadmin3,代碼行數:26,代碼來源:dlgFunction.cpp

示例5: CheckChange

void dlgRole::OnVarRemove(wxCommandEvent &ev)
{
	if (lstVariables->GetSelection() == wxNOT_FOUND)
		return;
	lstVariables->DeleteCurrentItem();
	CheckChange();
}
開發者ID:search5,項目名稱:pgadmin3,代碼行數:7,代碼來源:dlgRole.cpp

示例6: CheckChange

void dlgForeignServer::OnAddOption(wxCommandEvent &ev)
{
	bool found = false;

	for (int pos = 0 ; pos < lstOptions->GetItemCount() ; pos++)
	{
		if (lstOptions->GetText(pos).IsSameAs(txtOption->GetValue(), false))
		{
			lstOptions->SetItem(pos, 1, txtValue->GetValue());
			found = true;
			break;
		}
	}

	if (!found)
	{
		lstOptions->AppendItem(txtOption->GetValue(), txtValue->GetValue());
	}

	txtOption->SetValue(wxT(""));
	txtValue->SetValue(wxT(""));
	btnAdd->Disable();

	CheckChange();
}
開發者ID:Timosha,項目名稱:pgadmin3,代碼行數:25,代碼來源:dlgForeignServer.cpp

示例7: CheckLenEnable

void dlgForeignTable::OnSelChangeTypOrLen(wxCommandEvent &ev)
{
	CheckLenEnable();
	txtLength->Enable(isVarLen);
	txtPrecision->Enable(isVarPrec);
	CheckChange();
	OnChangeMember(ev);
}
開發者ID:aiht,項目名稱:pgadmin3,代碼行數:8,代碼來源:dlgForeignTable.cpp

示例8: wxT

void dlgIndex::OnAddCol(wxCommandEvent &ev)
{
	wxString colName = cbColumns->GetValue();

	if (!colName.IsEmpty())
	{
		long colIndex = lstColumns->InsertItem(lstColumns->GetItemCount(), colName, columnFactory.GetIconId());


		if (this->database->BackendMinimumVersion(8, 3))
		{
			if (chkDesc->GetValue())
			{
				if (chkDesc->IsEnabled())
					lstColumns->SetItem(colIndex, 1, wxT("DESC"));


				if (rdbNullsLast->GetValue())
				{
					if (rdbNullsLast->IsEnabled())
						lstColumns->SetItem(colIndex, 2, wxT("LAST"));
				}
				else
				{
					if (rdbNullsLast->IsEnabled())
						lstColumns->SetItem(colIndex, 2, wxT("FIRST"));
				}
			}
			else
			{
				if (chkDesc->IsEnabled())
					lstColumns->SetItem(colIndex, 1, wxT("ASC"));

				if (rdbNullsFirst->GetValue())
				{
					if (rdbNullsFirst->IsEnabled())
						lstColumns->SetItem(colIndex, 2, wxT("FIRST"));
				}
				else
				{
					if (rdbNullsLast->IsEnabled())
						lstColumns->SetItem(colIndex, 2, wxT("LAST"));
				}
			}

			lstColumns->SetItem(colIndex, 3, cbOpClass->GetValue());
			lstColumns->SetItem(colIndex, 4, cbCollation->GetValue());
		}

		cbColumns->Delete(cbColumns->GetCurrentSelection());
		if (cbColumns->GetCount())
			cbColumns->SetSelection(0);

		CheckChange();
		if (!cbColumns->GetCount())
			btnAddCol->Disable();
	}
}
開發者ID:GHnubsST,項目名稱:pgadmin3,代碼行數:58,代碼來源:dlgIndex.cpp

示例9: CheckChange

void dlgFunction::OnChangeSetof(wxCommandEvent &ev)
{
	if (chkSetof->GetValue() && connection->BackendMinimumVersion(8, 3) && !isProcedure)
		txtRows->Enable();
	else
		txtRows->Disable();

	CheckChange();
}
開發者ID:xiul,項目名稱:pgadmin3,代碼行數:9,代碼來源:dlgFunction.cpp

示例10: CheckChange

void dlgTablespace::OnVarRemove(wxCommandEvent &ev)
{
    if (lstVariables->GetSelection() >= 0)
    {
        lstVariables->DeleteCurrentItem();
	    dirtyVars = true;
        CheckChange();
    }
}
開發者ID:xiul,項目名稱:Database-Designer-for-pgAdmin,代碼行數:9,代碼來源:dlgTablespace.cpp

示例11: Go

int dlgServer::GoNew()
{
	if (cbSSL->GetValue().IsEmpty())
		return Go(true);
	else
	{
		CheckChange();
		return ShowModal();
	}
}
開發者ID:mintsoft,項目名稱:pgadmin3,代碼行數:10,代碼來源:dlgServer.cpp

示例12: delete

void dlgJob::OnRemoveSchedule(wxCommandEvent &ev)
{
	delete (wxString *)lstSchedules->GetItemData(lstSchedules->GetSelection());
	lstSchedules->DeleteCurrentItem();

	btnChangeSchedule->Disable();
	btnRemoveSchedule->Disable();

	CheckChange();
}
開發者ID:GHnubsST,項目名稱:pgadmin3,代碼行數:10,代碼來源:dlgJob.cpp

示例13: CheckLenEnable

void dlgDomain::OnSelChangeTyp(wxCommandEvent &ev)
{
	if (!domain)
	{
		cbDatatype->GuessSelection(ev);
		CheckLenEnable();
		txtLength->Enable(isVarLen);
		CheckChange();
	}
}
開發者ID:dragansah,項目名稱:pgadmin3,代碼行數:10,代碼來源:dlgDomain.cpp

示例14: Update

void OpPackageKitProgress::Update()
{
    if (CheckChange() == false) {
        // No change has happened skip
        return;
    }

    // Set the new percent
    pk_backend_job_set_percentage(m_job, static_cast<unsigned int>(Percent));
}
開發者ID:Distrotech,項目名稱:packagekit,代碼行數:10,代碼來源:OpPackageKitProgress.cpp

示例15: CheckChange

void dlgUser::OnChangeCal(wxCalendarEvent &ev)
{
	CheckChange();

    bool timEn=ev.GetDate().IsValid();
    timValidUntil->Enable(timEn);
    if (!timEn)
        timValidUntil->SetTime(wxDefaultDateTime);
    else
        timValidUntil->SetTime(wxDateTime::Today());
}
開發者ID:xiul,項目名稱:Database-Designer-for-pgAdmin,代碼行數:11,代碼來源:dlgUser.cpp


注:本文中的CheckChange函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。