daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest May 31st, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program new;
  2. {$i srl\srl.scar}
  3. var
  4.   Form : TFORM;
  5.   labels : array [0..1] of array of TLabel;
  6.   edits : array [0..1] of array of TEdit;
  7.   combos : Array of TCOMBOBOX;
  8.   buttons : Array [0..3] of TButton;
  9.   v : Tvariantarray;
  10.   c : integer;
  11.  
  12. const
  13.   column_one = 0;
  14.   column_two = 1;
  15.  
  16. procedure ButtonClick(Sender: TObject);
  17. begin
  18. end;
  19.  
  20. procedure paint(Sender: TObject);
  21. begin
  22.   c := LoadBitmap(ScriptPath + 'background.bmp')
  23.   DrawBitmap(c, form.CANVAS, 0, 0);
  24.   freebitmap(c);
  25. end;
  26.  
  27. procedure init;
  28. var
  29.   i, ii, iii : integer;
  30.   labelcaptions : array [0..1] of array of String;
  31.   combotexts : array[0..1] of array of String;
  32.   buttontexts : array of String;
  33. begin
  34.   labelcaptions[column_one] :=
  35.     ['Username:', 'Password:', 'Nick:', 'Pin:'];
  36.   labelcaptions[column_two] :=
  37.     ['Loads:', 'Server:', 'Signed:', 'Action:'];
  38.   combotexts[0] := ['True', 'False'];
  39.   combotexts[1] := ['[Lumby] Spin Flax', '[LLetya] Pick Flax', '[Cammy] Pick Flax', '[Cammy] Spin Flax', '[Cammy] Both'];
  40.   buttontexts := ['Save', 'Load', 'Start', 'Stop'];
  41.   Form := CreateForm;
  42.   with Form do
  43.   begin
  44.     Caption := 'Awkward Epic Flaxer';
  45.     SetBounds(100, 100, 360, 200);
  46.     BorderStyle := BSToolWindow;
  47.     ONpaint:= @paint;
  48.  
  49.  
  50.   end;
  51.   setarraylength(labels[column_one], 5);
  52.   for i := 1 to 4 do
  53.   begin
  54.     labels[column_one][i] := TLabel.Create(Form);
  55.     with labels[column_one][i] do
  56.     begin
  57.       Parent := Form;
  58.       caption := labelcaptions[column_one][i - 1];
  59.       left := 10;
  60.       top := i * 28;
  61.     end;
  62.   end;
  63.  
  64.   setarraylength(labels[column_two], 5);
  65.   for i := 1 to 4 do
  66.   begin
  67.     labels[column_two][i] := TLabel.Create(Form);
  68.     with labels[column_two][i] do
  69.     begin
  70.       Parent := Form;
  71.       caption := labelcaptions[column_two][i - 1];
  72.       left := 200;
  73.       top := i * 28;
  74.     end;
  75.   end;
  76.  
  77.   setarraylength(edits[column_one], 5);
  78.   for i := 1 to 4 do
  79.   begin
  80.     edits[column_one][i] := Tedit.Create(Form);
  81.     with edits[column_one][i] do
  82.     begin
  83.       Parent := Form;
  84.       Height := 30;
  85.       Width := 110;
  86.       left := 75;
  87.       top := i * 28;
  88.     end;
  89.   end;
  90.  
  91.   setarraylength(edits[column_two], 3);
  92.   for i := 1 to 2 do
  93.   begin
  94.     edits[column_two][i] := Tedit.Create(Form);
  95.     with edits[column_two][i] do
  96.     begin
  97.       Parent := Form;
  98.       Height := 30;
  99.       Width := 110;
  100.       left := 250;
  101.       top := i * 28;
  102.     end;
  103.   end;
  104.  
  105.   setarraylength(combos, 3);
  106.   for i := 1 to 2 do
  107.   begin
  108.     combos[i] := Tcombobox.Create(Form);
  109.     with combos[i] do
  110.     begin
  111.       Parent := Form;
  112.       Height := 30;
  113.       Width := 110;
  114.       left := 250;
  115.       top := 56 + i * 28;
  116.       if i = 1 then iii := 1 else iii := 4;
  117.       for II := 0 to iii do
  118.         Items.Add(ComboTexts[i - 1][ii]);
  119.     end;
  120.   end;
  121.  
  122.   for I := 0 to 3 do
  123.   begin
  124.     Buttons[I] := TButton.Create(Form);
  125.     with Buttons[I] do
  126.     begin
  127.       Parent := Form;
  128.       height := 40;
  129.       width := 90;
  130.       left := i * 90;
  131.       top := 142;
  132.       Caption := buttontexts[i];
  133.       OnClick := @ButtonClick;
  134.     end;
  135.   end;
  136.   form.ShowModal;
  137.   form.Free;
  138. end;
  139. begin
  140.   ThreadSafeCall('init',v);
  141. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top