• R/O
  • SSH
  • HTTPS

clxbackup: Commit


Commit MetaInfo

Revision4 (tree)
Zeit2015-06-17 21:35:16
Autoryamat0jp

Log Message

ドライブの拡張、ディレクトリの新規作成に対応、未設定時のエラー防止

Ändern Zusammenfassung

Diff

--- trunk/Unit1.pas (revision 3)
+++ trunk/Unit1.pas (revision 4)
@@ -33,6 +33,8 @@
3333 Button4: TButton;
3434 OpenTextFileDialog1: TOpenTextFileDialog;
3535 CheckBox1: TCheckBox;
36+ DriveComboBox1: TDriveComboBox;
37+ Panel1: TPanel;
3638 procedure CloseButtonClick(Sender: TObject);
3739 procedure Action1Execute(Sender: TObject);
3840 procedure FormResize(Sender: TObject);
@@ -102,10 +104,13 @@
102104 var
103105 s1, s2, s3: string;
104106 z: TZipFile;
107+ x: Boolean;
105108 begin
106109 s3 := '';
107- Preview(Edit1.Text + '\' + ComboBox1.Text);
108- if Sender = Button2 then
110+ x := Copy(Label1.Caption,1,10) <> 'Click here';
111+ if (Sender = Button1)or(x = true) then
112+ Preview(Edit1.Text + '\' + ComboBox1.Text);
113+ if (Sender = Button2)and(x = true) then
109114 begin
110115 z := TZipFile.Create;
111116 try
@@ -179,7 +184,7 @@
179184 if (t = DirectoryListBox1.Directory) and (i < DirectoryListBox1.ItemIndex)
180185 then
181186 begin
182- if i < 2 then
187+ if i < 1 then
183188 begin
184189 t := t + DirectoryListBox1.Items[DirectoryListBox1.ItemIndex];
185190 end
@@ -275,9 +280,9 @@
275280
276281 procedure TForm1.Label1Click(Sender: TObject);
277282 begin
278- if (System.SysUtils.DirectoryExists(Edit1.Text) = True) and
279- (MessageDlg('Change Save-Dir?', mtInformation, [mbOK, mbCancel], 0) = mrOK)
280- then
283+ if System.SysUtils.DirectoryExists(Edit1.Text) = false then
284+ MkDir(Edit1.Text);
285+ if MessageDlg('Change Save-Dir?', mtInformation, [mbOK, mbCancel], 0) = mrOK then
281286 Label1.Caption := Edit1.Text;
282287 end;
283288
Show on old repository browser