Advertisement
Guest User

Untitled

a guest
Nov 20th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.49 KB | None | 0 0
  1. Index: frmRescanPointerUnit.pas
  2. ===================================================================
  3. --- frmRescanPointerUnit.pas    (wersja 2229)
  4. +++ frmRescanPointerUnit.pas    (kopia robocza)
  5. @@ -61,6 +61,7 @@
  6.  
  7.      btnAddEndOffset, btnRemoveEndOffset: TButton;
  8.      btnAddStartOffset, btnRemoveStartOffset: Tbutton;
  9. +    lblInfoFirstOffset, lblInfoLastOffset: TLabel;
  10.  
  11.  
  12.  
  13. @@ -275,6 +276,15 @@
  14.      e.Parent:=self;
  15.      endoffsets.Add(e);
  16.  
  17. +    if lblInfoLastOffset=nil then
  18. +    begin
  19. +      lblInfoLastOffset:=TLabel.create(self);
  20. +      lblInfoLastOffset.caption:='Last offset';
  21. +      lblInfoLastOffset.left:=e.Left+e.Width+3;
  22. +      lblInfoLastOffset.parent:=self;
  23. +      lblInfoLastOffset.visible:=false;
  24. +    end;
  25. +
  26.      if btnAddendOffset=nil then
  27.      begin
  28.        btnAddendOffset:=TButton.create(self);
  29. @@ -312,6 +322,9 @@
  30.      if btnRemoveendOffset<>nil then
  31.        btnRemoveendOffset.visible:=false;
  32.  
  33. +    if lblInfoLastOffset<>nil then
  34. +      lblInfoLastOffset.visible:=false;
  35. +
  36.      if endoffsets<>nil then
  37.        freeandnil(endoffsets);
  38.    end;
  39. @@ -333,6 +346,15 @@
  40.      e.Parent:=self;
  41.      startoffsets.Add(e);
  42.  
  43. +    if lblInfoFirstOffset=nil then
  44. +    begin
  45. +      lblInfoFirstOffset:=TLabel.create(self);
  46. +      lblInfoFirstOffset.caption:='First offset';
  47. +      lblInfoFirstOffset.left:=e.Left+e.Width+3;
  48. +      lblInfoFirstOffset.parent:=self;
  49. +      lblInfoFirstOffset.visible:=false;
  50. +    end;
  51. +
  52.      if btnAddStartOffset=nil then
  53.      begin
  54.        btnAddStartOffset:=TButton.create(self);
  55. @@ -367,6 +389,9 @@
  56.      if btnRemoveStartOffset<>nil then
  57.        btnRemoveStartOffset.visible:=false;
  58.  
  59. +    if lblInfoFirstOffset<>nil then
  60. +      lblInfoFirstOffset.visible:=false;
  61. +
  62.      if startoffsets<>nil then
  63.        freeandnil(startoffsets);
  64.    end;
  65. @@ -406,6 +431,13 @@
  66.        e:=tedit(startoffsets[i]);
  67.        e.top:=nextstart;
  68.  
  69. +      if startoffsets.count=1 then lblInfoFirstOffset.visible:=false
  70. +      else if i=0 then
  71. +           begin
  72. +             lblInfoFirstOffset.visible:=true;
  73. +             lblInfoFirstOffset.top:=nextstart+3;
  74. +           end;
  75. +
  76.        nextstart:=nextstart+e.height+3;
  77.      end;
  78.  
  79. @@ -421,17 +453,26 @@
  80.    if cbMustEndWithSpecificOffsets.checked then
  81.    begin
  82.      nextstart:=cbMustEndWithSpecificOffsets.top+cbMustEndWithSpecificOffsets.Height+3;
  83. +
  84. +    btnAddEndOffset.top:=nextstart;
  85. +    btnRemoveEndOffset.top:=nextstart;
  86. +
  87.      for i:=0 to endoffsets.count-1 do
  88.      begin
  89.        e:=tedit(endoffsets[i]);
  90.        e.top:=nextstart;
  91.  
  92. +      if endoffsets.count=1 then lblInfoLastOffset.visible:=false
  93. +      else if i=endoffsets.count-1 then
  94. +           begin
  95. +             lblInfoLastOffset.visible:=true;
  96. +             lblInfoLastOffset.top:=nextstart+3;
  97. +           end;
  98. +
  99.        nextstart:=nextstart+e.height+3;
  100.      end;
  101.  
  102. -    btnAddEndOffset.top:=e.top;
  103. -    btnRemoveEndOffset.top:=e.top;
  104. -    pnlbuttons.top:=btnAddEndOffset.top+btnAddEndOffset.height+5;
  105. +    pnlbuttons.top:=nextstart+5;
  106.    end
  107.    else
  108.      pnlButtons.top:=cbMustEndWithSpecificOffsets.top+cbMustEndWithSpecificOffsets.Height+5;
  109. @@ -467,8 +508,7 @@
  110.    e:=Tedit.create(self);
  111.    e.left:=cbMustStartWithSpecificOffsets.left;
  112.    e.Parent:=self;
  113. -  endoffsets.Add(e);
  114. -
  115. +  endoffsets.Insert(0,e);
  116.    updatePositions;
  117.  end;
  118.  
  119. @@ -478,7 +518,7 @@
  120.      cbMustEndWithSpecificOffsets.checked:=false
  121.    else
  122.    begin
  123. -    endoffsets.Delete(endoffsets.count-1);
  124. +    endoffsets.Delete(0);
  125.      updatePositions;
  126.    end;
  127.  end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement