• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CheckChange函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CheckChange函数的典型用法代码示例。如果您正苦于以下问题:C++ CheckChange函数的具体用法?C++ CheckChange怎么用?C++ CheckChange使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CheckChange函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: wxMessageBox

void dlgSchedule::OnChangeException(wxCommandEvent &ev)
{
	if (!calException->GetValue().IsValid() && timException->GetValue().IsNull())
	{
		wxMessageBox(_("You must enter a valid date and/or time!"), _("Add exception"), wxICON_EXCLAMATION | wxOK, this);
		return;
	}

	wxString exDate, exTime;

	if (calException->GetValue().IsValid())
		exDate = calException->GetValue().FormatDate();
	else
		exDate = _("<any>");

	if (!timException->GetValue().IsNull())
		exTime = timException->GetValue().Format();
	else
		exTime = _("<any>");

	long item = lstExceptions->GetFocusedItem();

	for (int pos = 0; pos < lstExceptions->GetItemCount(); pos++)
	{
		if (item != pos)
		{
			if (lstExceptions->GetText(pos, 0) == exDate &&
			        lstExceptions->GetText(pos, 1) == exTime)
			{
				wxMessageBox(_("The specified exception already exists!"), _("Add exception"), wxICON_EXCLAMATION | wxOK, this);
				return;
			}

			if (lstExceptions->GetText(pos, 0) == exDate &&
			        lstExceptions->GetText(pos, 1) == _("<any>"))
			{
				wxMessageBox(_("An exception already exists for any time on this date!"), _("Add exception"), wxICON_EXCLAMATION | wxOK, this);
				return;
			}

			if (lstExceptions->GetText(pos, 1) == exTime &&
			        lstExceptions->GetText(pos, 0) == _("<any>"))
			{
				wxMessageBox(_("An exception already exists for this time on any date!"), _("Add exception"), wxICON_EXCLAMATION | wxOK, this);
				return;
			}
		}
	}

	lstExceptions->SetItem(item, 0, exDate);
	lstExceptions->SetItem(item, 1, exTime);
	lstExceptions->SetItem(item, 2, BoolToStr(true));
	CheckChange();
}
开发者ID:aiht,项目名称:pgadmin3,代码行数:54,代码来源:dlgSchedule.cpp


示例17: CheckLenEnable

void dlgColumn::OnSelChangeTyp(wxCommandEvent &ev)
{
	cbDatatype->GuessSelection(ev);

	CheckLenEnable();
	txtLength->Enable(isVarLen);

	bool isSerial = (cbDatatype->GetValue() == wxT("serial") || cbDatatype->GetValue() == wxT("bigserial") || cbDatatype->GetValue() == wxT("smallserial"));
	txtDefault->Enable(!isSerial);

	CheckChange();
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:12,代码来源:dlgColumn.cpp


示例18: wxT

void dlgDatabase::OnVarAdd(wxCommandEvent &ev)
{
	wxString username = cbVarUsername->GetValue();
	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())
	{
		bool found = false;
		long prevpos = -1;
		for (long item = 0; item < lstVariables->GetItemCount(); item++)
		{
			if (name == lstVariables->GetText(item, 1))
			{
				if (username == lstVariables->GetText(item))
				{
					found = true;
					lstVariables->SetItem(item, 2, value);
				}
				else
				{
					prevpos = item;
				}
			}
		}
		if (!found)
		{
			if (prevpos != -1)
			{
				lstVariables->InsertItem(prevpos, username, 1);
				lstVariables->SetItem(prevpos, 1, name);
				lstVariables->SetItem(prevpos, 2, value);
			}
			else
			{
				long pos = lstVariables->GetItemCount();
				lstVariables->InsertItem(pos, username, 1);
				lstVariables->SetItem(pos, 1, name);
				lstVariables->SetItem(pos, 2, value);
			}
		}
	}
	dirtyVars = true;
	CheckChange();
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:52,代码来源:dlgDatabase.cpp


示例19: CheckChange

void dlgGroup::OnUserAdd(wxCommandEvent &ev)
{
    if (!readOnly)
    {
        int pos = lbUsersNotIn->GetSelection();
        if (pos >= 0)
        {
            lbUsersIn->Append(lbUsersNotIn->GetString(pos));
            lbUsersNotIn->Delete(pos);
        }
        CheckChange();
    }
}
开发者ID:douglasresende,项目名称:pgadmin3,代码行数:13,代码来源:dlgGroup.cpp


示例20: schedule

void dlgJob::OnAddSchedule(wxCommandEvent &ev)
{
	dlgSchedule schedule(&scheduleFactory, mainForm, NULL, job);
	schedule.CenterOnParent();
	schedule.SetConnection(connection);
	if (schedule.Go(true) != wxID_CANCEL)
	{
		int pos = lstSchedules->AppendItem(scheduleFactory.GetIconId(), schedule.GetName(), schedule.GetComment());
		wxString *scheduleSql = new wxString(schedule.GetInsertSql());
		lstSchedules->SetItemData(pos, (long)scheduleSql);
		CheckChange();
	}
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:13,代码来源:dlgJob.cpp



注:本文中的CheckChange函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CheckClientID函数代码示例发布时间:2022-05-30
下一篇:
C++ CheckCTRStatus函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap