亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? reportcontrol.pas

?? 國產的報表控件
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
    ThisCell: TReportCell;
  end;

function DeleteFiles(FilePath, FileMask: string): Boolean;

procedure Register;

var
  pgw, pgh, scale: integer;
  cellline_d: treportcell; //用于保存選中單元格的屬性 1999.1.25
  isprint: byte; //用于是否已安裝打印機
  celldisp: TReportCell; //用于顯示Mouse位置的單元格屬性

implementation

//{$R ReportControl.dcr}
//{{{{{{{$R ReportControl.dcr}}}}}}}}}         //1999.11.20
uses Preview;

function DeleteFiles(FilePath, FileMask: string): Boolean;
var
  Attributes: Word;
  DeleteFilesSearchRec: TSearchRec;
begin
  Result := true;
  try
    FindFirst(FilePath + '\' + FileMask, faAnyFile, DeleteFilesSearchRec);

    if not (DeleteFilesSearchRec.Name = '') then
    begin
      Result := True;
      Attributes := FileGetAttr(FilePath + '\' + DeleteFilesSearchRec.Name);
//      Attributes := Attributes And Not (faReadonly Or faHidden Or fasysfile);
      FileSetAttr(FilePath + '\' + DeleteFilesSearchRec.Name, Attributes);
      DeleteFile(FilePath + '\' + DeleteFilesSearchRec.Name);

      while FindNext(DeleteFilesSearchRec) = 0 do
      begin
        Attributes := FileGetAttr(FilePath + '\' + DeleteFilesSearchRec.Name);
//        Attributes := Attributes And Not (faReadOnly Or faHidden Or fasysfile);
        FileSetAttr(FilePath + '\' + DeleteFilesSearchRec.Name, Attributes);
        DeleteFile(FilePath + '\' + DeleteFilesSearchRec.Name);
      end;
    end;

    FindClose(DeleteFilesSearchRec);

  except
    Result := false;
    Exit;
  end;
end;

procedure Register;
begin
  RegisterComponents('中國式報表', [TReportControl]);
  RegisterComponents('中國式報表', [TReportRunTime]);
end;

///////////////////////////////////////////////////////////////////////////
// TReportCell

{TReportCell}

procedure TReportCell.SetLeftMargin(LeftMargin: Integer);
begin
  // 修改左右預留的空白區(qū)域
  // 呵呵,目前只能是5。
  if (LeftMargin = FLeftMargin) or
    (LeftMargin < 5) or (LeftMargin > 5) then
    Exit;

  FLeftMargin := LeftMargin;
  CalcMinCellHeight;
end;

procedure TReportCell.SetOwnerLine(OwnerLine: TReportLine);
begin
  if OwnerLine <> nil then
    FOwnerLine := OwnerLine;
end;

procedure TReportCell.SetOwnerCell(Cell: TReportCell);
begin
  FOwnerCell := Cell;
  //  CalcMinCellHeight;
end;

function TReportCell.GetOwnedCellCount: Integer;
begin
  Result := FCellsList.Count;
end;

procedure TReportCell.AddOwnedCell(Cell: TReportCell);
var
  I: Integer;
  TempCellList: TList;
begin
  if (Cell = nil) or (FCellsList.IndexOf(Cell) >= 0) then
    Exit;

  Cell.OwnerCell := Self;
  FCellText := FCellText + Cell.CellText;
  Cell.CellText := '';

  FCellsList.Add(Cell);

  TempCellList := TList.Create;
  for I := 0 to Cell.FCellsList.Count - 1 do
    TempCellList.Add(Cell.FCellsList[I]);

  Cell.RemoveAllOwnedCell();

  for I := 0 to TempCellList.Count - 1 do
  begin
    FCellsList.Add(TempCellList[I]);
    TReportCell(TempCellList[I]).OwnerCell := Self;
  end;

  //   CalcMinCellHeight;
end;

procedure TReportCell.RemoveAllOwnedCell;
var
  I: Integer;
  Cell: TReportCell;
begin
  for I := 0 to FCellsList.Count - 1 do
  begin
    Cell := FCellsList[I];
    Cell.SetOwnerCell(nil);
    Cell.CalcMinCellHeight;
  end;

  FCellsList.Clear;
  //  CalcMinCellHeight;
end;

function TReportCell.IsCellOwned(Cell: TReportCell): Boolean;
begin
  if FCellsList.IndexOf(Cell) >= 0 then
    Result := True
  else
    Result := False;
end;

procedure TReportCell.SetCellLeft(CellLeft: Integer);
begin
  if CellLeft = FCellLeft then
    Exit;

  FCellLeft := CellLeft;
  CalcCellRect;
end;

procedure TReportCell.SetCellWidth(CellWidth: Integer);
begin
  if CellWidth = FCellWidth then
    Exit;

  if CellWidth > 10 then
  begin
    FCellWidth := CellWidth;
    CalcMinCellHeight;
    CalcCellRect;
  end
  else
  begin
    FCellWidth := 10;
    CalcMinCellHeight;
    CalcCellRect;
  end;
end;

function TReportCell.GetCellHeight: Integer;
begin
  if FOwnerLine = nil then
    Result := 0
  else
  begin
    if FDragCellHeight > FMinCellHeight then
      Result := FDragCellHeight
    else
      Result := FMinCellHeight;
  end;
end;

function TReportCell.GetCellTop: Integer;
begin
  if FOwnerLine = nil then
    Result := 0
  else
    Result := FOwnerLine.LineTop;
end;

procedure TReportCell.SetLeftLine(LeftLine: Boolean);
begin
  if LeftLine = FLeftLine then
    Exit;

  FLeftLine := LeftLine;
  CalcMinCellHeight;
  CalcCellRect;
  // InvalidateRect here because Cell;s Rect no change
end;

procedure TReportCell.SetLeftLineWidth(LeftLineWidth: Integer);
begin
  if LeftLineWidth = FLeftLineWidth then
    Exit;

  FLeftLineWidth := LeftLineWidth;
  CalcMinCellHeight;
  CalcCellRect;
end;

procedure TReportCell.SetTopLine(TopLine: Boolean);
begin
  if TopLine = FTopLine then
    Exit;

  FTopLine := TopLine;
  CalcMinCellHeight;
  CalcCellRect;
end;

procedure TReportCell.SetTopLineWidth(TopLineWidth: Integer);
begin
  if TopLineWidth = FTopLineWidth then
    Exit;

  FTopLineWidth := TopLineWidth;
  CalcMinCellHeight;
  CalcCellRect;
end;

procedure TReportCell.SetRightLine(RightLine: Boolean);
begin
  if RightLine = FRightLine then
    Exit;

  FRightLine := RightLine;
  CalcMinCellHeight;
  CalcCellRect;
end;

procedure TReportCell.SetRightLineWidth(RightLineWidth: Integer);
begin
  if RightLineWidth = FRightLineWidth then
    Exit;

  FRightLineWidth := RightLineWidth;
  CalcMinCellHeight;
  CalcCellRect;
end;

procedure TReportCell.SetBottomLine(BottomLine: Boolean);
begin
  if BottomLine = FBottomLine then
    Exit;

  FBottomLine := BottomLine;
  CalcMinCellHeight;
  CalcCellRect;
end;

procedure TReportCell.SetBottomLineWidth(BottomLineWidth: Integer);
begin
  if BottomLineWidth = FBottomLineWidth then
    Exit;

  FBottomLineWidth := BottomLineWidth;
  CalcMinCellHeight;
  CalcCellRect;
end;

procedure TReportCell.SetCellText(CellText: string);
begin
  if CellText = FCellText then
    Exit;

  FCellText := CellText;
  CalcMinCellHeight;
end;

procedure TReportCell.SetLogFont(NewFont: TLOGFONT);
begin
  FLogFont := NewFont;
  CalcMinCellHeight;
end;

procedure TReportCell.SetBackGroundColor(BkColor: COLORREF);
begin
  if BkColor = FBackGroundColor then
    Exit;

  FBackGroundColor := BkColor;
  // InvalidateRect
end;

procedure TReportCell.SetTextColor(TextColor: COLORREF);
begin
  if TextColor = FTextColor then
    Exit;

  FTextColor := TextColor;
  // InvalidateRect
end;

// 開始噩夢,噩夢中我把屏幕上的象素點一個一個干掉

procedure TReportCell.CalcMinCellHeight;
var
  hTempFont, hPrevFont: HFONT;
  hTempDC: HDC;
  TempString: string;
  TempRect: TRect;
  Format: UINT;
  I: Integer;
  BottomCell, ThisCell: TReportCell;
  TotalHeight, Height, Top: Integer;
  TempSize: TSize;
begin
  // 計算CELL的最小高度
  if FCellWidth <= FLeftMargin * 2 then
  begin
    FMinCellHeight := 16 + 2 + FTopLineWidth + FBottomLineWidth;
    Exit;
  end;

  // 隸屬與某CELL時
  if FOwnerCell <> nil then
  begin
    // 取得最下的單元格
    FMinCellHeight := 16 + 2 + FTopLineWidth + FBottomLineWidth;
    BottomCell := nil;
    Height := 0;
    Top := 0;
    for I := 0 to FOwnerCell.FCellsList.Count - 1 do
    begin
      ThisCell := FOwnerCell.FCellsList[i];
      ThisCell.FMinCellHeight := 16 + 2 + ThisCell.TopLineWidth + ThisCell.BottomLineWidth;
      ThisCell.OwnerLine.CalcLineHeight;
      Height := Height + ThisCell.OwnerLineHeight;

      if ThisCell.CellTop > Top then
      begin
        BottomCell := ThisCell;
        Top := ThisCell.CellTop;
      end;
    end;

    if BottomCell <> Self then
    begin
      FMinCellHeight := 16 + 2 + FTopLineWidth + FBottomLineWidth;
      Exit;
    end
    else
    begin
      TotalHeight := Height + FOwnerCell.OwnerLineHeight;
      if FOwnerCell.RequiredCellHeight > TotalHeight then
        FMinCellHeight := FOwnerCell.RequiredCellHeight - TotalHeight + OwnerLineHeight
      else
        FMinCellHeight := 16 + 2 + FTopLineWidth + FBottomLineWidth;
      Exit;
    end;
  end;

  hTempFont := CreateFontIndirect(FLogFont);

  // 此處取得窗口的指針用于計算大小

  if (Length(FCellText) <= 0) then
    TempString := '漢'
  else
    TempString := FCellText;

  hTempDC := GetDC(0);
  hPrevFont := SelectObject(hTempDC, hTempFont);

  SetRect(TempRect, 0, 0, 0, 0);

  TempRect.left := FCellLeft + FLeftMargin;
  TempRect.top := GetCellTop + 2;
  ;
  TempRect.right := FCellLeft + FCellWidth - FLeftMargin;
  TempRect.bottom := 65535;

  Format := DT_EDITCONTROL or DT_WORDBREAK;
  case FHorzAlign of
    0:
      Format := Format or DT_LEFT;
    1:
      Format := Format or DT_CENTER;
    2:
      Format := Format or DT_RIGHT;
  else
    Format := Format or DT_LEFT;
  end;

  Format := Format or DT_CALCRECT;

  DrawText(hTempDC, PChar(TempString), Length(TempString), TempRect, Format);
  //  DrawText(hTempDC, PChar(TempString), -1, TempRect, Format);

    // 補償文字最后的回車帶來的誤差
  if Length(TempString) >= 2 then
  begin
    if (TempString[Length(TempString)] = Chr(10)) and
    (TempString[Length(TempString) - 1] = Chr(13)) then
    begin
      GetTextExtentPoint(hTempDC, 'A', 1, TempSize);
      TempRect.Bottom := TempRect.Bottom + TempSize.cy;
    end;
  end;

  SelectObject(hTempDc, hPrevFont);
  DeleteObject(hTempFont);
  ReleaseDC(0, hTempDC);

  if (FCellsList.Count > 0) then
  begin
    if TempRect.Bottom - TempRect.Top <= 0 then
      FRequiredCellHeight := 16
    else
      FRequiredCellHeight := TempRect.Bottom - TempRect.Top;

    FRequiredCellHeight := FRequiredCellHeight + 2;
    FRequiredCellHeight := FRequiredCellHeight + FTopLineWidth + FBottomLineWidth;

    FMinCellHeight := 16 + 2 + FTopLineWidth + FBottomLineWidth;

    OwnerLine.CalcLineHeight;

    for I := 0 to FCellsList.Count - 1 do
      TReportCell(FCellsList[I]).CalcMinCellHeight;

  end
  else
  begin
    if TempRect.Bottom - TempRect.Top <= 0 then
      FMinCellHeight := 16
    else
      FMinCellHeight := TempRect.Bottom - TempRect.Top;

    FMinCellHeight := FMinCellHeight + 2;
    FMinCellHeight := FMinCellHeight + FTopLineWidth + FBottomLineWidth;
  end;
end;

procedure TReportCell.CalcCellRect;
var
  TempRect: TRect;
  TotalHeight: Integer;
  I: Integer;
begin
  // Calc CellRect & TextRect here
  // 如果CELL的大小或者文本框的大小改變,自動的置窗口的失效區(qū)

  if FCellsList.Count <= 0 then
  begin
    // 計算CELL的矩形


    FCellRect.left := FCellLeft;
    FCellRect.top := CellTop;
    FCellRect.right := FCellRect.left + FCellWidth;
    FCellRect.bottom := FCellRect.top + OwnerLineHeight;
{        if scale <> 100 then  //1999.1.23
        begin

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产福利视频一区二区三区| 麻豆一区二区三| 紧缚奴在线一区二区三区| 欧洲精品一区二区三区在线观看| 久久久久国色av免费看影院| 久久久久久久久久久久电影| 一区二区三区四区高清精品免费观看| 精品成人a区在线观看| 亚洲精品自拍动漫在线| 99久久精品免费看国产| ...av二区三区久久精品| www.爱久久.com| 中文字幕不卡的av| 99久久婷婷国产| 亚洲国产aⅴ天堂久久| 欧美久久久久免费| 国产一区二区0| 中文字幕一区二区不卡| 欧美亚洲综合久久| 日本sm残虐另类| 久久久精品tv| 青草国产精品久久久久久| 欧美日韩免费高清一区色橹橹| 亚洲成人久久影院| 精品奇米国产一区二区三区| 国产精品一区二区91| 最新成人av在线| 日韩午夜激情视频| 国产91露脸合集magnet| 亚洲午夜一二三区视频| 精品美女一区二区| 色哟哟国产精品免费观看| 热久久国产精品| 成人欧美一区二区三区白人| 欧美色手机在线观看| 国产99久久精品| 日本一区二区在线不卡| 不卡的电影网站| 久久国产精品露脸对白| 亚洲男女一区二区三区| 国产午夜精品美女毛片视频| 在线精品视频一区二区| 成人自拍视频在线| 精品亚洲国内自在自线福利| 一区二区免费在线| 亚洲国产精品激情在线观看| 日韩午夜在线播放| 精品1区2区3区| 一本到不卡免费一区二区| 国产精品一级黄| 国产综合一区二区| 蜜桃久久久久久| 亚洲精品在线一区二区| 欧美系列在线观看| 欧美三区在线观看| 欧美一区中文字幕| 欧美日韩国产高清一区二区 | 欧美成人精品福利| 91精品国产91久久综合桃花 | 国产精品久久久久久久久动漫 | 久久午夜电影网| 2022国产精品视频| 国产精品青草久久| 依依成人综合视频| 久久机这里只有精品| 精品一区二区三区香蕉蜜桃 | 成人综合婷婷国产精品久久| 成人97人人超碰人人99| 91福利精品视频| 欧美一区二区久久久| 国产人成亚洲第一网站在线播放| 国产精品久久久久aaaa| 一区二区三区丝袜| 日韩中文字幕不卡| 成人免费黄色在线| 91精品综合久久久久久| 国产欧美日韩精品在线| 自拍av一区二区三区| 毛片一区二区三区| 欧美视频自拍偷拍| 久久久精品天堂| 亚洲国产另类精品专区| 国产成人免费视频| 欧美精品日韩一区| 亚洲欧美日韩一区二区| 国产中文字幕精品| 欧美成人性战久久| 夜夜爽夜夜爽精品视频| 成人免费视频视频在线观看免费| 欧美三级在线看| 亚洲私人黄色宅男| 大桥未久av一区二区三区中文| 6080午夜不卡| 日本亚洲欧美天堂免费| 欧美午夜影院一区| 亚洲激情六月丁香| 欧美午夜一区二区| 亚洲一区自拍偷拍| 久久精品国产亚洲a| 色成年激情久久综合| 亚洲视频在线一区观看| 成人av午夜电影| 综合中文字幕亚洲| 色综合天天在线| 亚洲香肠在线观看| 欧美色老头old∨ideo| 亚洲国产一二三| 欧美久久久久久久久中文字幕| 亚洲亚洲人成综合网络| 制服.丝袜.亚洲.另类.中文| 日本一区二区视频在线观看| 久久综合丝袜日本网| 国产在线精品免费| 精品国产髙清在线看国产毛片| 极品瑜伽女神91| 亚洲国产高清不卡| 欧美性受xxxx黑人xyx性爽| 日韩在线一区二区三区| 久久天天做天天爱综合色| 91蜜桃在线观看| 国产成人在线视频网址| 国产午夜精品久久| 国产精品一区二区不卡| **欧美大码日韩| 91精品中文字幕一区二区三区| 国产很黄免费观看久久| 亚洲电影激情视频网站| 国产欧美一区二区精品性色超碰| 91蝌蚪porny| 国产永久精品大片wwwapp| 亚洲一区二区视频在线观看| 亚洲精品一区二区三区四区高清 | 亚洲国产精品久久人人爱| 成人国产精品视频| 国产精品久久综合| 色婷婷综合在线| 亚洲高清三级视频| 欧美女孩性生活视频| 蜜桃视频一区二区三区在线观看| 色美美综合视频| 国产精品一二三| 免费观看久久久4p| 亚洲欧美激情小说另类| 日韩美女一区二区三区| 在线一区二区观看| thepron国产精品| 国产高清不卡一区二区| 亚洲人成人一区二区在线观看| 精品成人免费观看| 欧美日韩高清在线播放| 91丨九色丨蝌蚪丨老版| 成人精品国产免费网站| 国产成人精品亚洲777人妖 | 色女孩综合影院| av不卡免费在线观看| 91美女在线观看| 91丨九色porny丨蝌蚪| 97久久精品人人做人人爽50路| 不卡的av在线| 国产91对白在线观看九色| 国产精品99久久久久久似苏梦涵| 国产一区免费电影| 色综合天天性综合| 51精品秘密在线观看| 日韩亚洲国产中文字幕欧美| 久久久久久久久久久久久女国产乱 | 欧美一级国产精品| 国产精品视频一区二区三区不卡| 国产精品国产三级国产aⅴ原创 | 国产不卡免费视频| 成人免费高清在线| 在线不卡中文字幕播放| 国产丝袜美腿一区二区三区| 亚洲三级在线免费观看| 日韩中文字幕一区二区三区| 成人免费av网站| 日韩欧美色电影| 亚洲国产电影在线观看| 亚洲国产美国国产综合一区二区| 粉嫩嫩av羞羞动漫久久久| 欧美喷水一区二区| 最好看的中文字幕久久| 久久国内精品自在自线400部| 91国偷自产一区二区三区观看| 久久久久国产一区二区三区四区| 亚洲影视在线观看| 99久久99久久精品国产片果冻 | 国产二区国产一区在线观看 | 欧美在线一区二区三区| 日韩午夜激情电影| 亚洲18影院在线观看| 色综合久久久久综合| 成人免费一区二区三区在线观看| 免费观看在线色综合| 欧美一区二区三区播放老司机| 日韩专区中文字幕一区二区| 欧美系列亚洲系列| 一区二区三区电影在线播| 欧美在线999| 视频一区欧美日韩|