Changeset 463

User picture

Author: nrymanov@gmail.com

(2010/02/22 17:43) Almost 2 years ago

see #29 - Редизайн и унификация пользовательского интерфейса

Affected files

Updated trunk/Forms/frm_bases.dfm Download diff

462463
5
  BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp]
5
  BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp]
6
  BorderStyle = bsDialog
6
  BorderStyle = bsDialog
7
  Caption = #1057#1074#1086#1081#1089#1090#1074#1072' '#1082#1086#1083#1083#1077#1082#1094#1080#1080
7
  Caption = #1057#1074#1086#1081#1089#1090#1074#1072' '#1082#1086#1083#1083#1077#1082#1094#1080#1080
8
  ClientHeight = 298
8
  ClientHeight = 281
9
  ClientWidth = 438
9
  ClientWidth = 438
10
  Color = clBtnFace
10
  Color = clBtnFace
11
  Font.Charset = DEFAULT_CHARSET
11
  Font.Charset = DEFAULT_CHARSET
...
...
18
  OnShow = FormShow
18
  OnShow = FormShow
19
  PixelsPerInch = 96
19
  PixelsPerInch = 96
20
  TextHeight = 13
20
  TextHeight = 13
21
  object RzPageControl1: TRzPageControl
21
  object pcCollectionInfo: TPageControl
22
    AlignWithMargins = True
22
    AlignWithMargins = True
23
    Left = 3
23
    Left = 3
24
    Top = 3
24
    Top = 3
25
    Width = 432
25
    Width = 432
26
    Height = 235
26
    Height = 235
27
    ActivePage = TabSheet1
27
    ActivePage = tsGeneralInfo
28
    Align = alClient
28
    Align = alTop
29
    TabIndex = 0
30
    TabOrder = 0
29
    TabOrder = 0
31
    ExplicitLeft = 40
30
    object tsGeneralInfo: TTabSheet
32
    ExplicitTop = 225
33
    ExplicitWidth = 481
34
    ExplicitHeight = 280
35
    FixedDimension = 19
36
    object TabSheet1: TRzTabSheet
37
      Caption = #1054#1089#1085#1086#1074#1085#1099#1077
31
      Caption = #1054#1089#1085#1086#1074#1085#1099#1077
38
      ExplicitLeft = 2
39
      ExplicitTop = 23
40
      ExplicitWidth = 492
41
      DesignSize = (
32
      DesignSize = (
42
        428
33
        424
43
        212)
34
        207)
44
      object MHLStaticTip1: TMHLStaticTip
35
      object MHLStaticTip1: TMHLStaticTip
45
        AlignWithMargins = True
36
        AlignWithMargins = True
46
        Left = 10
37
        Left = 10
47
        Top = 135
38
        Top = 138
48
        Width = 473
39
        Width = 407
49
        Height = 64
40
        Height = 62
50
        Margins.Left = 10
41
        Margins.Left = 10
51
        Margins.Top = 10
42
        Margins.Top = 10
52
        Margins.Right = 10
43
        Margins.Right = 10
...
...
56
          #1042#1085#1080#1084#1072#1085#1080#1077'! '#1053#1077#1082#1086#1088#1088#1077#1082#1090#1085#1086#1077'
'#1080#1079#1084#1077#1085#1077#1085#1080#1077' '#1089#1074#1086#1081#1089#1090#1074' '#1082#1086#1083#1083#1077#1082#1094#1080#1080'
'#1084#1086#1078#1077#1090' '#1087#1088#1080#1074#1077#1089#1090 +
47
          #1042#1085#1080#1084#1072#1085#1080#1077'! '#1053#1077#1082#1086#1088#1088#1077#1082#1090#1085#1086#1077'
'#1080#1079#1084#1077#1085#1077#1085#1080#1077' '#1089#1074#1086#1081#1089#1090#1074' '#1082#1086#1083#1083#1077#1082#1094#1080#1080'
'#1084#1086#1078#1077#1090' '#1087#1088#1080#1074#1077#1089#1090 +
57
          #1080' '#1082' '#1077#1077' '#1085#1077#1088#1072#1073#1086#1090#1086#1089#1087#1086#1089#1086#1073#1085#1086#1089#1090#1080'! '
48
          #1080' '#1082' '#1077#1077' '#1085#1077#1088#1072#1073#1086#1090#1086#1089#1087#1086#1089#1086#1073#1085#1086#1089#1090#1080'! '
58
      end
49
      end
59
      object Label1: TLabel
50
      object lblCollectionDescription: TLabel
60
        Left = 10
51
        Left = 10
61
        Top = 91
52
        Top = 91
62
        Width = 110
53
        Width = 110
...
...
64
        Caption = #1054#1087#1080#1089#1072#1085#1080#1077' '#1082#1086#1083#1083#1077#1082#1094#1080#1080':'
55
        Caption = #1054#1087#1080#1089#1072#1085#1080#1077' '#1082#1086#1083#1083#1077#1082#1094#1080#1080':'
65
        FocusControl = edCollectionRoot
56
        FocusControl = edCollectionRoot
66
      end
57
      end
67
      object Label5: TLabel
58
      object lblCollectionRoot: TLabel
68
        Left = 10
59
        Left = 10
69
        Top = 64
60
        Top = 64
70
        Width = 87
61
        Width = 87
...
...
72
        Caption = '&'#1055#1072#1087#1082#1072' '#1089' '#1082#1085#1080#1075#1072#1084#1080':'
63
        Caption = '&'#1055#1072#1087#1082#1072' '#1089' '#1082#1085#1080#1075#1072#1084#1080':'
73
        FocusControl = edCollectionRoot
64
        FocusControl = edCollectionRoot
74
      end
65
      end
75
      object Label9: TLabel
66
      object lblCollectionFile: TLabel
76
        Left = 10
67
        Left = 10
77
        Top = 37
68
        Top = 37
78
        Width = 87
69
        Width = 87
...
...
80
        Caption = '&'#1060#1072#1081#1083' '#1082#1086#1083#1083#1077#1082#1094#1080#1080':'
71
        Caption = '&'#1060#1072#1081#1083' '#1082#1086#1083#1083#1077#1082#1094#1080#1080':'
81
        FocusControl = edCollectionFile
72
        FocusControl = edCollectionFile
82
      end
73
      end
83
      object Label8: TLabel
74
      object lblCollectionName: TLabel
84
        Left = 10
75
        Left = 10
85
        Top = 10
76
        Top = 10
86
        Width = 109
77
        Width = 109
...
...
94
        Width = 221
85
        Width = 221
95
        Height = 17
86
        Height = 17
96
        Caption = #1048#1089#1087#1086#1083#1100#1079#1086#1074#1072#1090#1100' '#1086#1090#1085#1086#1089#1080#1090#1077#1083#1100#1085#1099#1077'
'#1087#1091#1090#1080' '
87
        Caption = #1048#1089#1087#1086#1083#1100#1079#1086#1074#1072#1090#1100' '#1086#1090#1085#1086#1089#1080#1090#1077#1083#1100#1085#1099#1077'
'#1087#1091#1090#1080' '
97
        TabOrder = 0
88
        TabOrder = 6
98
      end
89
      end
99
      object edDescription: TRzEdit
90
      object edDescription: TEdit
100
        Left = 126
91
        Left = 126
101
        Top = 88
92
        Top = 88
102
        Width = 297
93
        Width = 291
103
        Height = 21
94
        Height = 21
104
        TabOrder = 1
95
        TabOrder = 5
105
      end
96
      end
106
      object edCollectionRoot: TMHLAutoCompleteEdit
97
      object edCollectionRoot: TMHLAutoCompleteEdit
107
        Left = 126
98
        Left = 126
108
        Top = 61
99
        Top = 61
109
        Width = 212
100
        Width = 210
110
        Height = 21
101
        Height = 21
111
        Anchors = [akLeft, akTop, akRight]
102
        Anchors = [akLeft, akTop, akRight]
112
        TabOrder = 2
103
        TabOrder = 3
113
        AutoCompleteOption = [acoFileSystem]
104
        AutoCompleteOption = [acoFileSystem]
114
        ExplicitWidth = 276
115
      end
105
      end
116
      object edCollectionFile: TMHLAutoCompleteEdit
106
      object edCollectionFile: TMHLAutoCompleteEdit
117
        Left = 126
107
        Left = 126
118
        Top = 34
108
        Top = 34
119
        Width = 212
109
        Width = 210
120
        Height = 21
110
        Height = 21
121
        Anchors = [akLeft, akTop, akRight]
111
        Anchors = [akLeft, akTop, akRight]
122
        TabOrder = 3
112
        TabOrder = 1
123
        AutoCompleteOption = [acoFileSystem]
113
        AutoCompleteOption = [acoFileSystem]
124
      end
114
      end
125
      object edCollectionName: TEdit
115
      object edCollectionName: TEdit
126
        Left = 125
116
        Left = 126
127
        Top = 7
117
        Top = 7
128
        Width = 294
118
        Width = 291
129
        Height = 21
119
        Height = 21
130
        Anchors = [akLeft, akTop, akRight]
120
        Anchors = [akLeft, akTop, akRight]
131
        TabOrder = 4
121
        TabOrder = 0
132
        ExplicitWidth = 358
133
      end
122
      end
134
      object btnNewFile: TButton
123
      object btnNewFile: TButton
135
        Left = 344
124
        Left = 342
136
        Top = 30
125
        Top = 32
137
        Width = 75
126
        Width = 75
138
        Height = 25
127
        Height = 25
139
        Caption = #1042#1099#1073#1088#1072#1090#1100
128
        Caption = #1042#1099#1073#1088#1072#1090#1100
140
        TabOrder = 5
129
        TabOrder = 2
141
        OnClick = edDBFileButtonClick
130
        OnClick = edDBFileButtonClick
142
      end
131
      end
143
      object btnSelectRoot: TButton
132
      object btnSelectRoot: TButton
144
        Left = 344
133
        Left = 342
145
        Top = 60
134
        Top = 59
146
        Width = 75
135
        Width = 75
147
        Height = 25
136
        Height = 25
148
        Anchors = [akTop, akRight]
149
        Caption = #1042#1099#1073#1088#1072#1090#1100
137
        Caption = #1042#1099#1073#1088#1072#1090#1100
150
        TabOrder = 6
138
        TabOrder = 4
151
        OnClick = edDBFolderButtonClick
139
        OnClick = edDBFolderButtonClick
152
        ExplicitLeft = 408
153
      end
140
      end
154
    end
141
    end
155
    object TabSheet2: TRzTabSheet
142
    object tsConnectionInfo: TTabSheet
156
      Caption = #1055#1086#1076#1082#1083#1102#1095#1077#1085#1080#1077
143
      Caption = #1055#1086#1076#1082#1083#1102#1095#1077#1085#1080#1077
157
      ExplicitLeft = 0
144
      object lblUser: TLabel
158
      ExplicitTop = 0
145
        Left = 10
159
      ExplicitWidth = 0
146
        Top = 37
160
      ExplicitHeight = 0
147
        Width = 72
161
      object RzLabel5: TRzLabel
162
        Left = 16
163
        Top = 51
164
        Width = 93
165
        Height = 13
148
        Height = 13
166
        Caption = #1048#1084#1103' '#1087#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1103
149
        Caption = #1055#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1100
150
        FocusControl = edUser
167
        Transparent = True
151
        Transparent = True
168
      end
152
      end
169
      object RzLabel6: TRzLabel
153
      object lblPassword: TLabel
170
        Left = 237
154
        Left = 235
171
        Top = 52
155
        Top = 37
172
        Width = 37
156
        Width = 37
173
        Height = 13
157
        Height = 13
174
        Alignment = taRightJustify
158
        Alignment = taRightJustify
175
        Caption = #1055#1072#1088#1086#1083#1100
159
        Caption = #1055#1072#1088#1086#1083#1100
176
        Color = clMenuBar
160
        Color = clMenuBar
161
        FocusControl = edPass
177
        ParentColor = False
162
        ParentColor = False
178
        Transparent = True
163
        Transparent = True
179
      end
164
      end
180
      object RzLabel1: TRzLabel
165
      object lblURL: TLabel
181
        Left = 16
166
        Left = 10
182
        Top = 21
167
        Top = 10
183
        Width = 19
168
        Width = 19
184
        Height = 13
169
        Height = 13
185
        Alignment = taRightJustify
170
        Alignment = taRightJustify
186
        Caption = 'URL'
171
        Caption = 'URL'
187
        Color = clMenuBar
172
        Color = clMenuBar
173
        FocusControl = edURL
188
        ParentColor = False
174
        ParentColor = False
189
        Transparent = True
175
        Transparent = True
190
      end
176
      end
191
      object RzLabel2: TRzLabel
177
      object lblScript: TLabel
192
        Left = 16
178
        Left = 10
193
        Top = 75
179
        Top = 61
194
        Width = 122
180
        Width = 122
195
        Height = 13
181
        Height = 13
196
        Alignment = taRightJustify
182
        Alignment = taRightJustify
197
        Caption = #1057#1094#1077#1085#1072#1088#1080#1081' '#1087#1086#1076#1082#1083#1102#1095#1077#1085#1080#1103
183
        Caption = #1057#1094#1077#1085#1072#1088#1080#1081' '#1087#1086#1076#1082#1083#1102#1095#1077#1085#1080#1103
198
        Color = clMenuBar
184
        Color = clMenuBar
185
        FocusControl = mmScript
199
        ParentColor = False
186
        ParentColor = False
200
        Transparent = True
187
        Transparent = True
201
      end
188
      end
202
      object mmScript: TMemo
189
      object mmScript: TMemo
203
        Left = 3
190
        Left = 10
204
        Top = 94
191
        Top = 80
205
        Width = 422
192
        Width = 407
206
        Height = 115
193
        Height = 120
207
        Lines.Strings = (
194
        Lines.Strings = (
208
          '')
195
          '')
209
        ScrollBars = ssVertical
196
        ScrollBars = ssVertical
210
        TabOrder = 0
197
        TabOrder = 3
211
      end
198
      end
212
      object edUser: TRzEdit
199
      object edUser: TEdit
213
        Left = 112
200
        Left = 88
214
        Top = 48
201
        Top = 34
215
        Width = 115
202
        Width = 115
216
        Height = 21
203
        Height = 21
217
        TabOrder = 1
204
        TabOrder = 1
218
      end
205
      end
219
      object edPass: TRzMaskEdit
206
      object edPass: TEdit
220
        Left = 280
207
        Left = 278
221
        Top = 48
208
        Top = 34
222
        Width = 139
209
        Width = 139
223
        Height = 21
210
        Height = 21
224
        PasswordChar = #7
211
        PasswordChar = #7
225
        TabOrder = 2
212
        TabOrder = 2
226
      end
213
      end
227
      object edURL: TRzEdit
214
      object edURL: TEdit
228
        Left = 44
215
        Left = 44
229
        Top = 18
216
        Top = 7
230
        Width = 375
217
        Width = 373
231
        Height = 21
218
        Height = 21
232
        TabOrder = 3
219
        TabOrder = 0
233
      end
220
      end
234
    end
221
    end
235
  end
222
  end
236
  object RzPanel1: TRzPanel
223
  object pnButtons: TPanel
237
    AlignWithMargins = True
224
    Left = 0
238
    Left = 3
225
    Top = 240
239
    Top = 244
226
    Width = 438
240
    Width = 432
227
    Height = 41
241
    Height = 51
242
    Align = alBottom
228
    Align = alBottom
243
    BorderOuter = fsFlatRounded
229
    BevelOuter = bvNone
230
    Caption = 'pnButtons'
231
    ShowCaption = False
244
    TabOrder = 1
232
    TabOrder = 1
245
    ExplicitLeft = 8
233
    ExplicitLeft = 106
246
    ExplicitTop = 508
234
    ExplicitTop = 271
247
    ExplicitWidth = 701
235
    ExplicitWidth = 313
248
    DesignSize = (
236
    DesignSize = (
249
      430
237
      438
250
      49)
238
      41)
251
    object btnCancel: TButton
239
    object btnOk: TButton
252
      Left = 345
240
      Left = 274
253
      Top = 16
241
      Top = 10
254
      Width = 75
242
      Width = 75
255
      Height = 25
243
      Height = 25
256
      Anchors = [akTop, akRight]
244
      Anchors = [akTop, akRight]
257
      Cancel = True
245
      Caption = '&'#1057#1086#1093#1088#1072#1085#1080#1090#1100
258
      Caption = #1054#1090#1084#1077#1085#1072
246
      Default = True
259
      ModalResult = 2
247
      ModalResult = 1
260
      TabOrder = 0
248
      TabOrder = 0
261
      ExplicitLeft = 409
249
      OnClick = btnSaveClick
250
      ExplicitLeft = 149
262
    end
251
    end
263
    object btnSave: TButton
252
    object btnCancel: TButton
264
      Left = 253
253
      Left = 355
265
      Top = 16
254
      Top = 10
266
      Width = 75
255
      Width = 75
267
      Height = 25
256
      Height = 25
268
      Anchors = [akTop, akRight]
257
      Anchors = [akTop, akRight]
269
      Caption = #1057#1086#1093#1088#1072#1085#1080#1090#1100
258
      Cancel = True
270
      Default = True
259
      Caption = '&'#1054#1090#1084#1077#1085#1072
260
      ModalResult = 2
271
      TabOrder = 1
261
      TabOrder = 1
272
      OnClick = btnSaveClick
262
      ExplicitLeft = 230
273
      ExplicitLeft = 317
274
    end
263
    end
275
  end
264
  end
276
end
265
end

Updated trunk/Forms/frm_bases.pas Download diff

462463
1
(* *****************************************************************************
2
  *
3
  * MyHomeLib
4
  *
5
  * Copyright (C) 2008-2010 Aleksey Penkov
6
  *
7
  * Created             22.02.2010
8
  * Description            
9
  * Author(s)           Aleksey Penkov  alex.penkov@gmail.com
10
  *                     Nick Rymanov    nrymanov@gmail.com
11
  *
12
  ****************************************************************************** *)
1
13
2
{******************************************************************************}
14
{
3
{                                                                              }
15
TODO -oNickR : ,     . ,      
4
{                                 MyHomeLib                                    }
16
}
5
{                                                                              }
6
{                                Version 0.9                                   }
7
{                                20.08.2008                                    }
8
{                    Copyright (c) Aleksey Penkov  alex.penkov@gmail.com       }
9
{                                                                              }
10
{******************************************************************************}
11
17
12
unit frm_bases;
18
unit frm_bases;
13
19
...
...
27
  Mask,
33
  Mask,
28
  ExtCtrls,
34
  ExtCtrls,
29
  unit_StaticTip,
35
  unit_StaticTip,
30
  RzEdit,
36
  unit_AutoCompleteEdit,
31
  RzBtnEdt,
37
  ComCtrls;
32
  RzPanel,
33
  RzRadGrp, unit_AutoCompleteEdit, RzLabel, RzTabs;
34
38
35
type
39
type
36
  TfrmBases = class(TForm)
40
  TfrmBases = class(TForm)
37
    RzPageControl1: TRzPageControl;
41
    pcCollectionInfo: TPageControl;
38
    TabSheet1: TRzTabSheet;
42
    tsGeneralInfo: TTabSheet;
39
    TabSheet2: TRzTabSheet;
43
    tsConnectionInfo: TTabSheet;
40
    RzPanel1: TRzPanel;
41
    btnCancel: TButton;
42
    btnSave: TButton;
43
    cbRelativePath: TCheckBox;
44
    cbRelativePath: TCheckBox;
44
    MHLStaticTip1: TMHLStaticTip;
45
    MHLStaticTip1: TMHLStaticTip;
45
    edDescription: TRzEdit;
46
    edDescription: TEdit;
46
    Label1: TLabel;
47
    lblCollectionDescription: TLabel;
47
    Label5: TLabel;
48
    lblCollectionRoot: TLabel;
48
    edCollectionRoot: TMHLAutoCompleteEdit;
49
    edCollectionRoot: TMHLAutoCompleteEdit;
49
    edCollectionFile: TMHLAutoCompleteEdit;
50
    edCollectionFile: TMHLAutoCompleteEdit;
50
    edCollectionName: TEdit;
51
    edCollectionName: TEdit;
51
    Label9: TLabel;
52
    lblCollectionFile: TLabel;
52
    Label8: TLabel;
53
    lblCollectionName: TLabel;
53
    btnNewFile: TButton;
54
    btnNewFile: TButton;
54
    btnSelectRoot: TButton;
55
    btnSelectRoot: TButton;
55
    RzLabel5: TRzLabel;
56
    lblUser: TLabel;
56
    edUser: TRzEdit;
57
    edUser: TEdit;
57
    edPass: TRzMaskEdit;
58
    edPass: TEdit;
58
    RzLabel6: TRzLabel;
59
    lblPassword: TLabel;
59
    edURL: TRzEdit;
60
    edURL: TEdit;
60
    RzLabel1: TRzLabel;
61
    lblURL: TLabel;
61
    RzLabel2: TRzLabel;
62
    lblScript: TLabel;
62
    mmScript: TMemo;
63
    mmScript: TMemo;
64
    pnButtons: TPanel;
65
    btnOk: TButton;
66
    btnCancel: TButton;
67
63
    procedure FormShow(Sender: TObject);
68
    procedure FormShow(Sender: TObject);
64
    procedure edDBFileButtonClick(Sender: TObject);
69
    procedure edDBFileButtonClick(Sender: TObject);
65
    procedure edDBFolderButtonClick(Sender: TObject);
70
    procedure edDBFolderButtonClick(Sender: TObject);
...
...
112
  unit_Settings,
117
  unit_Settings,
113
  unit_Helpers,
118
  unit_Helpers,
114
  unit_Consts,
119
  unit_Consts,
115
  unit_Errors;
120
  unit_Errors,
121
  IOUtils;
116
122
117
{$R *.dfm}
123
{$R *.dfm}
118
124
...
...
128
  Pass := DMUser.ActiveCollection.Password;
134
  Pass := DMUser.ActiveCollection.Password;
129
  User := DMUser.ActiveCollection.User;
135
  User := DMUser.ActiveCollection.User;
130
  Script := DMUser.ActiveCollection.Script;
136
  Script := DMUser.ActiveCollection.Script;
131
132
end;
137
end;
133
138
134
function TfrmBases.GetDisplayName: string;
139
function TfrmBases.GetDisplayName: string;
...
...
136
  Result := Trim(edCollectionName.Text);
141
  Result := Trim(edCollectionName.Text);
137
end;
142
end;
138
143
139
function TfrmBases.GetPass: string;
144
procedure TfrmBases.SetDisplayName(const Value: string);
140
begin
145
begin
141
  Result := edPass.Text;
146
  edCollectionName.Text := Value;
142
end;
147
end;
143
148
144
procedure TfrmBases.SetDisplayName(const Value: string);
149
function TfrmBases.GetPass: string;
145
begin
150
begin
146
  edCollectionName.Text := Value;
151
  Result := edPass.Text;
147
end;
152
end;
148
153
149
procedure TfrmBases.SetPass(const Value: string);
154
procedure TfrmBases.SetPass(const Value: string);
...
...
161
  Result := Trim(edDescription.Text);
166
  Result := Trim(edDescription.Text);
162
end;
167
end;
163
168
164
procedure TfrmBases.SetDBFileName(const Value: string);
169
procedure TfrmBases.SetDescription(const Value: string);
165
begin
170
begin
166
  edCollectionFile.Text := Value;
171
  edDescription.Text := Value;
167
end;
172
end;
168
173
169
procedure TfrmBases.SetDescription(const Value: string);
174
procedure TfrmBases.SetDBFileName(const Value: string);
170
begin
175
begin
171
  edDescription.Text := Value;
176
  edCollectionFile.Text := Value;
172
end;
177
end;
173
178
174
function TfrmBases.GetRootFolder: string;
179
function TfrmBases.GetRootFolder: string;
...
...
176
  Result := Trim(edCollectionRoot.Text);
181
  Result := Trim(edCollectionRoot.Text);
177
end;
182
end;
178
183
179
function TfrmBases.GetScript: string;
184
procedure TfrmBases.SetRootFolder(const Value: string);
180
begin
185
begin
181
  Result := mmScript.Lines.Text;
186
  edCollectionRoot.Text := Value;
182
end;
187
end;
183
188
184
function TfrmBases.GetURL: string;
189
function TfrmBases.GetScript: string;
185
begin
190
begin
186
  Result := edURL.Text;
191
  Result := mmScript.Lines.Text;
187
end;
192
end;
188
193
189
function TfrmBases.GetUser: string;
194
procedure TfrmBases.SetScript(const Value: string);
190
begin
195
begin
191
  Result := edUser.Text;
196
  mmScript.Lines.Clear;
197
  mmscript.Lines.Text := Value;
192
end;
198
end;
193
199
194
procedure TfrmBases.SetRootFolder(const Value: string);
200
function TfrmBases.GetURL: string;
195
begin
201
begin
196
  edCollectionRoot.Text := Value;
202
  Result := edURL.Text;
197
end;
203
end;
198
204
199
procedure TfrmBases.SetScript(const Value: string);
205
procedure TfrmBases.SetURL(const Value: string);
200
begin
206
begin
201
  mmScript.Lines.Clear;
207
  edURL.Text := Value;
202
  mmscript.Lines.Text := Value;
203
end;
208
end;
204
209
205
procedure TfrmBases.SetURL(const Value: string);
210
function TfrmBases.GetUser: string;
206
begin
211
begin
207
  edURL.Text := Value;
212
  Result := edUser.Text;
208
end;
213
end;
209
214
210
procedure TfrmBases.SetUser(const Value: string);
215
procedure TfrmBases.SetUser(const Value: string);
...
...
216
var
221
var
217
  AFileName: string;
222
  AFileName: string;
218
begin
223
begin
224
  { TODO -oNickR -cBug :   ,        }
219
  if GetFileName(fnOpenCollection, AFileName) then
225
  if GetFileName(fnOpenCollection, AFileName) then
220
    edCollectionFile.Text := AFileName;
226
    edCollectionFile.Text := AFileName;
221
end;
227
end;
...
...
233
  ADBFileName: string;
239
  ADBFileName: string;
234
  ARootFolder: string;
240
  ARootFolder: string;
235
begin
241
begin
236
237
  if (DisplayName = '') or (DBFileName = '') or (RootFolder = '') then
242
  if (DisplayName = '') or (DBFileName = '') or (RootFolder = '') then
238
  begin
243
  begin
239
    MessageDlg(rstrAllFieldsShouldBeFilled, mtError, [mbOk], 0);
244
    MessageDlg(rstrAllFieldsShouldBeFilled, mtError, [mbOk], 0);
...
...
265
    ADBFileName := DBFileName;
270
    ADBFileName := DBFileName;
266
    if '' = ExtractFileExt(ADBFileName) then
271
    if '' = ExtractFileExt(ADBFileName) then
267
      ADBFileName := ChangeFileExt(ADBFileName, COLLECTION_EXTENSION);
272
      ADBFileName := ChangeFileExt(ADBFileName, COLLECTION_EXTENSION);
273
268
    ARootFolder := ExcludeTrailingPathDelimiter(RootFolder);
274
    ARootFolder := ExcludeTrailingPathDelimiter(RootFolder);
269
  end;
275
  end;
270
276

Updated trunk/Forms/frm_main.pas Download diff

462463
6404
6404
6405
  frmBases := TfrmBases.Create(Application);
6405
  frmBases := TfrmBases.Create(Application);
6406
  try
6406
  try
6407
    frmBases.TabSheet2.TabVisible := isOnline;
6407
    frmBases.tsConnectionInfo.TabVisible := isOnline;
6408
    if frmBases.ShowModal = mrOk then
6408
    if frmBases.ShowModal = mrOk then
6409
    begin
6409
    begin
6410
      Assert(Settings.ActiveCollection = DMUser.ActiveCollection.ID);
6410
      Assert(Settings.ActiveCollection = DMUser.ActiveCollection.ID);

Updated trunk/Units/unit_Globals.pas Download diff

462463
156
156
157
procedure SetProxySettings(var IdHTTP: TidHTTP);
157
procedure SetProxySettings(var IdHTTP: TidHTTP);
158
158
159
function c_GetTempPath: string;
159
//function c_GetTempPath: string;
160
function GetSpecialPath(CSIDL: word): string;
160
function GetSpecialPath(CSIDL: word): string;
161
function GetLibUpdateVersion(Full: Boolean): Integer;
161
function GetLibUpdateVersion(Full: Boolean): Integer;
162
function ExecAndWait(const FileName, Params: string; const WinState: word): Boolean;
162
function ExecAndWait(const FileName, Params: string; const WinState: word): Boolean;
...
...
808
{$ENDIF}
808
{$ENDIF}
809
end;
809
end;
810
810
811
{
811
function c_GetTempPath: string;
812
function c_GetTempPath: string;
812
var
813
var
813
  Buffer: array [0 .. 65536] of Char;
814
  Buffer: array [0 .. 65536] of Char;
814
begin
815
begin
815
  SetString(Result, Buffer, GetTempPath(Sizeof(Buffer) - 1, Buffer));
816
  SetString(Result, Buffer, GetTempPath(Sizeof(Buffer) - 1, Buffer));
816
end;
817
end;
818
}
817
819
818
function GetSpecialPath(CSIDL: word): string;
820
function GetSpecialPath(CSIDL: word): string;
819
var
821
var

Updated trunk/Units/unit_Settings.pas Download diff

462463
383
  unit_Consts,
383
  unit_Consts,
384
  ShlObj,
384
  ShlObj,
385
  ShellAPI,
385
  ShellAPI,
386
  IOUtils,
386
  unit_Helpers;
387
  unit_Helpers;
387
388
388
var
389
var
...
...
468
  for I := 1 to ParamCount do
469
  for I := 1 to ParamCount do
469
  begin
470
  begin
470
    if not UseLocalData then
471
    if not UseLocalData then
471
      UseLocalData := (LowerCase(paramstr(I)) = STR_USELOCALDATA);
472
      UseLocalData := (LowerCase(ParamStr(I)) = STR_USELOCALDATA);
472
    if not UseLocalTemp then
473
    if not UseLocalTemp then
473
      UseLocalTemp := (LowerCase(paramstr(I)) = STR_USELOCALTEMP);
474
      UseLocalTemp := (LowerCase(paramstr(I)) = STR_USELOCALTEMP);
474
    if (LowerCase(paramstr(I)) = STR_USERDBS) and (paramstr(I + 1) <> '') then
475
    if (LowerCase(ParamStr(I)) = STR_USERDBS) and (ParamStr(I + 1) <> '') then
475
    begin
476
    begin
476
      DBFileName := paramstr(I + 1);
477
      DBFileName := ParamStr(I + 1);
477
      UserDatabase := True;
478
      UserDatabase := True;
478
    end;
479
    end;
479
  end;
480
  end;
...
...
506
  //   
507
  //   
507
508
508
  if not UseLocalTemp then
509
  if not UseLocalTemp then
509
    FTempDir := c_GetTempPath + '_myhomelib'
510
    FTempDir := TPath.Combine(TPath.GetTempPath, '_myhomelib')
510
  else
511
  else
511
    FTempDir := FAppPath + TEMP_DIR_NAME;
512
    FTempDir := FAppPath + TEMP_DIR_NAME;
512
513
...
...
942
      else
943
      else
943
      begin
944
      begin
944
        //    
945
        //    
945
        FUpdateList.Add('Lib.rus.ec [FB2]', '', 'last_librusec.info', 'librusec_update.zip', True, CT_LIBRUSEC_LOCAL_FB);
946
        FUpdateList.Add('Lib.rus.ec [FB2]',        '', 'last_librusec.info',       'librusec_update.zip',       True,  CT_LIBRUSEC_LOCAL_FB);
946
        FUpdateList.Add('Lib.rus.ec [FB2]', '', '', 'daily_update.zip', False, CT_LIBRUSEC_LOCAL_FB);
947
        FUpdateList.Add('Lib.rus.ec [FB2]',        '', '',                         'daily_update.zip',          False, CT_LIBRUSEC_LOCAL_FB);
947
        FUpdateList.Add('Lib.rus.ec OnLine [FB2]', '', 'last_librusec.info', 'librusec_update.zip', True, CT_LIBRUSEC_ONLINE_FB);
948
        FUpdateList.Add('Lib.rus.ec OnLine [FB2]', '', 'last_librusec.info',       'librusec_update.zip',       True,  CT_LIBRUSEC_ONLINE_FB);
948
        FUpdateList.Add('Lib.rus.ec OnLine [FB2]', '', 'last_extra.info', 'extra_update.zip', False, CT_LIBRUSEC_ONLINE_FB);
949
        FUpdateList.Add('Lib.rus.ec OnLine [FB2]', '', 'last_extra.info',          'extra_update.zip',          False, CT_LIBRUSEC_ONLINE_FB);
949
        FUpdateList.Add('Lib.rus.ec [USR]', '', 'last_usr.info', 'usr_update.zip', True, CT_LIBRUSEC_USR);
950
        FUpdateList.Add('Lib.rus.ec [USR]',        '', 'last_usr.info',            'usr_update.zip',            True,  CT_LIBRUSEC_USR);
950
        FUpdateList.Add('Flibusta OnLine [FB2]', '', 'last_flibusta.info', 'flubusta_update.zip', True, CT_LIBRUSEC_ONLINE_FB);
951
        FUpdateList.Add('Flibusta OnLine [FB2]',   '', 'last_flibusta.info',       'flubusta_update.zip',       True,  CT_LIBRUSEC_ONLINE_FB);
951
        FUpdateList.Add('Flibusta OnLine [FB2]', '', 'last_flibusta_extra.info', 'flibusta_extra_update.zip', False, CT_LIBRUSEC_ONLINE_FB);
952
        FUpdateList.Add('Flibusta OnLine [FB2]',   '', 'last_flibusta_extra.info', 'flibusta_extra_update.zip', False, CT_LIBRUSEC_ONLINE_FB);
952
      end;
953
      end;
953
    finally
954
    finally
954
      sl.Free;
955
      sl.Free;