private void ButtonTradingClick(object sender, EventArgs e) { if (!buttonTrading.ForeColor.Equals(Color.DarkRed)) { buttonTrading.ForeColor = Color.DarkRed; buttonTrading.Text = "Trading."; SendClose?.Invoke(this, new DialogClose(numericHedge.Value, sender, numericShortDay.Value, numericShortTick.Value, numericLongDay.Value, numericLongTick.Value, numericReaction.Value)); } }
private void TimerTick(object sender, EventArgs e) { timer.Interval = 347365; if (!buttonTrading.ForeColor.Equals(Color.DarkRed) && TimerBox.Show("Click 'No' to Edit the Automatically generated Strategy.\n\nIf No Selection is made for 20 Seconds,\nTrading Starts with an Automatically Generated Strategy.", "Notice", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, 21753).Equals((DialogResult)6)) { buttonTrading.ForeColor = Color.DarkRed; buttonTrading.Text = "Trading."; timer.Stop(); timer.Dispose(); SendClose?.Invoke(this, new DialogClose(numericHedge.Value, numericShortDay.Value, numericShortTick.Value, numericLongDay.Value, numericLongTick.Value, numericReaction.Value)); } }
private void ButtonClick(object sender, EventArgs e) { if (sender is Button start && button.Text.Equals("Start Trading") && !button.ForeColor.Equals(Color.Maroon)) { var temp = Enum.GetValues(typeof(IRecall.NumericRecall)); int[] strategy = new int[temp.Length]; foreach (var name in temp) { strategy[(int)name] = (int)name.ToString().FindByName <NumericUpDown>(this).Value; } start.ForeColor = Color.Maroon; start.Text = GetCurrentStatus(button.ForeColor); SendClose?.Invoke(this, new DialogClose(strategy)); } }
private void ButtonClick(object sender, EventArgs e) { arr = sender.ToString().Split(':'); SendClose?.Invoke(this, new DialogClose(arr[1].Split(' '))); }