public void Populate(IEditorData data) { m_data = data; m_parentScript = data as ScriptCommandEditorData; if (data == null) { Populate((IEditableScripts)null); return; } m_helper.StartPopulating(); m_readOnly = data.ReadOnly; Populate(m_helper.Populate(data)); cmdAddScript.Visibility = (m_helper.CanEdit(data) && !m_readOnly) ? Visibility.Visible : Visibility.Collapsed; m_helper.FinishedPopulating(); }
public void Populate(IEditorData data) { m_data = data; m_parentScript = data as ScriptCommandEditorData; if (data == null) { Populate((IEditableScripts)null); return; } m_helper.StartPopulating(); m_readOnly = data.ReadOnly; Populate(m_helper.Populate(data)); cmdAddScript.Visibility = (m_helper.CanEdit(data) && !m_readOnly) ? Visibility.Visible : Visibility.Collapsed; m_helper.FinishedPopulating(); }