form_FATEditor.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:7k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * form_FATEditor.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * FAT editor form header
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- //---------------------------------------------------------------------------
- #ifndef _FORM_FATEDITOR_H_
- #define _FORM_FATEDITOR_H_
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <ComCtrls.hpp>
- #include <Buttons.hpp>
- #include <ExtCtrls.hpp>
- #include "FAT_Editor.h"
- #include "FAT_unit.h"
- #include <Dialogs.hpp>
- #include <FileCtrl.hpp>
- #define STATUS_BAR_INDEX_STATUS 0
- #define STATUS_BAR_INDEX_FILENAME 1
- #define STATUS_BAR_INDEX_SENT_AND_TOTAL 2
- #define STATUS_BAR_INDEX_PERCENT 3
- //---------------------------------------------------------------------------
- class TfrmFATEditor : public TForm
- {
- __published: // IDE-managed Components
- TPageControl *PageControl1;
- TTabSheet *TabSheet1;
- TListBox *lbFATFile;
- TLabel *Label1;
- TListBox *lbFATDirectory;
- TLabel *Label2;
- TBitBtn *btnGetDirectoryList;
- TBitBtn *btnGetFileList;
- TStatusBar *sbFAT;
- TLabel *Label3;
- TBitBtn *btnReadFromFAT;
- TOpenDialog *OpenDialog;
- TSaveDialog *SaveDialog;
- TLabel *Label4;
- TDriveComboBox *cbDrive;
- TLabel *Label5;
- TDirectoryListBox *lbLocalDir;
- TLabel *Label6;
- TFileListBox *lbLocalFile;
- TLabel *Label7;
- TFilterComboBox *cbLocalFiletype;
- TBitBtn *btnWriteToFAT;
- TLabel *Label8;
- TBitBtn *btnDeleteFromFAT;
- TTimer *TimerFATProgressTimer;
- TEdit *edtFileType;
- TProgressBar *pbFAT;
- TEdit *edtCurrentFATPath;
- TTimer *HintTimer;
- TStaticText *lblHint;
- TBitBtn *btnGetFATDiskInfo;
- TLabel *lblSectorPerCluster;
- TStaticText *stSectorPerCluster;
- TLabel *lblFATTotalSize;
- TStaticText *stFATTotalSize;
- TLabel *lblFATFreeSpace;
- TStaticText *stFATFreeSpace;
- TGroupBox *GroupBox1;
- TRadioButton *m_rbRecursive;
- TRadioButton *m_rbCurDir;
- void __fastcall btnGetDirectoryListClick(TObject *Sender);
- void __fastcall btnGetFileListClick(TObject *Sender);
- void __fastcall btnReadFromFATClick(TObject *Sender);
- void __fastcall btnWriteToFATClick(TObject *Sender);
- void __fastcall btnDeleteFromFATClick(TObject *Sender);
- void __fastcall OnTimerFATProgressTmer(TObject *Sender);
- void __fastcall cbDriveChange(TObject *Sender);
- void __fastcall lbLocalDirChange(TObject *Sender);
- void __fastcall cbLocalFiletypeChange(TObject *Sender);
- void __fastcall FormShow(TObject *Sender);
- void __fastcall lbFATDirectoryClick(TObject *Sender);
- void __fastcall btnGetFATDiskInfoClick(TObject *Sender);
- void __fastcall FormActivate(TObject *Sender);
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
-
- private: // User declarations
- //S_FAT_T m_psFAT;
- bool m_bInit;
- bool m_bFirstFormShow;
- CFATEDITOR m_cFAT_EDITOR_Obj;
- char FAT_filename[MAX_FILE_PATH_LEN];
- char local_filepath[MAX_FILE_PATH_LEN];
- // char local_filename[MAX_FILE_PATH_LEN];
- // char *filetype;
- AnsiString as_filetype;
- AnsiString as_default_FAT_name;
- AnsiString as_local_filename;
- //AnsiString m_asCurrentFatPath;
- //AnsiString m_asParentFatPath;
- public: // User declarations
- __fastcall TfrmFATEditor(TComponent* Owner);
- void Init(void);
- void CurrentPageReset(void);
- void CurrentPageLock(void);
- void clearProgressBar(void);
- void clearAllPanel(void);
- void ShowHintLabel(TControl *sender, char* hint);
- void DisplayFATErrorMsg(void);
- // callback
- void CNF_GetFATDiskInfo(void);
- void CNF_FATGetDirectoryInfo(void);
- void CNF_FATGetFileInfo(void);
- void CNF_FAT_Read_To_File(void);
- void CNF_FAT_Write_By_File(void);
- void CNF_FAT_Delete(void);
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TfrmFATEditor *frmFATEditor;
- //---------------------------------------------------------------------------
- #endif