Ejemplo n.º 1
0
/////////////////////////////////////////////////////////////////////
// 
// Function:    Execute
//
// Description: 
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::Execute()
{
    UINT    uiReturnValue = 0;

    OnInitialize();

    if      ( TRUE == MsiGetMode( m_hMSIHandle, MSIRUNMODE_SCHEDULED ) )
    {
        uiReturnValue = OnInstall();
    }
    else if ( TRUE == MsiGetMode( m_hMSIHandle, MSIRUNMODE_COMMIT ) )
    {
        uiReturnValue = OnCommit();
    }
    else if ( TRUE == MsiGetMode( m_hMSIHandle, MSIRUNMODE_ROLLBACK ) )
    {
        uiReturnValue = OnRollback();
    }
    else
    {
        uiReturnValue = OnExecution();
    }

    OnCleanup();

    return uiReturnValue;
}
Ejemplo n.º 2
0
void
MsnWepDlg::ExecFrame()
{
	if (Keyboard::KeyDown(VK_RETURN)) {
		OnCommit(0);
	}
}
    void World::OnCommit()
    {
        for (auto iter = shapes_.cbegin(); iter != shapes_.cend(); ++iter)
        {
            auto shapeimpl = static_cast<ShapeImpl const*>(*iter);

            shapeimpl->OnCommit();
        }

        has_changed_ = false;
    }
Ejemplo n.º 4
0
void CatchupReader::ProcessMsg()
{
//	Log_Trace();

	if (msg.type == CATCHUP_KEY_VALUE)
		OnKeyValue();
	else if (msg.type == CATCHUP_COMMIT)
		OnCommit();
	else
		ASSERT_FAIL();
}
Ejemplo n.º 5
0
/********************************************************************************************

>	MsgResult TipsDlg::Message(Msg* pMessage)

	Author:		Colin_Barfoot (Xara Group Ltd) <*****@*****.**>
	Created:	03/08/96
	Purpose:	Dispatches messages to various other member functions beginning On...

********************************************************************************************/
MsgResult TipsDlg::Message(Msg* pMessage)
{
	if (IS_OUR_DIALOG_MSG(pMessage))
	{
		m_pCurrentMsg = (DialogMsg*)pMessage;
		
		switch (m_pCurrentMsg->DlgMsg)
		{
			case DIM_CREATE:
			{
				break;
			}

			case DIM_REDRAW:
			{	
				// Get the redraw information from the message
				ReDrawInfoType* pReDrawInfo = (ReDrawInfoType*) m_pCurrentMsg->DlgMsgParam;
				OnRedraw(pReDrawInfo);
				break;
			}

			case DIM_COMMIT:
				OnCommit();		// and fall through...

			case DIM_CANCEL:
				Close();		// Close and destroy the dialog 
				delete m_pTipTextGadget;
				End();			// WARNING: Destroys this!!!
				return (DLG_EAT_IF_HUNGRY((DialogMsg*)pMessage));	// End() destroyed m_...

			case DIM_LFT_BN_CLICKED:
				// A control on the dialog box has been clicked...
				switch (m_pCurrentMsg->GadgetID)
				{
					case _R(IDC_MORE):		// clicked on "Tell me more..."
						OnMoreHelp();
						return (DLG_EAT_IF_HUNGRY(m_pCurrentMsg));

					case _R(IDC_NEXTTIP):
						OnNextTip();
						break;
				}
				break; // DIM_LFT_BN_CLICKED		
		}
	}
	return OK;  
}  
Ejemplo n.º 6
0
HRESULT WpdObjectManagement::DispatchWpdMessage(
    const PROPERTYKEY&      Command,
    IPortableDeviceValues*  pParams,
    IPortableDeviceValues*  pResults)
{

    HRESULT hr = S_OK;

    if (hr == S_OK)
    {
        if (Command.fmtid != WPD_CATEGORY_OBJECT_MANAGEMENT)
        {
            hr = E_INVALIDARG;
            CHECK_HR(hr, "This object does not support this command category %ws",CComBSTR(Command.fmtid));
        }
    }

    if (hr == S_OK)
    {
        if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_DELETE_OBJECTS.pid)
        {
            hr = OnDelete(pParams, pResults);
            CHECK_HR(hr, "Failed to delete object");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_CREATE_OBJECT_WITH_PROPERTIES_ONLY.pid)
        {
            hr = OnCreateObjectWithPropertiesOnly(pParams, pResults);
            CHECK_HR(hr, "Failed to create object");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_CREATE_OBJECT_WITH_PROPERTIES_AND_DATA.pid)
        {
            hr = OnCreateObjectWithPropertiesAndData(pParams, pResults);
            CHECK_HR(hr, "Failed to create object");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_WRITE_OBJECT_DATA.pid)
        {
            hr = OnWriteObjectData(pParams, pResults);
            CHECK_HR(hr, "Failed to write object data");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_COMMIT_OBJECT.pid)
        {
            hr = OnCommit(pParams, pResults);
            CHECK_HR(hr, "Failed to commit object");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_REVERT_OBJECT.pid)
        {
            hr = OnRevert(pParams, pResults);
            CHECK_HR(hr, "Failed to revert object");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_MOVE_OBJECTS.pid)
        {
            hr = OnMove(pParams, pResults);
            CHECK_HR(hr, "Failed to Move objects");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_COPY_OBJECTS.pid)
        {
            hr = OnCopy(pParams, pResults);
            CHECK_HR(hr, "Failed to Copy objects");
        }
        else if (Command.pid == WPD_COMMAND_OBJECT_MANAGEMENT_UPDATE_OBJECT_WITH_PROPERTIES_AND_DATA.pid)
        {
            hr = OnUpdateObjectWithPropertiesAndData(pParams, pResults);
            CHECK_HR(hr, "Failed to update object");
        }
        else
        {
            hr = E_NOTIMPL;
            CHECK_HR(hr, "This object does not support this command id %d", Command.pid);
        }
    }

    return hr;
}
Ejemplo n.º 7
0
MsgResult URLImportDlg::Message(Msg* Message)
{	
	//If the message came from within our dialog 
	if (IS_OUR_DIALOG_MSG(Message))
	{
		//Then cast it into a dialog message and handle it
		DialogMsg* Msg = (DialogMsg*)Message;

		//If this flag gets set, we should close the dialog
		BOOL EndDialog = FALSE;

		//Now pass the message to a message handling function
		switch (Msg->DlgMsg)
		{
			case DIM_CREATE:
				OnCreate();
				break;

			case DIM_COMMIT:
				OnCommit();
				EndDialog=TRUE;
				break;

			case DIM_CANCEL:
				DialogWasCancelled=TRUE;
				EndDialog = TRUE;
				break;

			case DIM_LFT_BN_CLICKED:
				// A control on the dialog box has been clicked...
				if(Msg->GadgetID==_R(IDC_URLIMPORT_IMPORT))
				{
					OnCommit();
					EndDialog=TRUE;
				}
				break;


			case DIM_TEXT_CHANGED:
				// The user has typed in an edit field
				switch (Msg->GadgetID)
				{
					case _R(IDC_URLIMPORT_URL):
						if (URLImportDlg::DontHandleNextMessage)
							URLImportDlg::DontHandleNextMessage=FALSE;
						else
							OnURLChanged();
						break;
										
				}
				break;

 		}

		//And end the dialog if necessary
		if (EndDialog) 
		{
			Close();		
			End();			
		}
	}

	//Now pass the message down to the base class
	return DialogOp::Message(Message); 
}
Ejemplo n.º 8
0
void LogCtrlController::OnEnChangeCriteria()
{
	OnCommit();
}
Ejemplo n.º 9
0
MsgResult ImagemapDlg::Message(Msg* Message)
{
	//If the message came from within our dialog 
	if (IS_OUR_DIALOG_MSG(Message))
	{
		//Then cast it into a dialog message and handle it
		DialogMsg* Msg = (DialogMsg*)Message;

		//If this flag gets set, we should close the dialog
		BOOL EndDialog = FALSE;

		//Now pass the message to a message handling function
		switch (Msg->DlgMsg)
		{
			case DIM_CREATE:
				OnCreate();
				break;

			case DIM_COMMIT:
				OnCommit();
				EndDialog=TRUE;
				break;

			case DIM_CANCEL:
				DialogWasCancelled=TRUE;
				EndDialog = TRUE;
				break;

			case DIM_LFT_BN_CLICKED:
				// A control on the dialog box has been clicked...
				switch (Msg->GadgetID)
				{
					case _R(IDC_IMAGEMAP_AREA_SELECTION):
						OnAreaSelectionClicked();
						break;

					case _R(IDC_IMAGEMAP_AREA_DRAWING):
						OnAreaDrawingClicked();
						break;
				}
				break;

			case DIM_TEXT_CHANGED:
				// The user has typed in an edit field
				switch (Msg->GadgetID)
				{
					case _R(IDC_IMAGEMAP_WIDTH):
						if (ImagemapDlg::DontHandleNextMessage)
							ImagemapDlg::DontHandleNextMessage=FALSE;
						else
							OnWidthChanged();
						break;

					case _R(IDC_IMAGEMAP_HEIGHT):
						if (ImagemapDlg::DontHandleNextMessage)
							ImagemapDlg::DontHandleNextMessage=FALSE;
						else
							OnHeightChanged();
						break;
				}
				break;

 		}

		//And end the dialog if necessary
		if (EndDialog) 
		{
			Close();		
			End();			
		}
	}

	//Now pass the message down to the base class
	return DialogOp::Message(Message); 
}