Beispiel #1
0
 private void UpdProgress(object sender, UpdEventArgs e)
 {
     this.pbAll.Maximum = e.MaxProgress;
     this.pbAll.Value   = e.Progress;
     if (!string.IsNullOrEmpty(e.Msg) && this.tbLog.Text.IndexOf(e.Msg) < 0)
     {
         this.tbLog.AppendText(e.Msg + "\r\n");
     }
     this.lblDeleted.Text = strings.Deleted.f(ExMethods.getSizeReadable(e.CleanSize), e.DeletedCount);
 }
Beispiel #2
0
        private void WorkAnalys()
        {
            Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(this.Locale);
            Cleaner cln = new Cleaner(this.tbTorrentsPath.Text, this.tbResumePath.Text);

            cln.UpdEvent += this.UpdProgress;
            int  deletedCount;
            long cleanSize;

            cln.Analys(out deletedCount, out cleanSize);
            string infoString = strings.AnalysDone.f(deletedCount, ExMethods.getSizeReadable(cleanSize));

            MessageBox.Show(infoString, strings.Information, MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.btnStart.Enabled  = true;
            this.btnAnalys.Enabled = true;
            this.tbLog.AppendText(infoString);
        }