ArchiveFile() 정적인 개인적인 메소드

static private ArchiveFile ( string filename ) : bool
filename string
리턴 bool
예제 #1
0
 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);
         }
     }
 }
예제 #2
0
 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);
         }
     }
 }