示例#1
0
文件: Program.cs 项目: NadirTP/tpGit
        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); }
        }