Exemple #1
0
        public Form1()
        {
            InitializeComponent();

            asr = new ucAsr()
            {
                Dock = DockStyle.Fill
            };
            tabPage1.Controls.Add(asr);
            mt = new ucMt()
            {
                Dock = DockStyle.Fill
            };
            tabPage2.Controls.Add(mt);
            ucTts tts = new ucTts()
            {
                Dock = DockStyle.Fill
            };

            tabPage3.Controls.Add(tts);


            IAsr _asr = AsrProxy.AsrFun.GetAsr();

            _asr.OnInitialized += _asr_OnInitialized;
            _asr.Initialize();
        }
Exemple #2
0
        public Form1()
        {
            InitializeComponent();

            // 实例化客户端
            _client = new AsrClient("127.0.0.1", 8888);
            _client.OnInitialized += _asr_OnConnected;

            asr = new ucAsrClient(_client)
            {
                Dock = DockStyle.Fill
            };
            tabPage1.Controls.Add(asr);
            mt = new ucMt(_client)
            {
                Dock = DockStyle.Fill
            };
            tabPage2.Controls.Add(mt);

            // 建立连接
            _client.ConnectAsync();
        }