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

📄 form.~h

📁 用户指定顶点
💻 ~H
字号:
//---------------------------------------------------------------------------

#ifndef formH
#define formH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Menus.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>

#include "Node.h"
#include <Graphics.hpp>
#include <Dialogs.hpp>
#include <ComCtrls.hpp>
#include <ExtDlgs.hpp>
#include <Grids.hpp>
#include <ValEdit.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TMainMenu *MainMenu1;
        TMenuItem *Edit2;
        TMenuItem *e1;
        TMenuItem *N2;
        TMenuItem *connect1;
        TMenuItem *Decompose1;
        TMenuItem *Help1;
        TMenuItem *Help2;
        TMenuItem *N3;
        TMenuItem *About1;
        TGroupBox *GroupBox1;
        TButton *Button1;
        TButton *Button2;
        TBitBtn *BitBtn1;
        TLabel *Label1;
        TImage *Image1;
        TLabel *Label2;
        TLabel *Label3;
        TEdit *Edit4;
        TEdit *Edit5;
        TBitBtn *BitBtn2;
        TEdit *Edit3;
        TEdit *Edit6;
        TEdit *Edit7;
        TLabel *Label4;
        TLabel *Label5;
        TOpenPictureDialog *Open;
        TMenuItem *File1;
        TMenuItem *New1;
        TMenuItem *Save1;
        TMenuItem *History1;
        TMenuItem *N1;
        TMenuItem *N4;
        TMenuItem *Exit1;
        TButton *Delete;
        TOpenDialog *OpenHelp;
        void __fastcall BitBtn1Click(TObject *Sender);
        void __fastcall Image1MouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall NodeImageClick(TObject *Sender);
        void __fastcall Image1MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall New1Click(TObject *Sender);
        void __fastcall Exit1Click(TObject *Sender);
        void __fastcall e1Click(TObject *Sender);
        void __fastcall connect1Click(TObject *Sender);
        void __fastcall Decompose1Click(TObject *Sender);
        void __fastcall Image1MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
        void __fastcall Save1Click(TObject *Sender);
        void __fastcall BitBtn2Click(TObject *Sender);
        void __fastcall Edit6Change(TObject *Sender);
        void __fastcall Edit7Change(TObject *Sender);
        void __fastcall Edit6KeyPress(TObject *Sender, char &Key);
        void __fastcall Edit7KeyPress(TObject *Sender, char &Key);
        void __fastcall BitBtn2KeyPress(TObject *Sender, char &Key);
        void __fastcall BitBtn1KeyPress(TObject *Sender, char &Key);
        void __fastcall History1Click(TObject *Sender);
        void __fastcall DeleteClick(TObject *Sender);
        void __fastcall About1Click(TObject *Sender);
        void __fastcall Help2Click(TObject *Sender);
private:	// User declarations
        bool CanSet;                     //a flag of whether can set point
        TImage* NodeImage[100];          //an array of images of the points
        Node* points;                    //an array of points
        double t[100][100];              //由于float类型不稳定于7.22将所有float 改为double
        int s[100][100];                 //befor 7.25 t[][100],s[][100]导致程序不能正常关闭
        int Lasts[100][100];
        int Count;                       //the number of the points.count from 0
        int PointFlag;                   //there is point on the canvas
        int select;                      //a flag of whether there is a point has been selected
        int HasDraw;                     //a flag of whether there are lines on the canvas
        int TagetX;                      //8.2 added
        int TagetY;                      //8.2 added
        int xEnter;
        int yEnter;
        int IntFlag;
        AnsiString PathName;

public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        double PLength();                //all the length of a polygon
        boolean IsPolygon();             //judge whether a polygon is a convex polygon
        double distance(int,int);    //caculate the distance between two nodes
        double Ttriangle(int,int,int);   //the length of three edges of a triangle
        void decompose();
        void DrawLines(int,int);             //7.22 added
        __fastcall ~TForm1();


};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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