unt_gra.pas

来自「煤矿行业采掘接替计划自动生成系统」· PAS 代码 · 共 611 行 · 第 1/2 页

PAS
611
字号
    edit;
    fieldbyname('IsDeal').AsBoolean:=true;
    post;
   end;

  Hint_Frm.Close;
  Hint_Frm.Label1.Caption:='处理完毕!';
  Hint_Frm.Button1.Enabled:=true;
  Frm_Gra.Refresh;
  Hint_Frm.Refresh;
  Hint_Frm.Timer1.Interval:=4000;
  Hint_Frm.Timer1.Enabled:=true;
  Hint_Frm.ShowModal;

  showmessage('现在可以进行动态演示了!');
  Hint_Frm.Free;
  Hint_Frm:=nil;
  Read_Graph.Free;
end;

procedure TFrm_Gra.Btn_GraphicClick(Sender: TObject);
var CADFilename:String;
begin
  inherited;
  CADFilename:=frm_data.ADOT_Graph.fieldbyname('Graphic_Name').AsString;
  if MessageDlg('确认是这张图纸吗?',mtConfirmation,[mbYes, mbNo],0)=mrNo then exit;
  Read_Graph:=TRead_Graph.Create;
  Read_Graph.DrawGraphic(CADFilename);
  Read_Graph.Free;
end;

procedure TFrm_Gra.Btn_DelClick(Sender: TObject);
begin
  //inherited;
  if messagedlg('您将删除所有相关图形数据,继续吗?',mtconfirmation,[mbyes,mbno],0)=mryes then
    begin
      with Frm_Data do
        begin
          //删除图纸中的数据-ADOT_Graph
          with ADOT_Graph do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除停采线和断层交线中的数据ADOT_Stop
          with ADOT_Stop do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除区段中的数据ADOT_TaskS
          with ADOT_TaskS do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除图层中的数据ADOT_Layer
          with ADOT_Layer do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除圆ADOT_Circle
          with ADOT_Circle do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除多义线ADOT_Pline
          with ADOT_Pline do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除工序ADOT_Task
          with ADOT_Task do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除工序采区ADOT_TaskArea
          with ADOT_TaskArea do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除巷道回采面子表ADOT_CWork
          with ADOT_CWork do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除弧ADOT_Arc
          with ADOT_Arc do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除文本ADOT_Text
          with ADOT_Text do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除文本类型ADOT_TextT
          with ADOT_TextT do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除样条线ADOT_SPline
          with ADOT_SPline do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除椭圆ADOT_Ellipse
          with ADOT_Ellipse do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除点ADOT_Points
          with ADOT_Points do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除直线ADOT_Line
          with ADOT_Line do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除线型ADOT_LineT
          with ADOT_LineT do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          //删除采区ADOT_Area
          with ADOT_Area do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
          {//删除采区工序名称ADOT_ATaskN
          with ADOT_ATaskN do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;}
          //删除采掘计划ADOT_MDPlan
          with ADOT_MDPlan do
            begin
              if not active then open;
              if RecordCount>0 then
                begin
                  first;
                  while not eof do
                    begin
                      delete;
                    end;
                end;
            end;
        end;
    showmessage('删除完毕,请重新读取并处理图纸!');
    end;
end;

end.

⌨️ 快捷键说明

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