Example #1
0
        //Načtení anime
        private void LoadAnime()
        {
            Main_LB01.Visible = true;
            AnimeS.Columns.Clear();
            AnimeS.Rows.Clear();
            AnimeID.Clear();

            AnimeS.Width    = Convert.ToInt32(Math.Truncate((float)this.Width / 250) * 250);
            AnimeS.Height   = 240;
            AnimeS.Location = new Point((this.Width - AnimeS.Width) / 2, AnimeS.Location.Y);

            Anime.Location = new Point((this.Width - Anime.Width) / 2, AnimeS.Location.Y + AnimeS.Height + 20);

            AnimeS.Columns.Add(new DataGridViewImageColumn());
            AnimeS.Rows.Add();
            AnimeS.Rows[0].Height = 230;

            AnimeS.Rows.Add();
            AnimeS.Rows[1].Height = 5;

            AnimeS.Rows[1].DefaultCellStyle.SelectionBackColor = DesignColor;
            AnimeS.Rows[1].DefaultCellStyle.SelectionForeColor = DesignColor;

            if (BW.IsBusy)
            {
                BW.CancelAsync();
                Thread.Sleep(3000);
            }

            BW.RunWorkerAsync();
        }
Example #2
0
 private void Cancel_Click(object sender, EventArgs e)
 {
     //отмена фоновой операции
     BW.CancelAsync();
 }