Beispiel #1
0
 public virtual void AddSublayer(InspectView sublayer)
 {
     if (sublayers == null)
     {
         sublayers = new List <InspectView> ();
     }
     sublayer.Parent = this;
     sublayers.Add(sublayer);
 }
Beispiel #2
0
 public virtual void AddSubview(InspectView subview)
 {
     if (subviews == null)
     {
         subviews = new List <InspectView> ();
     }
     subview.Parent = this;
     subviews.Add(subview);
 }
        public async Task SetSelectedViewAsync(XIR.InspectView view)
        {
            if (!Session.Agent.IsConnected)
            {
                return;
            }

            if (string.IsNullOrEmpty(view?.PublicType))
            {
                return;
            }

            var remoteProperty = await Session.Agent.Api.GetObjectMembersAsync(view.Handle);

            propertyEditor.SelectedItems.Clear();
            propertyEditor.SelectedItems.Add(remoteProperty);
        }
        public async Task SetSelectedViewAsync(XIR.InspectView view)
        {
            if (!Session.Agent.IsConnected)
            {
                return;
            }

            if (string.IsNullOrEmpty(view?.PublicType))
            {
                return;
            }

            var remoteProperty = await Session.Agent.Api.GetObjectMembersAsync(view.Handle);

            propertyEditor.SelectedItems.Clear();
            propertyEditor.SelectedItems.Add(remoteProperty);

            if (!string.IsNullOrEmpty(view?.PublicCSharpType) &&
                Session.SessionKind == ClientSessionKind.LiveInspection)
            {
                await Session.EvaluationService.EvaluateAsync(
                    $"var selectedView = GetObject<{view.PublicCSharpType}> (0x{view.Handle:x})");
            }
        }