/// <summary> /// Opens the file member panel. /// </summary> /// <remarks> /// The base method propagates lookup openers. /// </remarks> internal virtual MemberPanel OpenFileMembers(FarFile file) { //??? _090610_071700, + $panel.SetOpen({ @ Test-Panel-Tree-.ps1 object target = file.Data == null ? file : file.Data; MemberPanel panel = new MemberPanel(new MemberExplorer(target)); panel._LookupOpeners = _LookupOpeners; var tablePanel = Far.Api.Panel as TablePanel; if (tablePanel != null) { if (!string.IsNullOrEmpty(tablePanel.ExcludeMemberPattern)) { panel.Explorer.ExcludeMemberPattern = tablePanel.ExcludeMemberPattern; } if (!string.IsNullOrEmpty(tablePanel.HideMemberPattern)) { panel.Explorer.HideMemberPattern = tablePanel.HideMemberPattern; } } //! use null as parent: this panel can be not open now panel.OpenChild(null); return(panel); }
internal override MemberPanel OpenFileMembers(FarFile file) { if (!(file.Data is PSPropertyInfo pi)) { return(null); } if (pi.Value == null) { return(null); } MemberPanel r = new MemberPanel(new MemberExplorer(pi.Value)); r.OpenChild(this); return(r); }
/// <summary> /// Opens <see cref="MemberPanel"/> for a file. /// File <c>Data</c> must not be null. /// </summary> internal override MemberPanel OpenFileMembers(FarFile file) { // get data TreeFile t = (TreeFile)file; if (t.Data == null) { return(null); } //! use null as parent: this panel can be not open now MemberPanel r = new MemberPanel(new MemberExplorer(t.Data)); r.OpenChild(null); return(r); }
internal override MemberPanel OpenFileMembers(FarFile file) { PSObject o = PSObject.AsPSObject(file.Data); string memberType = o.Properties["MemberType"].Value.ToString(); if (!memberType.EndsWith("Property", StringComparison.Ordinal)) //?? { return(null); } string name = o.Properties[Word.Name].Value.ToString(); object instance = Target.Properties[name].Value; if (instance == null) { return(null); } MemberPanel r = new MemberPanel(new MemberExplorer(instance)); r.OpenChild(this); return(r); }
internal override MemberPanel OpenFileMembers(FarFile file) { PSObject o = PSObject.AsPSObject(file.Data); string memberType = o.Properties["MemberType"].Value.ToString(); if (!memberType.EndsWith("Property", StringComparison.Ordinal)) //?? return null; string name = o.Properties[Word.Name].Value.ToString(); object instance = Target.Properties[name].Value; if (instance == null) return null; MemberPanel r = new MemberPanel(new MemberExplorer(instance)); r.OpenChild(this); return r; }
/// <summary> /// Opens <see cref="MemberPanel"/> for a file. /// File <c>Data</c> must not be null. /// </summary> internal override MemberPanel OpenFileMembers(FarFile file) { // get data TreeFile t = (TreeFile)file; if (t.Data == null) return null; //! use null as parent: this panel can be not open now MemberPanel r = new MemberPanel(new MemberExplorer(t.Data)); r.OpenChild(null); return r; }
/// <summary> /// Opens the file member panel. /// </summary> /// <remarks> /// The base method propagates lookup openers. /// </remarks> internal virtual MemberPanel OpenFileMembers(FarFile file) { //??? _090610_071700, + $panel.SetOpen({ @ Test-Panel-Tree-.ps1 object target = file.Data == null ? file : file.Data; MemberPanel panel = new MemberPanel(new MemberExplorer(target)); panel._LookupOpeners = _LookupOpeners; var tablePanel = Far.Api.Panel as TablePanel; if (tablePanel != null) { if (!string.IsNullOrEmpty(tablePanel.ExcludeMemberPattern)) panel.Explorer.ExcludeMemberPattern = tablePanel.ExcludeMemberPattern; if (!string.IsNullOrEmpty(tablePanel.HideMemberPattern)) panel.Explorer.HideMemberPattern = tablePanel.HideMemberPattern; } //! use null as parent: this panel can be not open now panel.OpenChild(null); return panel; }
internal override MemberPanel OpenFileMembers(FarFile file) { PSPropertyInfo pi = file.Data as PSPropertyInfo; if (pi == null) return null; if (pi.Value == null) return null; MemberPanel r = new MemberPanel(new MemberExplorer(pi.Value)); r.OpenChild(this); return r; }