示例#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
文件: Form1.cs 项目: txchen/LukcyDraw
        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
文件: Form1.cs 项目: txchen/LukcyDraw
 private void btnReset_Click(object sender, EventArgs e)
 {
     LuckyCore.Reset();
     UpdateStatistics();
 }