Exemple #1
0
        private void RefreshPreview()
        {
            if (_runGiveAway != null && !_runGiveAway.IsDisposed)
            {
                _runGiveAway.Close();
            }

            SetOptionsToValues();
            GiveawayOptions.PreviewOptions = _options;

            _runGiveAway = new RunGiveaway(DateTime.MinValue, "_preview", "Demo Giveaway", "keyword");
            _runGiveAway.Show();
            Focus();
        }
Exemple #2
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            _startTime = DateTime.Now;

            if (_giveaway == null)
            {
                var gv = new RunGiveaway(_startTime, _options[List.SelectedIndex].Name, GiveawayTitle.Text, GiveawayKeyword.Text);
                gv.Show();
                gv.FormClosed     += Giveaway_FormClosed;
                _giveaway          = gv;
                StartButton.Text   = @"Stop Giveaway";
                RollButton.Enabled = true;
                InfoLabel.Text     = @"Started @ " + _startTime.ToString("h:mm t");
            }
            else
            {
                _giveaway.Close();
                RollButton.Enabled = false;
            }
        }
Exemple #3
0
 private void Giveaway_FormClosed(object sender, FormClosedEventArgs e)
 {
     _giveaway        = null;
     StartButton.Text = @"Start Giveaway";
     InfoLabel.Text   = @"Stopped";
 }