Пример #1
0
        static async void Stop()
        {
            try
            {
                if (dataGenerator.IsRunning)
                {
                    rpsTimer.Stop();
                    await dataGenerator.StopAsync();

                    dataGenerator.RpsReset();
                }
            }
            catch (Exception exception) { HandleException(exception); }
        }
        static async void Stop()
        {
            try
            {
                if (dataGenerator.IsRunning)
                {
                    if (enableShock == 1)
                    {
                        mainTimer.Stop();
                    }
                    rpsTimer.Stop();
                    if (enableShock == 1)
                    {
                        shockTimer.Stop();
                    }

                    await dataGenerator.StopAsync();

                    dataGenerator.RpsReset();
                }
            }
            catch (Exception exception) { HandleException(exception); }
        }