-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unit2.~pas
114 lines (102 loc) · 3.13 KB
/
Unit2.~pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm2 = class(TForm)
Button2: TButton;
Button3: TButton;
Button1: TButton;
RadioGroup1: TRadioGroup;
RG2: TRadioGroup;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure RG2Click(Sender: TObject);
private
{ Private declarations }
public
DopSt : String;
{ Public declarations }
end;
var
Form2: TForm2;
ts : string;
implementation
uses TableFm;
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
var s, s2: string;
begin
if Radiogroup1.ItemIndex = 0 then
Begin
s := 'Data\TempGraph.txt';
s2 := 'Data\Graph\'+Form1.Languages.Items[Form1.Languages.ItemIndex]+'\R_HAG'+ts+'.chs' ;
SetCurrentDir(Form1.MyDir);
winexec(PChar('Graph.exe '+s+' '+s2+ ' ' +DopSt+' -thick -menu -readonly -n -rnav -gray'),sw_restore);
End
else
Begin
s := 'Data\TempGraphA.txt';
s2 := 'Data\Graph\'+Form1.Languages.Items[Form1.Languages.ItemIndex]+'\A_HAG'+ts+'.chs' ;
SetCurrentDir(Form1.MyDir);
winexec(PChar('Graph.exe '+s+' '+s2+ ' ' +DopSt+' -thick -menu -rnav -readonly -n -gray'),sw_restore);
End
end;
procedure TForm2.Button2Click(Sender: TObject);
var s, s2: string;
begin
if Radiogroup1.ItemIndex = 0 then
Begin
s := 'Data\TempGraph.txt';
s2 := 'Data\Graph\'+Form1.Languages.Items[Form1.Languages.ItemIndex]+'\R_Hgt'+ts+'.chs' ;
SetCurrentDir(Form1.MyDir);
if Button1.Enabled then
if MessageDlg(Form1.Qstn, mtConfirmation, [mbYes, mbNo], 0) =6 then
Begin
// s2 := 'Data\Graph\'+Form1.Languages.Items[Form1.Languages.ItemIndex]+'\R_Hgt2'+ts+'.chs' ;
s := 'Data\TempGraphB.txt';
End;
// else
winexec(PChar('Graph.exe '+s+' '+s2+ ' ' +DopSt+' -thick -menu -readonly -rnav -n -gray'),sw_restore);
End
else
Begin
s := 'Data\TempGraphA.txt';
s2 := 'Data\Graph\'+Form1.Languages.Items[Form1.Languages.ItemIndex]+'\A_Hgt'+ts+'.chs' ;
SetCurrentDir(Form1.MyDir);
winexec(PChar('Graph.exe '+s+' '+s2+ ' ' +DopSt+' -thick -menu -readonly -rnav -n -gray'),sw_restore);
End
end;
procedure TForm2.Button3Click(Sender: TObject);
var s, s2: string;
begin
if Radiogroup1.ItemIndex = 0 then
Begin
s := 'Data\TempGraph.txt';
s2 := 'Data\Graph\'+Form1.Languages.Items[Form1.Languages.ItemIndex]+'\R_Dev'+ts+'.chs' ;
SetCurrentDir(Form1.MyDir);
winexec(PChar('Graph.exe '+s+' '+s2+ ' ' +DopSt+' -thick -menu -readonly -rnav -n -gray'),sw_restore);
End
else
Begin
s := 'Data\TempGraphA.txt';
s2 := 'Data\Graph\'+Form1.Languages.Items[Form1.Languages.ItemIndex]+'\A_Dev'+ts+'.chs' ;
SetCurrentDir(Form1.MyDir);
winexec(PChar('Graph.exe '+s+' '+s2+ ' ' +DopSt+' -thick -menu -rnav -readonly -n -gray'),sw_restore);
End
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
ts :='';
end;
procedure TForm2.RG2Click(Sender: TObject);
begin
case RG2.ItemIndex of
0: ts :='';
1: ts :='_t';
end;
end;
end.