CSL_Test__1.MainWindow.ProcessTorrentsButton_Click C# (CSharp) Method

ProcessTorrentsButton_Click() private method

private ProcessTorrentsButton_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void ProcessTorrentsButton_Click(object sender, EventArgs e)
        {
            lock (lockingobject)
            {
                al = new ArrayList();
                torrents = DirectoryHandler.GetTorrents();
                zips = DirectoryHandler.GetTorrentZips();

                if (torrents != null || zips != null)
                {
                    if (torrents != null)
                    {
                        foreach (string torrent in torrents)
                            al.Add(torrent);
                    }

                    if (zips != null)
                    {
                        object[] rawFiles = DirectoryHandler.UnzipFiles(zips);
                        string[] ziptorrents = Array.ConvertAll<object, string>(rawFiles, Convert.ToString);
                        foreach (string ziptorrent in ziptorrents)
                            al.Add(ziptorrent);
                    }

                    timer.Stop();
                    dataGridViewProgressBar.Visible = true;
                    StatusLabel.Visible = true;
                    tb.RunWorkerAsync(al);
                }
            }
        }