InitializeSettings() 공개 메소드

public InitializeSettings ( ConnectionSettings connectionSettings ) : System.Threading.Tasks.Task
connectionSettings ConnectionSettings
리턴 System.Threading.Tasks.Task
예제 #1
0
        private async void OnSelectDevice(DeviceNode deviceNode)
        {
            lock (locker) // make sure we don't create multiple device connections by a trigger happy user
            {
                if (DeviceConnection != null)
                {
                    return;
                }
            }

            var device = await ftManager.OpenByDeviceId(deviceNode.Id);

            DeviceConnection newConnection;

            lock (locker) // make sure we don't create multiple device connections by a trigger happy user
            {
                if (DeviceConnection != null)
                {
                    return;
                }
                newConnection    = new DeviceConnection(deviceNode, device);
                DeviceConnection = newConnection;
            }

            var defaultSettings = DeviceConnection.DefaultSettings;
            await newConnection.InitializeSettings(defaultSettings);
        }
예제 #2
0
        private async void OnSelectDevice(DeviceNode deviceNode)
        {
            DeviceConnection newConnection;
            lock (locker) // make sure we don't create multiple device connections by a trigger happy user
            {
                if (DeviceConnection != null)
                    return;

                var device = ftManager.OpenByDeviceID(deviceNode.DeviceId);
                newConnection = new DeviceConnection(deviceNode, device);
                DeviceConnection = newConnection;
            }

            var defaultSettings = DeviceConnection.DefaultSettings;
            await newConnection.InitializeSettings(defaultSettings);
        }