⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cssyncappui.cpp

📁 Symbian Client_Server_Application
💻 CPP
字号:
/*
* ==============================================================================
*  Name        :CSSyncAppUi.cpp
*  Part of     : clientserversync
*  Interface   : 
*  Description : 
*  Version     : 
* ==============================================================================
*/


// INCLUDE FILES
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <CSSync.rsg>
#include <f32file.h>
#include <s32file.h>
#include <eikmenup.h>

#include "CSSync.pan"
#include "CSSyncAppUi.h"
#include "CSSyncAppView.h"
#include "CSSyncDocument.h"
#include "CSSync.hrh"

// ============================ MEMBER FUNCTIONS ===============================


// -----------------------------------------------------------------------------
// CCSSyncAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CCSSyncAppUi::ConstructL()
    {
    // Initialise app UI with standard value.
    BaseConstructL();

    // Create view object
    iAppView = CCSSyncAppView::NewL( ClientRect(),*SyncDocument() );

	AddToStackL( iAppView );
    }
// -----------------------------------------------------------------------------
// CCSSyncAppUi::CCSSyncAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CCSSyncAppUi::CCSSyncAppUi()
    {
    // No implementation required
    }

// -----------------------------------------------------------------------------
// CCSSyncAppUi::~CCSSyncAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CCSSyncAppUi::~CCSSyncAppUi()
    {
    if ( iAppView )
        {
iEikonEnv->RemoveFromStack( iAppView );
        delete iAppView;
        iAppView = NULL;
        }

    }



// -----------------------------------------------------------------------------
// CCSSyncAppUi::SyncDocument()
// Casts iDocument member from CAknAppUi to CCSSyncDocument.
// -----------------------------------------------------------------------------
//
CCSSyncDocument* CCSSyncAppUi::SyncDocument() const
    {
    return static_cast<CCSSyncDocument*>( iDocument );
    }
// -----------------------------------------------------------------------------
// CCSSyncAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CCSSyncAppUi::HandleCommandL( TInt aCommand )
    {
    switch( aCommand )
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;
        case EFileCreation:
            SyncDocument()->CreateFile();
            break;
        case EFileDeletion:
  			SyncDocument()->DeleteFile();
			break;
        default:
            User::Panic ( KCSSyncClient, ECSSyncBasicUi );
            break;
        }
    }
// -----------------------------------------------------------------------------
//  Called by the framework when the application status pane
//  size is changed.  Passes the new client rectangle to the
//  AppView
// -----------------------------------------------------------------------------
//
void CCSSyncAppUi::HandleStatusPaneSizeChange()
{
	iAppView->SetRect( ClientRect() );
	
} 


// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -