public void MediaArchiveSelected() { if (String.IsNullOrWhiteSpace(Conf.Archive)) { MessageBox.Show(this, LocRm.GetString("SpecifyArchiveLocation")); ShowSettings(2); } if (!String.IsNullOrWhiteSpace(Conf.Archive)) { int j = 0; lock (ThreadLock) { for (int i = 0; i < flowPreview.Controls.Count; i++) { var pb = flowPreview.Controls[i] as PreviewBox; if (pb != null && pb.Selected) { Helper.ArchiveFile(pb.FileName); j++; } } } if (j > 0) { MessageBox.Show(this, LocRm.GetString("MediaArchivedTo") + Environment.NewLine + Conf.Archive); } } }
public void MediaArchiveSelected() { if (String.IsNullOrWhiteSpace(Conf.ArchiveNew)) { MessageBox.Show(this, LocRm.GetString("SpecifyArchiveLocation")); ShowSettings(2); } if (!String.IsNullOrWhiteSpace(Conf.ArchiveNew)) { int j = 0; string msg = ""; lock (ThreadLock) { for (int i = 0; i < flowPreview.Controls.Count; i++) { if (flowPreview.Controls[i] is PreviewBox pb && pb.Selected) { msg = Helper.ArchiveFile(pb.Control, pb.FileName); j++; } } } if (j > 0 && msg != "NOK") { MessageBox.Show(this, LocRm.GetString("MediaArchivedTo") + Environment.NewLine + msg); } } }