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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? reportcontrol.~pa

?? 國產(chǎn)的報表控件
?? ~PA
?? 第 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一区二区三区免费野_久草精品视频
国产精品久久午夜夜伦鲁鲁| 国产一区二区三区香蕉 | 国产免费观看久久| www成人在线观看| 日韩欧美电影一区| 精品乱人伦一区二区三区| 日韩精品一区二区三区中文不卡| 欧美一区二区三区四区久久| 欧美一级二级在线观看| 日韩欧美国产综合| 精品国产乱码久久久久久久久| 精品福利二区三区| 国产婷婷精品av在线| 国产精品久久夜| 一区二区三区日韩精品视频| 亚洲福利电影网| 麻豆精品一区二区综合av| 狠狠狠色丁香婷婷综合久久五月| 国产精品亚洲专一区二区三区| 国产不卡一区视频| 99久久免费国产| 欧美丝袜第三区| 欧美本精品男人aⅴ天堂| 26uuuu精品一区二区| 亚洲国产高清不卡| 亚洲欧美日韩久久| 日韩不卡一区二区| 国产寡妇亲子伦一区二区| 成人av电影免费观看| 欧美日韩一二三| 欧美成人精品3d动漫h| 国产情人综合久久777777| 亚洲狼人国产精品| 日本系列欧美系列| 国产成人精品网址| 欧美在线视频日韩| 精品国产乱码久久久久久图片| 国产精品高潮呻吟| 日日夜夜免费精品| 国产99精品国产| 欧美在线你懂得| 久久久久九九视频| 夜夜精品视频一区二区 | 欧美精品乱码久久久久久| 日韩三级免费观看| 中文字幕中文字幕一区| 亚洲成av人片一区二区三区| 国产裸体歌舞团一区二区| 日本伦理一区二区| 精品国产99国产精品| 亚洲私人黄色宅男| 人禽交欧美网站| 97se狠狠狠综合亚洲狠狠| 正在播放亚洲一区| 中文字幕第一区综合| 日韩中文字幕麻豆| 99视频精品在线| 欧美成人性福生活免费看| 亚洲欧美日韩国产另类专区| 久久99精品久久久久久| 91久久奴性调教| 国产日产欧产精品推荐色 | 色一情一乱一乱一91av| 欧美电影免费观看高清完整版在| 亚洲日本电影在线| 国产伦精一区二区三区| 欧美精品亚洲二区| 日韩久久一区二区| 激情偷乱视频一区二区三区| 欧美色视频在线观看| 国产精品系列在线| 精品一区二区三区免费观看| 欧美日韩国产另类不卡| 亚洲乱码日产精品bd| 国产电影一区二区三区| 日韩欧美在线观看一区二区三区| 亚洲精品大片www| 不卡的av在线播放| 久久久午夜电影| 日韩激情在线观看| 欧美日韩一区久久| 亚洲男人天堂av| a级精品国产片在线观看| 国产亚洲欧洲997久久综合| 麻豆专区一区二区三区四区五区| 欧美日韩一区二区三区四区| 亚洲免费看黄网站| 91最新地址在线播放| 中日韩av电影| 国产不卡免费视频| 久久久噜噜噜久噜久久综合| 麻豆精品新av中文字幕| 欧美一区二区在线免费观看| 亚洲韩国一区二区三区| 欧美日韩综合不卡| 一区二区三区在线影院| 91九色02白丝porn| 亚洲视频小说图片| 色一情一乱一乱一91av| 一区二区三区久久| 在线看日韩精品电影| 亚洲激情五月婷婷| 在线这里只有精品| 亚洲综合视频网| 欧美日韩午夜影院| 丝袜脚交一区二区| 91精品国产91综合久久蜜臀| 男人的天堂久久精品| 日韩精品一区国产麻豆| 国产一区美女在线| 久久精品一区二区| 波多野结衣中文一区| 亚洲视频资源在线| 91久久精品网| 亚洲成人激情自拍| 日韩一区二区三区免费看| 精品一区二区在线看| 久久久青草青青国产亚洲免观| 国产91精品免费| 中文字幕亚洲一区二区va在线| 91免费观看在线| 亚洲国产精品久久久男人的天堂 | 欧美成人精品福利| 国产精品1024久久| 亚洲欧美二区三区| 91麻豆精品国产91久久久久久久久| 美女视频黄 久久| 久久欧美中文字幕| 99视频精品在线| 亚洲成人自拍网| 精品捆绑美女sm三区| 成人av网站在线| 亚洲一区在线观看免费| 精品日产卡一卡二卡麻豆| eeuss鲁一区二区三区| 亚洲一区二区在线免费看| 日韩欧美国产高清| 成人少妇影院yyyy| 亚洲成人黄色小说| 久久综合成人精品亚洲另类欧美 | 宅男在线国产精品| 国产成人综合亚洲91猫咪| 亚洲女与黑人做爰| 日韩一区二区三区电影| 不卡电影免费在线播放一区| 婷婷成人综合网| 久久久91精品国产一区二区三区| 色综合天天在线| 老色鬼精品视频在线观看播放| 国产精品美女久久久久aⅴ国产馆| 欧美午夜一区二区三区| 国产一区二区三区免费播放| 一区二区三区中文字幕| 久久看人人爽人人| 在线观看成人小视频| 黑人精品欧美一区二区蜜桃| 一区二区三区 在线观看视频| 精品剧情在线观看| 欧美亚洲自拍偷拍| 成人亚洲一区二区一| 无码av中文一区二区三区桃花岛| 国产人伦精品一区二区| 69av一区二区三区| 99久久精品国产麻豆演员表| 另类人妖一区二区av| 亚洲男人的天堂在线观看| 精品国产91久久久久久久妲己 | 亚洲国产精品高清| 欧美一区二区三区婷婷月色| 91在线视频18| 国产乱理伦片在线观看夜一区| 亚洲福利电影网| 亚洲色图清纯唯美| 久久久精品影视| 日韩一区二区三区视频在线观看| 在线精品亚洲一区二区不卡| 福利91精品一区二区三区| 蜜臀91精品一区二区三区 | 91在线国产观看| 国产成人在线网站| 美女网站色91| 日韩黄色一级片| 亚洲国产精品尤物yw在线观看| 国产精品高潮呻吟| 国产午夜精品美女毛片视频| 精品捆绑美女sm三区| 欧美一区二区三区不卡| 欧美视频自拍偷拍| 色久优优欧美色久优优| 不卡在线视频中文字幕| 国产精品456露脸| 国产在线一区二区| 久久精品99国产国产精| 视频在线观看91| 日韩精品每日更新| 亚洲一区二区在线观看视频| 亚洲蜜臀av乱码久久精品蜜桃| 中文字幕制服丝袜一区二区三区| 国产女同互慰高潮91漫画| 久久精品人人做|