Click here to Skip to main content
12,243,173 members (22,408 online)
Click here to Skip to main content

Stats

39.6K views
438 downloads
43 bookmarked
Posted

TDL: Protocol for .dan.g.'s ToDoList, Useful for SVN Users

, 25 Apr 2008 CPOL
Register a fake protocol of TDL: to make tdl:///filename.tdl?tid available
//---------------------------------------------------------------------------

#ifndef MainFormUnitH
#define MainFormUnitH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <XPMan.hpp>
#include "HyperlinkWrapper.h"
#include <ExtCtrls.hpp>
#include <Dialogs.hpp>
//---------------------------------------------------------------------------
class TMainForm : public TForm
{
__published:	// IDE-managed Components
    TXPManifest *XPManifest;
    TPanel *PanelTop;
    TLabel *LabelWelcome;
    TLabel *Label1;
    TLabel *LabelAbout;
    TShape *Shape1;
    TPanel *Panel1;
    TShape *Shape2;
    TLabel *LabelUnreg;
    TLabel *LabelRegMessage;
    TLabel *LabelReg;
    TPanel *Panel2;
    TShape *Shape3;
    TLabel *LabelConfigMessage;
    TPanel *Panel3;
    TLabel *LabelClose;
    TLabel *LabelSaveReg;
    TLabel *LabelSaveIni;
    TLabel *LabelChangeStorage;
    TLabel *LabelSelectExe;
    TLabel *LabelPath;
    TOpenDialog *OpenDialog;
    void __fastcall FormCreate(TObject *Sender);

public:
    __property bool UseIni = {read = useIni};
    __property WideString Todolist = {read = todolist};
    bool __fastcall parse();

private:	// User declarations
    HyperlinkWrapper wrapper;
    bool useIni;
    WideString todolist;
    bool registered;
    bool isParser;

    void __fastcall showError(const TCHAR* caption, const TCHAR* message);

    void __fastcall loadProtocol();
    void __fastcall loadConfiguration();
    void __fastcall layoutProtocolComponents();
    void __fastcall layoutConfigurationComponents();

    void __fastcall regProtocol();
    void __fastcall unregProtocol();
    bool __fastcall selectTodolist();
    void __fastcall configToReg();
    void __fastcall configToIni();

    void __fastcall onReg(TObject* sender);
    void __fastcall onUnreg(TObject* sender);
    void __fastcall onSelect(TObject* sender);
    void __fastcall onToReg(TObject* sender);
    void __fastcall onToIni(TObject* sender);
    void __fastcall onChangeStorage(TObject* sender);

    void __fastcall onClose(TObject* sender);
    void __fastcall onAbout(TObject* sender);

public:		// User declarations
    __fastcall TMainForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TMainForm *MainForm;
//---------------------------------------------------------------------------
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

jamesfancy
China China
James Fancy, is a software engineer from China. He enjoys and familiar with Java, C++ and some script languages.

If you can read Chinese word, here is one of James Fancy's BLOG:
http://hi.baidu.com/jamesfancy

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160426.1 | Last Updated 25 Apr 2008
Article Copyright 2007 by jamesfancy
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid