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(); }
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; } }