public void btn_AddInstaller() { try { LogHelper.WriteToLog($"{SelectedAvailableInstaller.Filename} was added to the List for installation", LogState.Info); PickedInstallerList.Add(SelectedAvailableInstaller); AvailableFiles.Remove(SelectedAvailableInstaller); btn_InstallIsVisible = CheckList(PickedInstallerList); btn_AddInstallerIsVisible = CheckList(AvailableFiles); btn_AddAllInstallerIsVisible = CheckList(AvailableFiles); btn_RemoveInstallerIsVisible = CheckList(PickedInstallerList); btn_RemoveAllInstallerIsVisible = CheckList(PickedInstallerList); } catch (Exception e) { LogHelper.WriteToLog(e.Message + "\r\n" + e.StackTrace, LogState.Error); } }
public void btn_AddAllInstaller() { try { foreach (Installer installer in AvailableFiles) { PickedInstallerList.Add(installer); LogHelper.WriteToLog($"{installer.Filename} added to the List for installation", LogState.Info); } AvailableFiles.Clear(); btn_InstallIsVisible = CheckList(PickedInstallerList); btn_AddInstallerIsVisible = CheckList(AvailableFiles); btn_AddAllInstallerIsVisible = CheckList(AvailableFiles); btn_RemoveInstallerIsVisible = CheckList(PickedInstallerList); btn_RemoveAllInstallerIsVisible = CheckList(PickedInstallerList); NotifyOfPropertyChange(() => Canbtn_RemoveAllInstaller); } catch (Exception e) { LogHelper.WriteToLog(e.Message + "\r\n" + e.StackTrace, LogState.Error); } }