Changeset 59 for trunk/Forms/UFormMove.pas
- Timestamp:
- Sep 26, 2014, 12:05:30 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMove.pas
r42 r59 22 22 Label1: TLabel; 23 23 Label2: TLabel; 24 Label3: TLabel; 25 LabelWinProbability: TLabel; 24 26 SpinEditOnce: TSpinEdit; 25 27 SpinEditRepeat: TSpinEdit; … … 28 30 procedure ButtonOnceMaxClick(Sender: TObject); 29 31 procedure ButtonRepeatMinClick(Sender: TObject); 30 procedure uttonOnceMinClick(Sender: TObject); 32 procedure FormCreate(Sender: TObject); 33 procedure ButtonOnceMinClick(Sender: TObject); 31 34 procedure ButtonRepeatMaxClick(Sender: TObject); 32 35 procedure FormShow(Sender: TObject); … … 38 41 { private declarations } 39 42 public 40 { public declarations } 43 DefendCount: Integer; 44 procedure UpdateView; 41 45 end; 42 46 … … 47 51 48 52 {$R *.lfm} 53 54 uses 55 UCore; 49 56 50 57 { TFormMove } … … 62 69 end; 63 70 71 procedure TFormMove.UpdateView; 72 begin 73 LabelWinProbability.Caption := 74 IntToStr(Round(Core.Game.AttackProbability(SpinEditOnce.Value, 75 DefendCount) * 100)) + ' %'; 76 end; 77 64 78 procedure TFormMove.SpinEditOnceChange(Sender: TObject); 65 79 begin 66 80 if SpinEditOnce.Value <> TrackBarOnce.Position then 67 81 TrackBarOnce.Position := SpinEditOnce.Value; 82 UpdateView; 68 83 end; 69 84 … … 71 86 begin 72 87 ButtonOk.SetFocus; 88 UpdateView; 73 89 end; 74 90 … … 83 99 end; 84 100 85 procedure TFormMove.uttonOnceMinClick(Sender: TObject); 101 procedure TFormMove.FormCreate(Sender: TObject); 102 begin 103 104 end; 105 106 procedure TFormMove.ButtonOnceMinClick(Sender: TObject); 86 107 begin 87 108 TrackBarOnce.Position := TrackBarOnce.Min;
Note:
See TracChangeset
for help on using the changeset viewer.