Example #1
0
 function onBackupCompany($event)
 {
     $fileDialog = new \wxFileDialog($this, _("Backup to output file"), "", "", "Xiaris Company File|*.xia", wxFD_SAVE);
     if ($fileDialog->ShowModal() != wxID_CANCEL) {
         $path = str_ireplace(".xia", "", $fileDialog->GetPath());
         $fileDialog->Destroy();
         $path .= ".xia";
         if (file_exists($path)) {
             if (wxMessageBox(_("The file already exists. Do you want to overwrite it?"), _("Warning!"), wxYES_NO) != wxYES) {
                 print "test";
                 return;
             }
         }
         copy($this->company->GetFilePath(), $path);
     }
 }