Example #1
0
        private void ButtonAsn1_Click(object sender, EventArgs e)
        {
            ListViewItem selectedItem = WinFormsUtils.GetSingleSelectedItem(ListViewAttributes);

            if (selectedItem == null)
            {
                return;
            }

            ObjectAttribute objectAttribute = (ObjectAttribute)selectedItem.Tag;

            string attributeName = selectedItem.Text;

            byte[] attributeValue = (objectAttribute.CannotBeRead) ? new byte[0] : objectAttribute.GetValueAsByteArray();

            using (Asn1Viewer asn1Viewer = new Asn1Viewer(attributeName, attributeValue))
                asn1Viewer.ShowDialog();
        }
Example #2
0
        private void ViewAsn1AttributeValue()
        {
            ListView activeListView = GetActiveListView();

            ListViewItem selectedItem = WinFormsUtils.GetSingleSelectedItem(activeListView);

            if (selectedItem == null)
            {
                return;
            }

            ObjectAttribute objectAttribute = (ObjectAttribute)selectedItem.Tag;

            string attributeName = selectedItem.Text;

            byte[] attributeValue = (objectAttribute.CannotBeRead) ? new byte[0] : objectAttribute.GetValueAsByteArray();

            using (Asn1Viewer asn1Viewer = new Asn1Viewer(attributeName, attributeValue))
                asn1Viewer.ShowDialog();
        }