Esempio n. 1
0
        static void Main(string[] args)
        {
            LoadPara(args);

            while (true)
            {
                var key = Console.ReadKey();

                if (key.Key == ConsoleKey.C)
                {
                    Logger.Info.WriteLine();
                    Logger.Info.WriteLine("Close?");

                    var k = Console.ReadKey();

                    if (k.Key == ConsoleKey.Y)
                    {
                        foreach (var rec in _recivers)
                        {
                            rec.Stop();
                        }

                        _core.WriteComplete();
                        Logger.Info.WriteLine("Record Completed!");

                        return;
                    }
                    else
                    {
                        // 换行
                        Logger.Info.WriteLine();
                    }
                }
            }
        }
Esempio n. 2
0
        private void Recorder_Stop()
        {
            if (_recivers != null)
            {
                foreach (var reciver in _recivers)
                {
                    reciver.Stop();
                }
            }

            _recorder?.WriteComplete();
            _recorder = null;
        }