/// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public async Task OpenChatAudioChannelAsync(AudioFormat audioFormat)
        {
            if (!ProtocolInitialized)
            {
                throw new NanoException("Protocol is not initialized");
            }

            await ChatAudio.OpenAsync(audioFormat);
        }
示例#2
0
    public Chat(IMessagesBox messageBox, ChatIcon icon, ChatAudio audio, string name)
    {
        m_history   = DataManager.LoadHistory(name);
        m_chatState = m_history.GetState();

        m_name    = name;
        m_replics = new ReplicaController(m_name);

        m_messageBox = messageBox;
        m_messageBox.LoadFromHistory(m_history);
        m_messageBox.AddPlayerTurnEvent(SetState);

        m_icon = icon;
        m_icon.onClickEvent += Activate;
        m_icon.InitChat(m_name);
        m_icon.SetVisible(true);

        m_audio = audio;

        InitUsers();
    }