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

📄 ulott3d.~pas

📁 福利彩票3D分析程序 使用Delphi开发。
💻 ~PAS
📖 第 1 页 / 共 5 页
字号:
    with gl_HeadLineList do
    begin
          HeadLineList[CurHeadLineCount].Caption:='组3出现情况';
          HeadLineList[CurHeadLineCount].Color:=TColor(RGB(191,215,183));
          HeadLineList[CurHeadLineCount].ColBKColor:=gl_BackColorList.clColColorList[CurHeadLineCount mod 4];
          HeadLineList[CurHeadLineCount].Width:=22;
          HeadLineList[CurHeadLineCount].ItemCaptionList[0]:='10个号码';
          HeadLineList[CurHeadLineCount].CurItemCaptionCount:=1;
          HeadLIneList[CurHeadLineCount].DisplayFlag:=true;
          IdxZH3TenCode:=CurHeadLineCount;
          CurHeadLineCount:=CurHeadLineCount+1;
    end;
    

    //组合3,45个组合(不考虑重复号码)出现情况
    with gl_HeadLineList do
    begin
          HeadLineList[CurHeadLineCount].Caption:='组3,45个组合(每个组合2注)出现情况';
          HeadLineList[CurHeadLineCount].Color:=TColor(RGB(191,215,183));
          HeadLineList[CurHeadLineCount].ColBKColor:=gl_BackColorList.clColColorList[CurHeadLineCount mod 4];
          HeadLineList[CurHeadLineCount].Width:=22;
          for i:=0 to cnZH3CodeTypeNoMax-1  do
              HeadLineList[CurHeadLineCount].ItemCaptionList[i]:=IntToStr(gl_ZH3CodeTypeNoList.ZH3CodeTypeNoList[i].Code1)+IntToStr(gl_ZH3CodeTypeNoList.ZH3CodeTypeNoList[i].Code2);
          HeadLineList[CurHeadLineCount].CurItemCaptionCount:=cnZH3CodeTypeNoMax;
          HeadLIneList[CurHeadLineCount].DisplayFlag:=true;
          IdxZH3CodeTypeNo:=CurHeadLineCount;
          CurHeadLineCount:=CurHeadLineCount+1;
    end;

    //组合3,45个组合取前N个出现最多的,看看其出现概率
    with gl_HeadLineList do
    begin
          HeadLineList[CurHeadLineCount].Caption:='组3,45个组合取前N个出现情况';
          HeadLineList[CurHeadLineCount].Color:=TColor(RGB(191,215,183));
          HeadLineList[CurHeadLineCount].ColBKColor:=gl_BackColorList.clColColorList[CurHeadLineCount mod 4];
          HeadLineList[CurHeadLineCount].Width:=22;
          HeadLineList[CurHeadLineCount].ItemCaptionList[0]:=FormGetCode.EditZH3Code45GetPreN.Text;
          HeadLineList[CurHeadLineCount].CurItemCaptionCount:=1;
          HeadLIneList[CurHeadLineCount].DisplayFlag:=true;
          IdxZH3Code45SelectN:=CurHeadLineCount;
          CurHeadLineCount:=CurHeadLineCount+1;
    end;







    //以下是循环控制内容
    ////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    //设置每个标题相对位置
    j:=0;
    with gl_HeadLineList do
    begin
        for i:=0 to CurHeadLineCount-1 do
        begin
            HeadLineList[i].HeadLinePosition:=j;
            j:=j+HeadLineList[i].CurItemCaptionCount;
        end;
    end;

    /////////////////////////////////////////////////////////////
    //显示行列序号
    for i:=1 to  ZcPersistGrid.ColCount-1 do ZcPersistGrid.Cells[i,0].EditText:=IntToStr(i);
    for i:=0 to  ZcPersistGrid.RowCount-1 do ZcPersistGrid.Cells[0,gl_InfoFirstStartRow+i].EditText:=IntToStr(i+1);


   ////////////////////////////////////
   //end ini file
   finally
       Ini.Free;
   end;

end;

//显示标题
procedure TForm3D.DisplayHeadLine;
var
   i,j,x1,x2:integer;
   vRect,R1:TRect;
begin
   with gl_HeadLineList do
   begin
       for i:=0 to CurHeadLineCount-1 do
       begin
           //大标题
           vRect.Left:=gl_HeadLineGridStartCol+HeadLineList[i].HeadLinePosition;
           vRect.Top:=gl_HeadLIneGridStartRow;
           vRect.Right:=gl_HeadLineGridStartCol+HeadLineList[i].HeadLinePosition+HeadLineList[i].CurItemCaptionCount;
           vRect.Bottom:=gl_HeadLIneGridStartRow+1;
           ZcPersistGrid.Merge(vRect);
           SetCellValue(vRect.Left,vRect.Top,HeadLineList[i].Caption);

           for x1:=vRect.Left to vRect.Right do
              for x2:=gl_InfoFirstStartRow to  ZcPersistGrid.RowCount-2 do
                  if length(ZcPersistGrid.Cells[x1,x2].Text)>0 then ZcPersistGrid.Cells[x1,x2].Text:='';


           //小标题
           for j:=0 to HeadLineList[i].CurItemCaptionCount-1 do
           begin
              SetCellValue(vRect.Left+j,vRect.Top+1,HeadLineList[i].ItemCaptionList[j]);
              if HeadLineList[i].DisplayFlag=true then ZcPersistGrid.ColWidths[vRect.Left+j]:=HeadLineList[i].Width
              else ZcPersistGrid.ColWidths[vRect.Left+j]:=0;
              ZcPersistGrid.Colors.Cols[vRect.Left+j]:=HeadLineList[i].ColBkColor;
           end;

           //第一项开奖号码期数列重新设置列宽
           if i=0 then ZcPersistGrid.ColWidths[vRect.Left]:=50;

           //第一、二行标题列高加长
           ZcPersistGrid.RowHeights[vRect.Top]:=30;
           ZcPersistGrid.RowHeights[vRect.Top+1]:=30;

           // 设置列的对齐方式, 默认对齐方式是居中
           //Grid.TextAligns.Cols[1] := gaCenterCenter;

           /////////////////////////////////////////////////////////////
           //第二部分标题
           if i>0 then  //跳过奖号
           begin
              //大标题
               vRect.Left:=gl_InfoStartCol+HeadLineList[i].HeadLinePosition;
               vRect.Top:=gl_InfoSecondStartRow-2;
               vRect.Right:=gl_InfoStartCol+HeadLineList[i].HeadLinePosition+HeadLineList[i].CurItemCaptionCount;
               vRect.Bottom:=gl_InfoSecondStartRow-1;
               ZcPersistGrid.Merge(vRect);
               SetCellValue(vRect.Left,vRect.Top,HeadLineList[i].Caption);
               ZcPersistGrid.Cells[vRect.Left,vRect.Top].Color:=gl_BackColorList.clSecondHeadLineBKColor;

               //小标题
               for j:=0 to HeadLineList[i].CurItemCaptionCount-1 do
               begin
                  SetCellValue(vRect.Left+j,vRect.Top+1,HeadLineList[i].ItemCaptionList[j]);
                  ZcPersistGrid.Cells[vRect.Left+j,vRect.Top+1].Color:=gl_BackColorList.clSecondHeadLineBKColor;
               end;
           end;
           //第一、二行标题列高加长
           ZcPersistGrid.RowHeights[vRect.Top]:=30;
           ZcPersistGrid.RowHeights[vRect.Top+1]:=30;

       end;
   end;



   ///////////////////////////////////////////////////////////////////////////////////////////////
   //显示开奖信息
   for i:=0 to gl_CodeList.CurCodeCount-1 do
   begin
       SetCellValue(gl_InfoStartCol+gl_HeadLineList.HeadLineList[gl_HeadLineList.IdxCode].HeadLinePosition,gl_InfoFirstStartRow+i,gl_CodeList.CodeList[i].CodeDateNumber);
       SetCellValue(gl_InfoStartCol+gl_HeadLineList.HeadLineList[gl_HeadLineList.IdxCode].HeadLinePosition+1,gl_InfoFirstStartRow+i,IntToStr(gl_CodeList.CodeList[i].Code1));
       SetCellValue(gl_InfoStartCol+gl_HeadLineList.HeadLineList[gl_HeadLineList.IdxCode].HeadLinePosition+2,gl_InfoFirstStartRow+i,IntToStr(gl_CodeList.CodeList[i].Code2));
       SetCellValue(gl_InfoStartCol+gl_HeadLineList.HeadLineList[gl_HeadLineList.IdxCode].HeadLinePosition+3,gl_InfoFirstStartRow+i,IntToStr(gl_CodeList.CodeList[i].Code3));
   end;

end;

//重新显示标题
procedure TForm3D.DisplayHeadLineRepaint(pIdx:integer);
var
   i,j,x1,x2:integer;
   vRect,R1:TRect;
begin
   with gl_HeadLineList do
   begin
           vRect.Left:=gl_HeadLineGridStartCol+HeadLineList[pIdx].HeadLinePosition;
           vRect.Top:=gl_HeadLIneGridStartRow;
           //小标题
           for j:=0 to HeadLineList[pIdx].CurItemCaptionCount-1 do
              SetCellValue(vRect.Left+j,vRect.Top+1,HeadLineList[pIdx].ItemCaptionList[j]);

           vRect.Left:=gl_InfoStartCol+HeadLineList[pIdx].HeadLinePosition;
           vRect.Top:=gl_InfoSecondStartRow-2;
           //小标题
           for j:=0 to HeadLineList[pIdx].CurItemCaptionCount-1 do
               SetCellValue(vRect.Left+j,vRect.Top+1,HeadLineList[pIdx].ItemCaptionList[j]);
   end;

end;


//设置单元格值
procedure TForm3D.SetCellValue(pCol:integer;pRow:integer;pValue:string);
begin
   ZcPersistGrid.Cells[pCol,pRow].EditText:=pValue;
end;

//设置单元格背景色
procedure TForm3D.SetBackColor(pCol:integer;pRow:integer;pBkColor:TColor);
begin
    ZcPersistGrid.Cells[pCol,pRow].Color:=pBkColor;
end;




////////////////////////////////////////////////////////////////////////////////////////////////////
//////
//////     分析函数和过程
//////
////////////////////////////////////////////////////////////////////////////////////////////////////

//判定奇偶个数(奇数个数)
function TForm3D.GetOddEvenCount(pCode1:integer;pCode2:integer;pCode3:integer):integer;
var
  iCount:integer;
begin
  iCount:=0;
  if (pCode1 mod 2)=1 then iCount:=iCount+1;
  if (pCode2 mod 2)=1 then iCount:=iCount+1;
  if (pCode3 mod 2)=1 then iCount:=iCount+1;
  GetOddEvenCount:=iCount;
end;

//判定大小个数(大的个数)
function TForm3D.GetBigSmallCount(pCode1:integer;pCode2:integer;pCode3:integer):integer;
var
  iCount:integer;
begin
  iCount:=0;
  if pCode1>=5 then iCount:=iCount+1;
  if pCode2>=5 then iCount:=iCount+1;
  if pCode3>=5 then iCount:=iCount+1;
  GetBigSmallCount:=iCount;
end;

//判定号码个数
function TForm3D.GetCodeCount(pCode1:integer;pCode2:integer;pCode3:integer):integer;
var
  iCount,i:integer;
  vCode:array[0..9] of integer;
begin
   for i:=0 to 9 do vCode[i]:=0;
   vCode[pCode1]:=1;
   vCode[pCode2]:=1;
   vCode[pCode3]:=1;

  iCount:=0;
  for i:=0 to 9 do if vCode[i]=1 then iCount:=iCount+1;

  GetCodeCount:=iCount;

end;

//取得形状ID
function TForm3D.GetShapeIndex(pCode1:integer;pCode2:integer;pCode3:integer):integer;
var
  vCodeShape:integer;
begin
  if (pCode1<pCode2) and (pCode2<pCode3) then vCodeShape:=spLineHeadRight;
  if (pCode1>pCode2) and (pCode2>pCode3) then vCodeShape:=spLineHeadLeft;
  if (pCode1<pCode2) and (pCode2>pCode3) then vCodeShape:=spTipToTop;
  if (pCode1>pCode2) and (pCode2<pCode3) then vCodeShape:=spTipToBottom;
  if (pCode1=pCode2) and (pCode2<pCode3) then vCodeShape:=spFlatToRigthTop;
  if (pCode1=pCode2) and (pCode2>pCode3) then vCodeShape:=spFlatToRigthBottom;
  if (pCode1>pCode2) and (pCode2=pCode3) then vCodeShape:=spLeftTopToFlat;
  if (pCode1<pCode2) and (pCode2=pCode3) then vCodeShape:=spLeftBottomToFlat;
  if (pCode1=pCode2) and (pCode2=pCode3) then vCodeShape:=spFlat;
  GetShapeIndex:=vCodeShape;
end;

//取得连号个数
function TForm3D.GetLinkCodeCount(pCode1:integer;pCode2:integer;pCode3:integer):integer;
var
  iLink:integer;
begin
   iLink:=0;
   if abs(pCode1-pCode2)=1 then iLink:=iLink+1;
   if abs(pCode2-pCode3)=1 then iLink:=iLink+1;

   GetLinkCodeCOunt:=iLink;
end;

//取得开宝个数
function TForm3D.GetTreasureCount(pCode1:integer;pCode2:integer;pCode3:integer):integ

⌨️ 快捷键说明

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