public void Add(CopyJobProvider cjp) { if (cjp != null) jobs.AddRange(cjp.jobs); }
private void updateCopySize() { if (copyJob == null) { copyJob = new CopyJobProvider(ref pb_number); } else copyJob.reset(); #region Main program // Gets the total size of all copyjobs and fill copyJob with the jobs if (isButtonPressed(b_main)) { //Check for main installer //Windows if (isButtonPressed(b_windows)) { copyJob.Add(files[getProgramsIndex(Programs.WINMAIN)], SUBDIRWIN); } // Linux DEB x86 if (isButtonPressed(b_linux_deb_x86)) { copyJob.Add(files[getProgramsIndex(Programs.DEBMAIN32)], SUBDIRLIN); } // Linux DEB x86_64 if (isButtonPressed(b_linux_deb_x86_64)) { copyJob.Add(files[getProgramsIndex(Programs.DEBMAIN64)], SUBDIRLIN); } // Linux RPM x86 if (isButtonPressed(b_linux_rpm_x86)) { copyJob.Add(files[getProgramsIndex(Programs.RPMMAIN32)], SUBDIRLIN); } // Linux RPM x86_64 if (isButtonPressed(b_linux_rpm_x86_64)) { copyJob.Add(files[getProgramsIndex(Programs.RPMMAIN64)], SUBDIRLIN); } // MacOS x86 if (isButtonPressed(b_macos_x86)) { copyJob.Add(files[getProgramsIndex(Programs.MACMAIN32)], SUBDIRMAC); } // MacOS x86_64 if (isButtonPressed(b_macos_x86_64)) { copyJob.Add(files[getProgramsIndex(Programs.MACMAIN64)], SUBDIRMAC); } } #endregion #region Helppack (and) Langpack (if not included in Main or helppack) // Help and OR langpack if (isButtonPressed(b_help)) { //Check for help and langpack //Windows if (isButtonPressed(b_windows)) { if (isNative()) copyJob.Add(files[getProgramsIndex(Programs.WINHELPDE)], SUBDIRWIN); else copyJob.Add(files[getProgramsIndex(Programs.WINHELPEN)], SUBDIRWIN); } // Linux DEB x86 if (isButtonPressed(b_linux_deb_x86)) { //Also include translation of the UI if (isNative()) { copyJob.Add(files[getProgramsIndex(Programs.DEBLANGDE32)], SUBDIRLIN); copyJob.Add(files[getProgramsIndex(Programs.DEBHELPDE32)], SUBDIRLIN); } else copyJob.Add(files[getProgramsIndex(Programs.DEBHELPEN32)], SUBDIRLIN); } // Linux DEB x86_64 if (isButtonPressed(b_linux_deb_x86_64)) { //Also include translation of the UI if (isNative()) { copyJob.Add(files[getProgramsIndex(Programs.DEBLANGDE64)], SUBDIRLIN); copyJob.Add(files[getProgramsIndex(Programs.DEBHELPDE64)], SUBDIRLIN); } else copyJob.Add(files[getProgramsIndex(Programs.DEBHELPEN64)], SUBDIRLIN); } // Linux RPM x86 if (isButtonPressed(b_linux_rpm_x86)) { //Also include translation of the UI if (isNative()) { copyJob.Add(files[getProgramsIndex(Programs.RPMLANGDE32)], SUBDIRLIN); copyJob.Add(files[getProgramsIndex(Programs.RPMHELPDE32)], SUBDIRLIN); } else copyJob.Add(files[getProgramsIndex(Programs.RPMHELPEN32)], SUBDIRLIN); } // Linux RPM x86_64 if (isButtonPressed(b_linux_rpm_x86_64)) { //Also include translation of the UI if (isNative()) { copyJob.Add(files[getProgramsIndex(Programs.RPMHELPDE64)], SUBDIRLIN); copyJob.Add(files[getProgramsIndex(Programs.RPMLANGDE64)], SUBDIRLIN); } else copyJob.Add(files[getProgramsIndex(Programs.RPMHELPEN64)], SUBDIRLIN); } // MacOS x86 if (isButtonPressed(b_macos_x86)) { if (isNative()) copyJob.Add(files[getProgramsIndex(Programs.MACHELPDE32)], SUBDIRMAC); else copyJob.Add(files[getProgramsIndex(Programs.MACHELPEN32)], SUBDIRMAC); } // MacOS x86_64 if (isButtonPressed(b_macos_x86_64)) { if (isNative()) copyJob.Add(files[getProgramsIndex(Programs.MACHELPDE64)], SUBDIRMAC); else copyJob.Add(files[getProgramsIndex(Programs.MACHELPEN64)], SUBDIRMAC); } } #endregion if (updateProgressbar(copyJob.getSize())) { b_start.BackColor = light; b_start.ForeColor = black; } else { b_start.BackColor = red; b_start.ForeColor = white; } }