예제 #1
0
파일: Device.cs 프로젝트: xuan2261/madb
        /// <summary>
        /// Refreshes the properties.
        /// </summary>
        public void RefreshProperties()
        {
            if (this.IsOnline)
            {
                try
                {
                    this.Properties.Clear();

                    var receiver = new GetPropReceiver();
                    this.ExecuteShellCommand(GetPropReceiver.GetpropCommand, receiver);

                    foreach (var property in receiver.Properties)
                    {
                        this.Properties.Add(property.Key, property.Value);
                    }

                    this.OnBuildInfoChanged(EventArgs.Empty);
                }
                catch (AdbException aex)
                {
                    Log.Warn(LOG_TAG, aex);
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Gets the properties of a device.
 /// </summary>
 /// <param name="device">
 /// The device for which to list the properties.
 /// </param>
 /// <returns>
 /// A dictionary containing the properties of the device, and their values.
 /// </returns>
 public static Dictionary<string, string> GetProperties(this DeviceData device)
 {
     var receiver = new GetPropReceiver();
     AdbClient.Instance.ExecuteRemoteCommand(GetPropReceiver.GetpropCommand, device, receiver);
     return receiver.Properties;
 }
예제 #3
0
파일: Device.cs 프로젝트: vebin/madb
        /// <summary>
        /// Refreshes the properties.
        /// </summary>
        public void RefreshProperties()
        {
            if (this.IsOnline)
            {
                try
                {
                    this.Properties.Clear();

                    var receiver = new GetPropReceiver();
                    this.ExecuteShellCommand(GetPropReceiver.GetpropCommand, receiver);

                    foreach (var property in receiver.Properties)
                    {
                        this.Properties.Add(property.Key, property.Value);
                }

                    this.OnBuildInfoChanged(EventArgs.Empty);
                }
                catch (AdbException aex)
                {
                    Log.w(LOG_TAG, aex);
                }
            }
        }