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

📄 u_public.~pas

📁 一个钢筋开发系统
💻 ~PAS
字号:
unit U_Public;

interface
 type
     Yl_Num=record
        FH:real;//负荷
        Wy:real;// 位移
        Sj:real;//时间
 end;
 Type
    Axis_xy=record  //XY坐标轴的数据变量定义
    X_Axis_max:real;// X坐标最大值
    Y_Axis_Max:real;  // Y坐标最大值
    X_Gird_Count:integer;// X轴网格数
    Y_Gird_Count:integer;  // Y轴网格数
    Back_Color:real; //   背景色
    Line_Color:real;  // 曲线颜色
    X_Axis_dw:String;   // X坐标单位
    Y_Axis_Dw:String;   // Y坐标单位
 end;
 type
    INI_Sj=record
    Dwmc:string[50];//单位名称
    Dwdz:string[50];  // 单位地址
    Yzbm:string[50];  // 邮政编码
    DwDh:string[50];  // 单位电话
    Dwcz:string[50];  // 单位传真
    Bglk:String[50];  // 报告落款
    COmId:String[1]; //  COM口
    DunWei:integer;//吨位值
    WeiYi:integer;// 位移值
    FhMax:real;   // 负荷最大值
    FhGrid:Integer;// 负荷网格数
    YlMax:real;    // 应力最大值
    YLGrid:integer; // 应力网格数
    WyMax:real;     // 位移最大值
    WyGrid:integer; // 位移网格数
    SclMax:real;    // 伸长率最大值
    SclGrid:integer;// 伸长率网格数
    BxMax:real;     //  变形最大值
    BxGrid:integer; //  变形网格数
    YslMax:real;    //  延伸率最大值
    YslGrid:integer;//  延伸率网格数
    SjMax:real;     //   时间最大值
    SJGrid:integer; //  时间网格数
    BackColor:real; //  背景色
    LineColor:real; //  曲线色
 end;
 type
     Data_Fu=record
      Fm:real; // 最大值
      Rm:real; //  最大MPa
      Fsu:real;//  上屈服
      Rsh:real;//
      Fsl:real;//  下屈服
      Rsl:real; //
 end;
 type
   SY_Name=record   //试样信息
   Sybh:string[24];     // 试样编号
   Zs:string[24];       // 组数
   Sjdw:string[24];     // 送检单位
   Clmc:string[24];     // 材料名称
   Clph:string[24];     // 材料牌号
   Lh:string[24];       // 炉号
   Ypms:string[24];     // 样品描述
   Wtdw:string[24];     //  委托单位
   Ysjbj:string[24];    //  引伸计标距
   Dbbj:string[24];     //  打标标距
   Pxcd:string[24];     //  平行长度
   bh:string[24];       //  壁厚
   Wj:real;         //外径
   Symj:real;       //  试样面积
 end;
 type
    Use_PassWord=record
    Use_Id:integer; //   用户Id
    Use_Name:string[24]; // 用户名
    Use_PassWord:string[24]; // 用户密码
    Use_Enable:Boolean;  // 是否可用
 end;
    type
       Data_YLCount=array[0..3000]of Yl_Num;
    type
       use_KLCount=array[0..200] of Use_password;
    type
       ini_dataT=array[1..2]of sy_name;
  var

   Now_xy:Axis_xy;//当前XY轴数据
   Ini_Data:Ini_Sj;// 初使化时的数据
   G_Ini_Path:String; // 初使化路径
   G_Sy_ConTent:SY_Name; //式样内容
   G_Yl_Data:Yl_Num;//当前压力
   now_Data_Count:Int64;  // 当前负荷数量
   G_Data:data_ylCount; // 存放当前负荷值数组
   Data_Fm:data_fu;//最后屈服等值
   File_Count:int64; // 试样文件长度
   Ini_Xaxis:real; //  当前x
   Ini_Yaxis:real; //   当前Y
   Use_Kl:Use_klCount; // 当前用户数组
   Use_Count:integer;  // 用户个数
   G_Bool_ini:boolean;
   {1} procedure Use_PassRead();//读用户口令
   {2} function  Line_read(Path_file:string):real;
   {3} procedure Line_Save(Name:string;path:string);//
   {4} Procedure SY_Read();
   {5} Procedure Sy_Save(Name:string);
   {6} procedure Ini_PicData();
   {7} Procedure IniRead();
   {8}procedure Ini_Save(path:string);
   {9} procedure Use_PassWrite(path:string);
   {10}procedure Use_Change(I:integer;Namee:string;PassWord:string;Enable:boolean;path:string);

implementation
   uses u_Main,u_dl,u_dlkl,u_kl_set,u_set_system,u_sys_ini,u_syset,u_xgkl;
 {1}
   procedure Use_PassRead();
    var
         RandomFile : file of use_password;
         Str:string;
         Error:integer;
         i:integer;
      begin
          i:=0;

          Assign(randomfile,'user.dll');
          reset(randomfile);
         while not eof(randomfile) do
           begin
             read(randomfile,use_kl[i]);
             inc(i);
           end;
      end;
  {2}
   function Line_read(path_file:string):real;
       var
         RandomFile : file of  yl_num;
         Str:string;
         Error:integer;
         i:integer;
      begin
         i:=0;
          str:=path_file;
          Assign(randomfile,str);
          reset(randomfile);
         while not eof(randomfile) do
           begin
            read(randomfile,g_data[i]);
             inc(i);
           end;
           now_data_count:=i;
      end;
  {3}
    procedure Line_Save(Name:string;path:string);
       var
       RandomFile : file of  yl_num;
       Str:string;
        Error:integer;
        i:integer;

   begin

          i:=0;
          str:=path+'data\T'+name+'.asp';
          Assign(randomfile,str);
          rewrite(randomfile);
          reset(randomfile);
          for i:=0 to data_count do
            begin
               seek(randomfile,i);
               write(randomfile,g_data[i]);
            end;
          closefile(randomfile);
    end;
  {4}
     Procedure SY_Read();
       begin
       //
       end;
  {5}
   Procedure Sy_Save(Name:string);
      var
       RandomFile : file of  sy_name;
       Str:string;
        Error:integer;
        i:integer;
        ss:sy_name;
   begin
          i:=0;
          str:= name+'data\2005.dbf';

          Assign(randomfile,str);

          error:=ioresult;

         if error<>0 then
            begin
            rewrite(randomfile);
            write(randomfile,g_sy_content);
           end
       else
          begin
             reset(randomfile);
           while not eof(randomfile) do
              begin
              read(randomfile,ss);
               inc(i);
            end;
               seek(randomfile,i);
            // rewrite(randomfile);
              write(randomfile,g_sy_content);
          end;
          closefile(randomfile);
    end;
  {6}
     procedure Ini_PicData();
       begin
       //
       end;
  {7}
 Procedure IniRead();
var
   RandomFile : file of  ini_sj;
   Str:string;
   Error:integer;
   freeRecord:integer;
   aa:ini_sj;
   begin
          g_bool_ini:=false;
          freeRecord:=0;
          str:='sys.ini';
          Assign(randomfile,str);
          reset(randomfile);
          error:=ioresult;
          if error=0 then
            begin
              seek(randomfile,freerecord);
              read(randomfile,ini_data);
              write(randomfile,ini_data);
              g_bool_ini:=true;
            end;
         closefile(randomfile);
    end;
  {8}
procedure Ini_Save(path:string);
  var
   RandomFile : file of  ini_sj;
   Str:string;
   begin
          str:=path+'sys.ini';
          Assign(randomfile,str);
          rewrite(randomfile);
          write(randomfile,ini_data);
          closefile(randomfile);
    end;
  {9} procedure Use_PassWrite(path:string);
        //Use_Kl
    var
   RandomFile : file of  use_PASSWORD;
   Str:string;
   i:integer;
   begin
          use_kl[1].Use_Id:=1;
          use_kl[1].Use_Name:='管理员';
          use_kl[1].Use_PassWord:='1234';
          use_kl[1].Use_Enable:=true;
          str:=path+'user.dll';
          Assign(randomfile,str);
          rewrite(randomfile);
          seek(randomfile,1);
          write(randomfile,use_kl[1]);

           for i:=2 to 200 do
            begin
            use_kl[i].Use_Name:='管理员';
             use_kl[i].Use_PassWord:='1234';
              use_kl[i].Use_Id:=i;
              use_kl[i].Use_Enable:=false;
               seek(randomfile,i);
               write(randomfile,use_kl[i]);
            end;
          closefile(randomfile);
    end;
 {10}
 procedure Use_Change(I:integer;Namee:string;PassWord:string;Enable:boolean;path:string);
   var
     RandomFile : file of  use_PASSWORD;
    begin
       Use_Kl[i].Use_Id := i;
       Use_Kl[i].use_Enable := enable;
       Use_Kl[i].Use_Name := namee;
       Use_Kl[i].Use_Password:= password;
       Assign(randomfile,path+'user.dll');
       reset(randomfile);
       seek(randomfile,i);
       write(randomfile,use_kl[i]);
       closefile(randomfile);
    end;
end.

⌨️ 快捷键说明

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