Пример #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     LuckyCore.NextRand();
     luckyPictureBox.Image = new Bitmap(LuckyCore.CurrentPicThumb);
     luckyPictureBox.Show();
     this.Text = Title + LuckyCore.CurrentPicUrl;
 }
Пример #2
0
        private void PrepareForStart()
        {
            this.Text = Title + "Preloading thumbnails";
            btnChooseFolder.Enabled = false;
            Thread th = new Thread(() =>
            {
                LuckyCore.LoadAndStart(_pictures, _config.ThumbnailWidth, _config.ThumbnailHeight);
                this.Invoke(new MethodInvoker(() =>
                {
                    btnChooseFolder.Enabled = true;
                    btnStart.Enabled        = true;
                    UpdateStatistics();
                }));
            });

            th.Start();
        }
Пример #3
0
 private void KeyEntered()
 {
     if (_status == Status.Flashing)
     {
         // stop and celebrate
         _status = Status.Celebrating;
         timer1.Stop();
         // show full picture
         luckyPictureBox.Load(LuckyCore.CurrentPicUrl);
         LuckyCore.Celebrate();
     }
     else
     {
         // start drawing
         _status = Status.Flashing;
         timer1.Start();
     }
 }
Пример #4
0
 private void btnReset_Click(object sender, EventArgs e)
 {
     LuckyCore.Reset();
     UpdateStatistics();
 }