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

📄 dbmsexample.rss

📁 SymbianOS的DBMS实例 详细的代码揭示SymbianOS数据库管理系统的使用 很规范
💻 RSS
字号:
/*
* ============================================================================
*  Name     : DBMSexample.rss
*  Part of  : DBMSexample
*  Created  : 02/28/2003 by Forum Nokia
*  Description:
*     This file contains all the resources for the DBMSexample.
*  Version  :
*  Copyright: Nokia Corporation, 2003
* ============================================================================
*/

//  RESOURCE IDENTIFIER
NAME    AWIZ // 4 letter ID

//  INCLUDES

#include <eikon.rh>
#include "dbmsexample.hrh"
#include "dbmsexample.loc"
#include <avkon.rsg>
#include <avkon.rh>
#include <avkon.mbg>

//  RESOURCE DEFINITIONS 

RESOURCE RSS_SIGNATURE { }

RESOURCE TBUF { buf = "DBMSexample"; }

// The following code will generate the navi pane
RESOURCE EIK_APP_INFO
    {
    hotkeys = r_dbmsexample_hotkeys;
    menubar = r_dbmsexample_menubar;
	cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;     
    }

//----------------------------------------------------
//   
//    r_dbmsexample_hotkeys
//
//----------------------------------------------------
//
RESOURCE HOTKEYS r_dbmsexample_hotkeys
    {
    control=
        {
        HOTKEY { command=EAknCmdExit; key='e'; }
        };
    }

//----------------------------------------------------
//   
//    r_dbmsexample_menubar
//
//----------------------------------------------------
//
RESOURCE MENU_BAR r_dbmsexample_menubar
    {
    titles=
        {
        MENU_TITLE { menu_pane = r_dbmsexample_menu; txt = ""; }
        };
    }

//----------------------------------------------------
//   
//    r_dbmsexample_menu
//
//----------------------------------------------------
//
RESOURCE MENU_PANE r_dbmsexample_menu
    {
    items=
        {
        MENU_ITEM { command = EDBMSexampleCmdCreateRecord; txt = qtn_create_record; },
        MENU_ITEM { command = EDBMSexampleCmdDeleteRecord; txt = qtn_delete_record; },
        MENU_ITEM { command = EDBMSexampleCmdUpdateRecord; txt = qtn_update_record; },
        MENU_ITEM { command = EDBMSexampleCmdRetrieveRecord; txt = qtn_retrieve_record; },
        MENU_ITEM { command = EDBMSexampleCmdCreateDatabase; txt = qtn_create_database; },
        MENU_ITEM { command = EAknCmdExit; txt = qtn_exit; }
        };
    }

//----------------------------------------------------
//   
//    r_dbms_create_done
//    ?description
//
//----------------------------------------------------
// 
RESOURCE CBA r_dbms_create_cancel
	{
	buttons = 
		{
		CBA_BUTTON { id=EDBMSexampleCmdSaveRecord; txt = qtn_done; },
		CBA_BUTTON { id=EAknSoftkeyCancel; txt = qtn_cancel; }
		} ;
	}

//----------------------------------------------------
//   
//    r_dbms_update_cancel
//    ?description
//
//----------------------------------------------------
// 
RESOURCE CBA r_dbms_update_cancel
	{
	buttons = 
		{
		CBA_BUTTON {id=EDBMSexampleCmdChangeRecord; txt=qtn_done;},
		CBA_BUTTON {id=EAknSoftkeyCancel; txt=qtn_cancel;}
		} ;
	}

//----------------------------------------------------
//   
//    r_dbms_update_cancel
//    ?description
//
//----------------------------------------------------
// 
RESOURCE CBA r_dbms_delete_cancel
	{
	buttons = 
		{
		CBA_BUTTON {id=EDBMSexampleCmdRemoveRecord; txt=qtn_done;},
		CBA_BUTTON {id=EAknSoftkeyCancel; txt=qtn_cancel;}
		} ;
	}

RESOURCE TBUF64 r_record_info_text
    {
    buf = qtn_record_info_text;
    }

RESOURCE TBUF64 r_create_record
    {
    buf = qtn_create_record;
    }

RESOURCE TBUF64 r_delete_record
    {
    buf = qtn_delete_record;
    }

RESOURCE TBUF64 r_update_record
    {
    buf = qtn_update_record;
    }

#define AKNEXFORM_NUMBER_EDITOR_MIN_VALUE01   0
#define AKNEXFORM_NUMBER_EDITOR_MAX_VALUE01   100000000
#define AKNEXFORM_NUMBER_EDITOR_MIN_VALUE02    0
#define AKNEXFORM_NUMBER_EDITOR_MAX_VALUE02   10
#define AKNEXFORM_EDWIN_WIDTH                  1
#define AKNEXFORM_EDWIN_LINES                  2
#define AKNEXFORM_DATE_MAX_DAY_VALUE          30
#define AKNEXFORM_DATE_MIN_DAY_VALUE           0
#define AKNEXFORM_DATE_MAX_MONTH_VALUE        11
#define AKNEXFORM_DATE_MIN_MONTH_VALUE         0
#define AKNEXFORM_DATE_MAX_YEAR_VALUE       2020
#define AKNEXFORM_DATE_MIN_YEAR_VALUE       1900

//-----------------------------------------------------------------------------
//
//    r_aknexform_text_number_field_dialog
//    Standard for Form. there are a text field and number field.
//
//-----------------------------------------------------------------------------
//
RESOURCE DIALOG r_manage_database_dialog
    {
    flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
            EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder |
            EEikDialogFlagCbaButtons | EEikDialogFlagNotifyEsc;
    buttons = r_dbms_create_cancel;
    form = r_manage_database_form;
    }

//-----------------------------------------------------------------------------
//
//    r_aknexform_text_number_field_form
//    Standard for Form. there are a text field and number field.
//
//-----------------------------------------------------------------------------
//
#define AKNPOPFIELD_TEXT_WIDTH          8

RESOURCE FORM r_manage_database_form
    {
    items =
        {
		// NAME
        DLG_LINE
            {
            type = EEikCtEdwin;
            prompt = qtn_record_name_label_edwin;
            id = EAknFormDlgCtrlIdEdwin_Name;
            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
            control = EDWIN
                {
                flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
                width = AKNEXFORM_EDWIN_WIDTH;
                lines = AKNEXFORM_EDWIN_LINES;
                maxlength = EAknExFormEdwinMaxLength;
                // added to limit expanding in forms. 
                // If you want full screen use 5 here
                max_view_height_in_lines = 5; 
                // if you have the line above, you must have this.  
                // It's calculable from LAF
                base_line_delta = 21; 

                };
            },

		// Sex. It is better a popup window
        DLG_LINE
           {
           type = EAknCtPopupField;
           prompt = qtn_aknpopfield_label_txt;
           id = EAknPopFieldDlgCtrlIdText_Sex;
           itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys |
					   EEikDlgItemSeparatorAfter;
           control = POPUP_FIELD
                {
                width = AKNPOPFIELD_TEXT_WIDTH;
                other = qtn_aknpopfield_list_other;
                };
           tooltip = qtn_aknpopfield_hint_text;
           },


		// Date of birth
        DLG_LINE
            {
            type = EEikCtDateEditor;
            prompt = qtn_record_birth_label_date;
            id = EAknFormDlgCtrlIdDate_Birth;
            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
            control = DATE_EDITOR
                {
                minDate = DATE
                    {
                    day = AKNEXFORM_DATE_MIN_DAY_VALUE;
                    month = AKNEXFORM_DATE_MIN_MONTH_VALUE;
                    year = AKNEXFORM_DATE_MIN_YEAR_VALUE;
                    };
                maxDate = DATE
                    {
                    day = AKNEXFORM_DATE_MAX_DAY_VALUE;
                    month = AKNEXFORM_DATE_MAX_MONTH_VALUE;
                    year = AKNEXFORM_DATE_MAX_YEAR_VALUE;
                    };
                };
            },

		// ID
        DLG_LINE
            {
            type = EEikCtNumberEditor;
            prompt = qtn_record_id_label_number;
            id = EAknFormDlgCtrlIdNumber_Id;
            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
            control = NUMBER_EDITOR
                {
                min = AKNEXFORM_NUMBER_EDITOR_MIN_VALUE01;
                max = AKNEXFORM_NUMBER_EDITOR_MAX_VALUE01;
                };
            }
        };
    }

RESOURCE ARRAY r_aknpopfield_sex_text_array
    {
    items =
        {
        LBUF
            {
            txt = qtn_aknpopfield_list_male;
            },
        LBUF
            {
            txt = qtn_aknpopfield_list_female;
            }
        };
    }

RESOURCE TBUF256 r_aknpopfield_query_prompt
    {
    buf = qtn_aknpopfield_query_prompt;
    }
           
//-----------------------------------------------------------------------------
//
//    r_aknexquery_confirmation_query_default_icon
//    Resource of Confirmation Query with default icon.
//
//-----------------------------------------------------------------------------
//
RESOURCE DIALOG r_confirmation_query_default
    {
    flags = EGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_YES_NO;
    items =
        {
        DLG_LINE
            {
            type = EAknCtQuery;
            id = EGeneralQuery;
            control = AVKON_CONFIRMATION_QUERY
                {
                layout = EConfirmationQueryLayout;
                label = qtn_query_label_text;
                };
            }
        };
    }

RESOURCE DIALOG r_confirmation_query_delete
    {
    flags = EGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_YES_NO;
    items =
        {
        DLG_LINE
            {
            type = EAknCtQuery;
            id = EGeneralQuery;
            control = AVKON_CONFIRMATION_QUERY
                {
                layout = EConfirmationQueryLayout;
                label = qtn_confirm_to_delete;
                };
            }
        };
    }

RESOURCE DIALOG r_confirmation_query_create
    {
    flags = EGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_YES_NO;
    items =
        {
        DLG_LINE
            {
            type = EAknCtQuery;
            id = EGeneralQuery;
            control = AVKON_CONFIRMATION_QUERY
                {
                layout = EConfirmationQueryLayout;
                label = qtn_confirm_to_create;
                };
            }
        };
    }

RESOURCE DIALOG r_confirmation_query_update
    {
    flags = EGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_YES_NO;
    items =
        {
        DLG_LINE
            {
            type = EAknCtQuery;
            id = EGeneralQuery;
            control = AVKON_CONFIRMATION_QUERY
                {
                layout = EConfirmationQueryLayout;
                label = qtn_confirm_to_update;
                };
            }
        };
    }

RESOURCE TBUF64 r_application_name_text
    {
    buf = qtn_application_name_text;
    }

RESOURCE TBUF64 r_please_create_db_first 
	{
	buf = qtn_please_create_db_first;
	}

RESOURCE TBUF64 r_dbms_example_app
	{
	buf = qtn_dbms_example_app;
	}

RESOURCE TBUF64 r_add_record1
	{
	buf = qtn_add_record1;
	}

RESOURCE TBUF64 r_delete_record1
	{
	buf = qtn_delete_record1;
	}

RESOURCE TBUF64 r_update_record1
	{
	buf = qtn_update_record1;
	}

RESOURCE TBUF64 r_no_record_in_database
	{
	buf = qtn_no_record_in_database;
	}

RESOURCE TBUF64 r_database_created
	{
	buf = qtn_database_created;
	}

⌨️ 快捷键说明

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