Ejemplo n.º 1
0
 private void buttonAdv1_Click(object sender, EventArgs e)
 {
     if ((_allMarkets?.GetStatus() != null))
     {
         _allMarkets.StopThreads();
     }
     _allMarkets?.StartThreads();
     if ((_allMarkets?.GetStatus() != null))
     {
         treeViewAdv1_NodeMouseClick(null, e_prev);
     }
 }
Ejemplo n.º 2
0
        private void Start()
        {
            try
            {
                while (true)
                {
                    if (isStop)
                    {
                        return;
                    }
                    var elem = _allMarkets.GetStatus();
                    if (elem == null)
                    {
                        Thread.Sleep(1000);
                        continue;
                    }
                    label11.Invoke(new Action(() => { label11.Text = Closed.Nodes.Count.ToString(); }));
                    textBoxExt5.Invoke(new Action(() => { getStateThread(elem); }));
                    if ((elem?.State365 == ThreadState.Stopped) && (elem?.StateBetfair == ThreadState.Stopped) && (elem.StateSky == ThreadState.Stopped))
                    {
                        radioButtonAdv1.Invoke(new Action(() =>
                        {
                            var parse = e_prev.Node.Text.Split(':');

                            if (parse.Count() < 2)
                            {
                                Thread.Sleep(1000);
                                return;
                            }
                            radioButtonAdv1.Text     = parse[0].Trim();
                            radioButtonAdv2.Text     = parse[1].Trim();
                            textBoxExt7.Text         = parse[0].Trim();
                            textBoxExt8.Text         = parse[1].Trim();
                            digitalGauge1.Value      = "Finished";
                            textBoxStatus.Text       = "Finished";
                            textBoxStatus.BackColor  = Color.Tomato;
                            textBoxScoreBetfair.Text = "END";
                            textBoxScoreBet365.Text  = "END";
                        }));
                    }
                    Thread.Sleep(1000);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
        }