当前位置: 首页>>代码示例>>C++>>正文


C++ ContentManager::Construct方法代码示例

本文整理汇总了C++中ContentManager::Construct方法的典型用法代码示例。如果您正苦于以下问题:C++ ContentManager::Construct方法的具体用法?C++ ContentManager::Construct怎么用?C++ ContentManager::Construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ContentManager的用法示例。


在下文中一共展示了ContentManager::Construct方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnActionPerformed

void FPlayer::OnActionPerformed(const Osp::Ui::Control& source, int actionId) {
	if (actionId == ABACK) {
		Frame *pFrame = Application::GetInstance()->GetAppFrame()->GetFrame();
		FormMgr *pFormMgr = static_cast<FormMgr *>(pFrame->GetControl("FormMgr"));
		pFormMgr->SendUserEvent(FormMgr::REQUEST_MAINFORM, null);
	} else if (actionId == APLAYPAUSE) {
		HideControlsTimer_->Cancel();
		infobtn->SetShowState(pPlayerThread_->playing);
		deletebtn->SetShowState(pPlayerThread_->playing);
		exportbtn->SetShowState(pPlayerThread_->playing);
		//editbtn->SetShowState(pPlayerThread_->playing);
		nextframebtn->SetShowState(pPlayerThread_->playing);
		prevframebtn->SetShowState(pPlayerThread_->playing);
		speedbtn->SetShowState(pPlayerThread_->playing);
		if (pPlayerThread_->playing == true) {
			playpausebtn->SetNormalBackgroundBitmap(*playpausebtnbmpn_);
			playpausebtn->SetPressedBackgroundBitmap(*playpausebtnbmps_);
			controlsarevisible = true;
			backbtn->SetShowState(true);
			playpausebtn->SetShowState(true);
		} else {
			playpausebtn->SetNormalBackgroundBitmap(*playpausepausebtnbmpn_);
			playpausebtn->SetPressedBackgroundBitmap(*playpausepausebtnbmps_);
		}
		RedrawDisplayBuffer(displaybuffer_->GetBounds());
		this->RequestRedraw();
		if (pPlayerThread_->playing != true) {
			Osp::System::PowerManager::KeepScreenOnState(true, false);
			HideControlsTimer_->Start(2000);
		} else {
			Osp::System::PowerManager::KeepScreenOnState(false, true);
		}
		pPlayerThread_->SendUserEvent(pPlayerThread_->THREAD_PLAYPAUSE, null);
	} else if (actionId == APREVFRAME) {
		if (pPlayerThread_->playing != true) {
			pPlayerThread_->SendUserEvent(pPlayerThread_->THREAD_PREVFRAME, null);
		}
	} else if (actionId == ANEXTFRAME) {
		if (pPlayerThread_->playing != true) {
			pPlayerThread_->SendUserEvent(pPlayerThread_->THREAD_NEXTFRAME, null);
		}
	} else if (actionId == ADELETEVIDEO) {
		if (pPlayerThread_->playing != true) {
			MessageBox msgbox;
			int modalResult = 0;
			msgbox.Construct("Delete?", "Do you want to delete video?", MSGBOX_STYLE_YESNO, 0);
			msgbox.ShowAndWait(modalResult);
			if (modalResult == MSGBOX_RESULT_YES) {
				Osp::Base::String filename = pPlayerThread_->filename;
				pPlayerThread_->Stop();
				pPlayerThread_->Join();
				delete pPlayerThread_;
				pPlayerThread_ = null;
				if (Osp::Io::File::IsFileExist(filename)) {
					Osp::Io::File::Remove(filename);
				}
				Frame *pFrame = Application::GetInstance()->GetAppFrame()->GetFrame();
				FormMgr *pFormMgr = static_cast<FormMgr *>(pFrame->GetControl("FormMgr"));
				pFormMgr->SendUserEvent(FormMgr::REQUEST_MAINFORM, null);
			}
		}
	} else if (actionId == ASHOWINFO) {
		if (pPlayerThread_->playing != true) {
			Osp::Base::String strvalue;

			Osp::Ui::Controls::Label * infopopuplresel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLRES"));
			Osp::Ui::Controls::Label * infopopupstimeel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLSTIME"));
			Osp::Ui::Controls::Label * infopopupetimeel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLETIME"));
			Osp::Ui::Controls::Label * infopopupframesel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLFRAMES"));
			Osp::Ui::Controls::Label * infopopupfilesizeel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLFILESIZE"));
			Osp::Ui::Controls::Label * infopopupftimeel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLFTIME"));
			Osp::Ui::Controls::Label * infopopupframenel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLFRAMEN"));
			Osp::Ui::Controls::Label * infopopupframesizeel_ = static_cast<Label *>(infopopup_->GetControl(L"LBLFRAMESIZE"));

			infopopuplresel_->SetText(Osp::Base::Integer::ToString(pPlayerThread_->resolution.width) + L"x" + Osp::Base::Integer::ToString(pPlayerThread_->resolution.height));
			infopopupstimeel_->SetText(pPlayerThread_->startframetime.ToString());
			infopopupetimeel_->SetText(pPlayerThread_->endframetime.ToString());
			infopopupframesel_->SetText(Osp::Base::Integer::ToString(pPlayerThread_->framescount));

			if (pPlayerThread_->filesize > 1048576) {
				strvalue = L"";
				strvalue.Format(25,L"%.2f",(double)(pPlayerThread_->filesize / 1048576.0f));
				strvalue.Append(L" Mb");
			} else {
				strvalue = L"";
				strvalue.Append((int)(pPlayerThread_->filesize / 1024));
				strvalue.Append(L" Kb");
			}
			infopopupfilesizeel_->SetText(strvalue);

			infopopupftimeel_->SetText(pPlayerThread_->curframedatetime.ToString());
			infopopupframenel_->SetText(Osp::Base::Integer::ToString(pPlayerThread_->curframe));

			if (pPlayerThread_->curframesize > 1048576) {
				strvalue = L"";
				strvalue.Format(25,L"%.2f",(double)(pPlayerThread_->curframesize / 1048576.0f));
				strvalue.Append(L" Mb");
			} else {
				strvalue = L"";
				strvalue.Append((int)(pPlayerThread_->curframesize / 1024));
//.........这里部分代码省略.........
开发者ID:BoboTheRobot,项目名称:Badaprojects,代码行数:101,代码来源:FPlayer.cpp


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