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

📄 ugetcode.pas

📁 福利彩票3D分析程序 使用Delphi开发。
💻 PAS
📖 第 1 页 / 共 2 页
字号:
             if CheckBoxSelectDouble.Checked=true then
             begin
                 flag:=false;
                 i:=Form3D.GetTreasureCount(loop1,loop2,loop3);

                 if (CheckBoxDouble0.Checked=true) and (i=0) then flag:=true;
                 if (CheckBoxDouble1.Checked=true) and (i=1) then flag:=true;
                 if (CheckBoxDouble2.Checked=true) and (i=2) then flag:=true;

                 if flag=false then goto NextLoop;
             end;

              //以前出现
             if CheckBoxSelectPreDisplay.Checked=true then
             begin
                 flag:=false;
                 i:=Form3D.GetPreDisplayFlag(loop1,loop2,loop3,-1);

                 if (CheckBoxPreDisplayNo.Checked=true) and (i=0) then flag:=true;
                 if (CheckBoxPreDisplayYes.Checked=true) and (i=1) then flag:=true;

                 if flag=false then goto NextLoop;
             end;
            


             //指定位置号码
             if CheckBoxSelectDefine3Code.Checked=true then
             begin
               flag:=false;
               flag1:=false;
               flag2:=false;
               flag3:=false;

               if (CheckBoxDefine1_0.Checked=true) and (loop1=0) then flag1:=true;
               if (CheckBoxDefine1_1.Checked=true) and (loop1=1) then flag1:=true;
               if (CheckBoxDefine1_2.Checked=true) and (loop1=2) then flag1:=true;
               if (CheckBoxDefine1_3.Checked=true) and (loop1=3) then flag1:=true;
               if (CheckBoxDefine1_4.Checked=true) and (loop1=4) then flag1:=true;
               if (CheckBoxDefine1_5.Checked=true) and (loop1=5) then flag1:=true;
               if (CheckBoxDefine1_6.Checked=true) and (loop1=6) then flag1:=true;
               if (CheckBoxDefine1_7.Checked=true) and (loop1=7) then flag1:=true;
               if (CheckBoxDefine1_8.Checked=true) and (loop1=8) then flag1:=true;
               if (CheckBoxDefine1_9.Checked=true) and (loop1=9) then flag1:=true;

               if (CheckBoxDefine2_0.Checked=true) and (loop2=0) then flag2:=true;               
               if (CheckBoxDefine2_1.Checked=true) and (loop2=1) then flag2:=true;
               if (CheckBoxDefine2_2.Checked=true) and (loop2=2) then flag2:=true;
               if (CheckBoxDefine2_3.Checked=true) and (loop2=3) then flag2:=true;
               if (CheckBoxDefine2_4.Checked=true) and (loop2=4) then flag2:=true;
               if (CheckBoxDefine2_5.Checked=true) and (loop2=5) then flag2:=true;
               if (CheckBoxDefine2_6.Checked=true) and (loop2=6) then flag2:=true;
               if (CheckBoxDefine2_7.Checked=true) and (loop2=7) then flag2:=true;
               if (CheckBoxDefine2_8.Checked=true) and (loop2=8) then flag2:=true;
               if (CheckBoxDefine2_9.Checked=true) and (loop2=9) then flag2:=true;
               
               if (CheckBoxDefine3_0.Checked=true) and (loop3=0) then flag3:=true;               
               if (CheckBoxDefine3_1.Checked=true) and (loop3=1) then flag3:=true;
               if (CheckBoxDefine3_2.Checked=true) and (loop3=2) then flag3:=true;
               if (CheckBoxDefine3_3.Checked=true) and (loop3=3) then flag3:=true;
               if (CheckBoxDefine3_4.Checked=true) and (loop3=4) then flag3:=true;
               if (CheckBoxDefine3_5.Checked=true) and (loop3=5) then flag3:=true;
               if (CheckBoxDefine3_6.Checked=true) and (loop3=6) then flag3:=true;
               if (CheckBoxDefine3_7.Checked=true) and (loop3=7) then flag3:=true;
               if (CheckBoxDefine3_8.Checked=true) and (loop3=8) then flag3:=true;
               if (CheckBoxDefine3_9.Checked=true) and (loop3=9) then flag3:=true;

               if (flag1=true) and (flag2=true) and (flag3=true) then flag:=true;

               if flag=false then goto NextLoop;
             end;

             //指定号码
             if CheckBoxSelectDefine3Code.Checked=true then
             begin
               flag:=false;
               flag1:=false;
               flag2:=false;
               flag3:=false;

               if (CheckBoxDefineCode0.Checked=true) and (loop1=0) then flag1:=true;
               if (CheckBoxDefineCode1.Checked=true) and (loop1=1) then flag1:=true;
               if (CheckBoxDefineCode2.Checked=true) and (loop1=2) then flag1:=true;
               if (CheckBoxDefineCode3.Checked=true) and (loop1=3) then flag1:=true;
               if (CheckBoxDefineCode4.Checked=true) and (loop1=4) then flag1:=true;
               if (CheckBoxDefineCode5.Checked=true) and (loop1=5) then flag1:=true;
               if (CheckBoxDefineCode6.Checked=true) and (loop1=6) then flag1:=true;
               if (CheckBoxDefineCode7.Checked=true) and (loop1=7) then flag1:=true;
               if (CheckBoxDefineCode8.Checked=true) and (loop1=8) then flag1:=true;
               if (CheckBoxDefineCode9.Checked=true) and (loop1=9) then flag1:=true;

               if (CheckBoxDefineCode0.Checked=true) and (loop2=0) then flag2:=true;               
               if (CheckBoxDefineCode1.Checked=true) and (loop2=1) then flag2:=true;
               if (CheckBoxDefineCode2.Checked=true) and (loop2=2) then flag2:=true;
               if (CheckBoxDefineCode3.Checked=true) and (loop2=3) then flag2:=true;
               if (CheckBoxDefineCode4.Checked=true) and (loop2=4) then flag2:=true;
               if (CheckBoxDefineCode5.Checked=true) and (loop2=5) then flag2:=true;
               if (CheckBoxDefineCode6.Checked=true) and (loop2=6) then flag2:=true;
               if (CheckBoxDefineCode7.Checked=true) and (loop2=7) then flag2:=true;
               if (CheckBoxDefineCode8.Checked=true) and (loop2=8) then flag2:=true;
               if (CheckBoxDefineCode9.Checked=true) and (loop2=9) then flag2:=true;
               
               if (CheckBoxDefineCode0.Checked=true) and (loop3=0) then flag3:=true;               
               if (CheckBoxDefineCode1.Checked=true) and (loop3=1) then flag3:=true;
               if (CheckBoxDefineCode2.Checked=true) and (loop3=2) then flag3:=true;
               if (CheckBoxDefineCode3.Checked=true) and (loop3=3) then flag3:=true;
               if (CheckBoxDefineCode4.Checked=true) and (loop3=4) then flag3:=true;
               if (CheckBoxDefineCode5.Checked=true) and (loop3=5) then flag3:=true;
               if (CheckBoxDefineCode6.Checked=true) and (loop3=6) then flag3:=true;
               if (CheckBoxDefineCode7.Checked=true) and (loop3=7) then flag3:=true;
               if (CheckBoxDefineCode8.Checked=true) and (loop3=8) then flag3:=true;
               if (CheckBoxDefineCode9.Checked=true) and (loop3=9) then flag3:=true;

               if (flag1=true) and (flag2=true) and (flag3=true) then flag:=true;

               if flag=false then goto NextLoop;
             end;


            //包含号码
            if CheckBoxSelectInCode.Checked=true then
             begin
               flag:=false;

               if (CheckBoxSelectInCode0.Checked=true) and ((loop1=0) or (loop2=0) or (loop3=0)) then flag:=true;
               if (CheckBoxSelectInCode1.Checked=true) and ((loop1=1) or (loop2=1) or (loop3=1)) then flag:=true;
               if (CheckBoxSelectInCode2.Checked=true) and ((loop1=2) or (loop2=2) or (loop3=2)) then flag:=true;
               if (CheckBoxSelectInCode3.Checked=true) and ((loop1=3) or (loop2=3) or (loop3=3)) then flag:=true;
               if (CheckBoxSelectInCode4.Checked=true) and ((loop1=4) or (loop2=4) or (loop3=4)) then flag:=true;
               if (CheckBoxSelectInCode5.Checked=true) and ((loop1=5) or (loop2=5) or (loop3=5)) then flag:=true;
               if (CheckBoxSelectInCode6.Checked=true) and ((loop1=6) or (loop2=6) or (loop3=6)) then flag:=true;
               if (CheckBoxSelectInCode7.Checked=true) and ((loop1=7) or (loop2=7) or (loop3=7)) then flag:=true;
               if (CheckBoxSelectInCode8.Checked=true) and ((loop1=8) or (loop2=8) or (loop3=8)) then flag:=true;
               if (CheckBoxSelectInCode9.Checked=true) and ((loop1=9) or (loop2=9) or (loop3=9)) then flag:=true;

                if flag=false then goto NextLoop;
             end;






             //////////////////////////////////////////////////////////////////////////////////
             //////////////////////////////////////////////////////////////////////////////
             //全排列号码
             ZcPersistGridGetCode.Cells[1,iRow].Text:=IntToStr(loop1);
             ZcPersistGridGetCode.Cells[2,iRow].Text:=IntToStr(loop2);
             ZcPersistGridGetCode.Cells[3,iRow].Text:=IntToStr(loop3);
             iRow:=iRow+1;
             ZcPersistGridGetCode.RowCount:=iRow;

             //组合6
             if (loop1<>loop2) and (loop2<>loop3) and (loop1<>loop3) then
             begin
                CodeZH6Temp.Code1:=loop1;
                CodeZH6Temp.Code2:=loop2;
                CodeZH6Temp.Code3:=loop3;
                //排序从小到大
                if CodeZH6Temp.Code1>CodeZH6Temp.Code2 then
                begin
                    t:=CodeZH6Temp.Code1;
                    CodeZH6Temp.Code1:=CodeZH6Temp.Code2;
                    CodeZH6Temp.Code2:=t;
                end;
                if  CodeZH6Temp.Code1>CodeZH6Temp.Code3 then
                begin
                    t:=CodeZH6Temp.Code1;
                    CodeZH6Temp.Code1:=CodeZH6Temp.Code3;
                    CodeZH6Temp.Code3:=t;
                end;
                if CodeZH6Temp.Code2>CodeZH6Temp.Code3 then
                begin
                    t:=CodeZH6Temp.Code2;
                    CodeZH6Temp.Code2:=CodeZH6Temp.Code3;
                    CodeZH6Temp.Code3:=t;
                end;
                //查看是否以前有此号码
                for i:=1 to ZcPersistGrid3D6.RowCount-1 do
                begin
                   if (StrToInt(ZcPersistGrid3D6.Cells[1,i].Text)=CodeZH6Temp.Code1) and
                      (StrToInt(ZcPersistGrid3D6.Cells[2,i].Text)=CodeZH6Temp.Code2) and
                      (StrToInt(ZcPersistGrid3D6.Cells[3,i].Text)=CodeZH6Temp.Code3) then
                   begin
                       goto NextLoop;
                   end;
                end;
                //插入该号码
                ZcPersistGrid3D6.Cells[1,ZcPersistGrid3D6.RowCount].Text:=IntToStr(CodeZH6Temp.Code1);
                ZcPersistGrid3D6.Cells[2,ZcPersistGrid3D6.RowCount].Text:=IntToStr(CodeZH6Temp.Code2);
                ZcPersistGrid3D6.Cells[3,ZcPersistGrid3D6.RowCount].Text:=IntToStr(CodeZH6Temp.Code3);
                ZcPersistGrid3D6.RowCount:=ZcPersistGrid3D6.RowCount+1;
             end;


             //重新开始下一个数
             NextLoop:

        end;

    ///////////////////////////////////

    rect.Left:=1;
    rect.Top:=1;
    rect.Right:=ZcPersistGridGetCode.ColCount;
    rect.Bottom:=ZcPersistGridGetCode.RowCount;
    ZcPersistGridGetCode.CopyToClipboard(rect);

end;

procedure TFormGetCode.ButtonAddRowClick(Sender: TObject);
begin
    ZcPersistGridGetCode.RowCount:=ZcPersistGridGetCode.RowCount+1;
    ZcPersistGrid3D6.RowCount:=ZcPersistGrid3D6.RowCount+1;
end;

procedure TFormGetCode.ButtonSaveParamClick(Sender: TObject);
var
  Ini: TIniFile;
begin
  Ini := TIniFile.Create( ChangeFileExt( Application.ExeName, '.INI' ) );
  try
    Ini.WriteBool( 'CodeZHOnly', '3CodeOnly', CheckBox3CodeZHOnly.Checked);
    Ini.WriteBool( 'CodeZHOnly', '4CodeOnly', CheckBox4CodeZHOnly.Checked);
    Ini.WriteBool( 'CodeZHOnly', 'CheckBoxNCompagesProcess', CheckBoxNCompagesProcess.Checked);
    Ini.WriteInteger('Display', 'DisplayCurN', StrToInt(EditDisplayCurN.Text));
    Ini.WriteBool('DisplayColumn','IdxOddEven',                 CheckBoxIdxOddEven.Checked);
    Ini.WriteBool('DisplayColumn','IdxBigSmall',                CheckBoxIdxBigSmall.Checked);
    Ini.WriteBool('DisplayColumn','IdxCodeCount',               CheckBoxIdxCodeCount.Checked);
    Ini.WriteBool('DisplayColumn','IdxShape',                   CheckBoxIdxShape.Checked);
    Ini.WriteBool('DisplayColumn','IdxLinkCode',                CheckBoxIdxLinkCode.Checked);
    Ini.WriteBool('DisplayColumn','IdxTreasure',                CheckBoxIdxTreasure.Checked);
    Ini.WriteBool('DisplayColumn','IdxBrotherPre',              CheckBoxIdxBrotherPre.Checked);
    Ini.WriteBool('DisplayColumn','IdxBrotherPost',             CheckBoxIdxBrotherPost.Checked);
    Ini.WriteBool('DisplayColumn','IdxBrother2Head',            CheckBoxIdxBrother2Head.Checked);
    Ini.WriteBool('DisplayColumn','IdxTrendCode1',              CheckBoxIdxTrendCode1.Checked);
    Ini.WriteBool('DisplayColumn','IdxTrendCode2',              CheckBoxIdxTrendCode2.Checked);
    Ini.WriteBool('DisplayColumn','IdxTrendCode3',              CheckBoxIdxTrendCode3.Checked);
    Ini.WriteBool('DisplayColumn','IdxPreDisplayFlag',          CheckBoxIdxPreDisplayFlag.Checked);
    Ini.WriteBool('DisplayColumn','IdxPreDisplayFlagCurN',      CheckBoxIdxPreDisplayFlagCurN.Checked);
    Ini.WriteBool('DisplayColumn','IdxCodeCheck',               CheckBoxIdxCodeCheck.Checked);
    Ini.WriteBool('DisplayColumn','IdxCompages3Code',           CheckBoxIdxCompages3Code.Checked);
    Ini.WriteBool('DisplayColumn','IdxCompages4Code',           CheckBoxIdxCompages4Code.Checked);
    Ini.WriteInteger('PreNCode','CodePreNDispCurDisp',StrToInt(EditPreNDispCurDisp.Text));
    Ini.WriteInteger('PreNCode','EditCompages3BeforeN',StrToInt(EditCompages3BeforeN.Text));


  finally
    Ini.Free;
  end;
end;

procedure TFormGetCode.FormActivate(Sender: TObject);
var
  Ini: TIniFile;
begin
  Ini := TIniFile.Create( ChangeFileExt( Application.ExeName, '.INI' ) );
  try
    CheckBox3CodeZHOnly.Checked:=Ini.ReadBool( 'CodeZHOnly', '3CodeOnly',true);
    CheckBox4CodeZHOnly.Checked:=Ini.ReadBool( 'CodeZHOnly', '4CodeOnly',true);
    CheckBoxNCompagesProcess.Checked:=Ini.ReadBool( 'CodeZHOnly', 'CheckBoxNCompagesProcess',true);


    EditDisplayCurN.Text:=IntToStr(Ini.ReadInteger('Display', 'DisplayCurN',50));
    CheckBoxIdxOddEven.Checked           :=Ini.ReadBool('DisplayColumn','IdxOddEven',           true);
    CheckBoxIdxBigSmall.Checked          :=Ini.ReadBool('DisplayColumn','IdxBigSmall',          true);
    CheckBoxIdxCodeCount.Checked         :=Ini.ReadBool('DisplayColumn','IdxCodeCount',         true);
    CheckBoxIdxShape.Checked             :=Ini.ReadBool('DisplayColumn','IdxShape',             true);
    CheckBoxIdxLinkCode.Checked          :=Ini.ReadBool('DisplayColumn','IdxLinkCode',          true);
    CheckBoxIdxTreasure.Checked          :=Ini.ReadBool('DisplayColumn','IdxTreasure',          true);
    CheckBoxIdxBrotherPre.Checked        :=Ini.ReadBool('DisplayColumn','IdxBrotherPre',        true);
    CheckBoxIdxBrotherPost.Checked       :=Ini.ReadBool('DisplayColumn','IdxBrotherPost',       true);
    CheckBoxIdxBrother2Head.Checked      :=Ini.ReadBool('DisplayColumn','IdxBrother2Head',      true);
    CheckBoxIdxTrendCode1.Checked        :=Ini.ReadBool('DisplayColumn','IdxTrendCode1',        true);
    CheckBoxIdxTrendCode2.Checked        :=Ini.ReadBool('DisplayColumn','IdxTrendCode2',        true);
    CheckBoxIdxTrendCode3.Checked        :=Ini.ReadBool('DisplayColumn','IdxTrendCode3',        true);
    CheckBoxIdxPreDisplayFlag.Checked    :=Ini.ReadBool('DisplayColumn','IdxPreDisplayFlag',    true);
    CheckBoxIdxPreDisplayFlagCurN.Checked:=Ini.ReadBool('DisplayColumn','IdxPreDisplayFlagCurN',true);
    CheckBoxIdxCodeCheck.Checked         :=Ini.ReadBool('DisplayColumn','IdxCodeCheck',         true);
    CheckBoxIdxCompages3Code.Checked     :=Ini.ReadBool('DisplayColumn','IdxCompages3Code',     true);
    CheckBoxIdxCompages4Code.Checked     :=Ini.ReadBool('DisplayColumn','IdxCompages4Code',     true);
    EditPreNDispCurDisp.Text             :=Ini.ReadString('PreNCode','CodePreNDispCurDisp','2');
    EditCompages3BeforeN.Text            :=Ini.ReadString('PreNCode','EditCompages3BeforeN','5');
  finally
    Ini.Free;
  end
end;

procedure TFormGetCode.ButtonCellClearClick(Sender: TObject);
begin
      ZcPersistGridGetCode.Clear;  //清表
      ZcPersistGridGetCode.RowCount:=1;

      ZcPersistGrid3D6.Clear;  //清表
      ZcPersistGrid3D6.RowCount:=1;

end;

end.

⌨️ 快捷键说明

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