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

📄 fm_newproject.pas

📁 档案资料管理系统
💻 PAS
字号:
unit FM_NewProject;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ComCtrls,IniFiles;

type
  TFM_NewProject1 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    Label1: TLabel;
    Label2: TLabel;
    FMNP_ED1: TEdit;
    FMNP_ED2: TEdit;
    FMNP_ComD1: TBitBtn;
    FMNP_ComD2: TBitBtn;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    FMNP_ED4: TEdit;
    FMNP_ED5: TEdit;
    FMNP_ED6: TEdit;
    FMNP_ED7: TEdit;
    FMNP_ED8: TEdit;
    FMNP_ED9: TEdit;
    FMNP_ED10: TEdit;
    GroupBox1: TGroupBox;
    FMNP_ED3: TEdit;
    procedure FMNP_ComD1Click(Sender: TObject);
    procedure FMNP_ED1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FM_NewProject1: TFM_NewProject1;
  FMNE_Path:string;
implementation

{$R *.dfm}
uses
 FM_Main,FM_NewEngineering;
procedure TFM_NewProject1.FMNP_ComD1Click(Sender: TObject);
var
 ProjectInfo:Tinifile;
 FMNewEngineering:TFM_NewEngineering1;
begin
 if FMNP_ED1.Text='' then
    Application.MessageBox('至少需要有一个项目名称','真诚提醒您',MB_OK or MB_ICONINFORMATION)
 else
   begin
     if not CreateDirectory(PChar(ExtractFilePath(Application.ExeName)+'\'+'Project'+'\'+FMNP_ED1.Text), nil) then
        begin
         Application.MessageBox('已经存在这项项目','真诚提醒您',MB_OK or MB_ICONINFORMATION)
        end
     else
        begin
         FMNE_Path:=ExtractFilePath(Application.ExeName)+'\'+'Project'+'\'+FMNP_ED1.Text;
         ProjectInfo:=Tinifile.Create(ExtractFilePath(Application.ExeName)+'\'+'Project'+'\'+FMNP_ED1.Text+'\'+FMNP_ED1.Text+'.ini');
         ProjectInfo.WriteString('ProjectInfo','ProjectName',FMNP_ED1.Text);
         ProjectInfo.WriteString('ProjectInfo','ProjectDesign',FMNP_ED4.Text);
         ProjectInfo.WriteString('ProjectInfo','ProjectConstruction',FMNP_ED5.Text);
         ProjectInfo.WriteString('ProjectInfo','ProjectEstablishment',FMNP_ED6.Text);
         ProjectInfo.WriteString('ProjectInfo','ProjectExamine',FMNP_ED7.Text);
         ProjectInfo.WriteString('ProjectInfo','ProjectYearMonthDay',FMNP_ED8.Text+'年'+FMNP_ED9.Text+'月'+FMNP_ED10.Text+'日');
         ProjectInfo.Free;
         FMNewEngineering:=TFM_NewEngineering1.Create(Self);
         FMNewEngineering.ShowModal;
         Close;
        end;
   end;
end;
procedure TFM_NewProject1.FMNP_ED1Change(Sender: TObject);
begin
 FMNP_ED3.Text:=FMNP_ED1.Text;
end;
end.

⌨️ 快捷键说明

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