Subversion Repositories jumper

Rev

Rev 8 | Rev 21 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8 Rev 9
Line 72... Line 72...
72
  PerformanceMemo.Lines.Add(Format(LNG_POINTS_PER_MINUTE, [Round(FScore / FSeconds * 60)]));
72
  PerformanceMemo.Lines.Add(Format(LNG_POINTS_PER_MINUTE, [Round(FScore / FSeconds * 60)]));
73
 
73
 
74
  if FGoalStatus = gsLastStoneInGoalRed then
74
  if FGoalStatus = gsLastStoneInGoalRed then
75
  begin
75
  begin
76
    ExtraPoints := FieldTypeWorth(ftRed) * 100;
76
    ExtraPoints := FieldTypeWorth(ftRed) * 100;
77
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_RED, [ExtraPoints]))
77
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_RED, [ExtraPoints]));
-
 
78
    Inc(FScore, ExtraPoints);
78
  end
79
  end
79
  else if FGoalStatus = gsLastStoneInGoalYellow then
80
  else if FGoalStatus = gsLastStoneInGoalYellow then
80
  begin
81
  begin
81
    ExtraPoints := FieldTypeWorth(ftYellow) * 100;
82
    ExtraPoints := FieldTypeWorth(ftYellow) * 100;
82
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_YELLOW, [ExtraPoints]))
83
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_YELLOW, [ExtraPoints]));
-
 
84
    Inc(FScore, ExtraPoints);
83
  end
85
  end
84
  else if FGoalStatus = gsLastStoneInGoalGreen then
86
  else if FGoalStatus = gsLastStoneInGoalGreen then
85
  begin
87
  begin
86
    ExtraPoints := FieldTypeWorth(ftGreen) * 100;
88
    ExtraPoints := FieldTypeWorth(ftGreen) * 100;
87
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_GREEN, [ExtraPoints]))
89
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_GREEN, [ExtraPoints]));
-
 
90
    Inc(FScore, ExtraPoints);
88
  end
91
  end
89
  else if FGoalStatus = gsLastStoneOutsideGoal then
92
  else if FGoalStatus = gsLastStoneOutsideGoal then
90
  begin
93
  begin
91
    ExtraPoints := 0;
94
    ExtraPoints := 0;
92
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_MISSED, [ExtraPoints]))
95
    PerformanceMemo.Lines.Add(Format(LNG_GOAL_MISSED, [ExtraPoints]));
-
 
96
    Inc(FScore, ExtraPoints);
93
  end;
97
  end;
94
 
98
 
95
  Inc(FScore, ExtraPoints);
-
 
96
  PerformanceMemo.Lines.Strings[0] := Format(LNG_SCORE, [FScore]);
99
  PerformanceMemo.Lines.Strings[0] := Format(LNG_SCORE, [FScore]);
97
 
100
 
98
  result := ShowModal;
101
  result := ShowModal;
99
end;
102
end;
100
 
103
 
Line 158... Line 161...
158
 
161
 
159
procedure TFinishForm.SaveBtnClick(Sender: TObject);
162
procedure TFinishForm.SaveBtnClick(Sender: TObject);
160
begin
163
begin
161
  if NameEdit.Text = '' then
164
  if NameEdit.Text = '' then
162
  begin
165
  begin
163
    showmessage(LNG_ENTER_NAME);
166
    MessageDlg(LNG_ENTER_NAME, mtWarning, [mbOk], 0);
164
    NameEdit.SetFocus;
167
    NameEdit.SetFocus;
165
    Exit;
168
    Exit;
166
  end;
169
  end;
167
 
170
 
168
  SaveToJournal(NameEdit.Text, FScore, FStonesTotal, FStonesRemoved, FSeconds);
171
  SaveToJournal(NameEdit.Text, FScore, FStonesTotal, FStonesRemoved, FSeconds);
Line 177... Line 180...
177
 
180
 
178
procedure TFinishForm.FormCreate(Sender: TObject);
181
procedure TFinishForm.FormCreate(Sender: TObject);
179
begin
182
begin
180
  if not ForceDirectories(ExtractFilePath(Application.ExeName) + JNL_PATH) then
183
  if not ForceDirectories(ExtractFilePath(Application.ExeName) + JNL_PATH) then
181
  begin
184
  begin
182
    ShowMessage(Format(LNG_COULD_NOT_CREATE_DIR, [JNL_PATH]));
185
    MessageDlg(Format(LNG_COULD_NOT_CREATE_DIR, [JNL_PATH]), mtError, [mbOk], 0);
183
  end;
186
  end;
184
 
187
 
185
  LoadSettings;
188
  LoadSettings;
186
end;
189
end;
187
 
190