private DetectedRobotViewModel CreateDetectedRobotViewModel(DetectedRobot robot) { var result = new DetectedRobotViewModel(robot); result.ConnectionRequested += async(_, e) => await _parent.ConnectionPane.ConnectAsync(e.IpAddress, ActivateRequestedSession); return(result); }
internal DetectedRobotViewModel(DetectedRobot robot) { _robot = robot; ItemNameDisplay = _robot.ItemNameDisplay; HostName = _robot.HostName; IpAddress = _robot.IpAddress; IsRealRobot = _robot.IsRealRobot; _robot.PropertyChanged += (_, e) => { if (e.PropertyName == nameof(_robot.IsRealRobot)) { IsRealRobot = _robot.IsRealRobot; } }; }
internal bool HasRobot(DetectedRobot robot) => _robot == robot;