Exemplo n.º 1
0
        private void OnData(AMCPParserEventArgs e)
        {
            if (e.Error == AMCPError.FileNotFound)
            {
                device_.OnDataRetrieved(string.Empty);
                return;
            }

            if (e.Subcommand == "RETRIEVE")
            {
                if (e.Error == AMCPError.None && e.Data.Count > 0)
                {
                    device_.OnDataRetrieved(e.Data[0]);
                }
                else
                {
                    device_.OnDataRetrieved(string.Empty);
                }
            }
            else if (e.Subcommand == "LIST")
            {
                device_.OnUpdatedDataList(e.Data);
            }
        }