private void AddListViewItem(MatrixPort port, ATMLListControl listView)
        {
            ListViewItem lvi = new ListViewItem(port.name);

            lvi.SubItems.Add(port.Description);
            lvi.SubItems.Add(port.baseIndexSpecified ? "" + port.baseIndex : "");
            lvi.SubItems.Add(port.countSpecified ? "" + port.count : "");
            lvi.SubItems.Add(port.incrementBySpecified ? "" + port.incrementBy : "");
            lvi.SubItems.Add(port.replacementCharacter);
            lvi.Tag = port;
            listView.Items.Add(lvi);
        }
 private void DeleteMatrixPort(lists.ATMLListControl listView)
 {
     if (listView.SelectedItems.Count > 0)
     {
         MatrixPort port   = (MatrixPort)listView.SelectedItems[0].Tag;
         String     prompt = String.Format(MessageManager.getMessage("Generic.delete.prompt"), "matrix port", port.name);
         String     title  = MessageManager.getMessage("Generic.title.verification");
         if (DialogResult.Yes == MessageBox.Show(prompt,
                                                 title,
                                                 MessageBoxButtons.YesNo,
                                                 MessageBoxIcon.Question))
         {
             listView.SelectedItems[0].Remove();
         }
     }
 }
        private void AddMatrixPort(lists.ATMLListControl listView)
        {
            MatrixPortForm form = new MatrixPortForm();

            form.MatrixPort = new MatrixPort();
            if (DialogResult.OK == form.ShowDialog())
            {
                MatrixPort   port = form.MatrixPort;
                ListViewItem lvi  = new ListViewItem(port.name);
                lvi.SubItems.Add(port.Description);
                lvi.SubItems.Add(port.baseIndexSpecified ? "" + port.baseIndex : "");
                lvi.SubItems.Add(port.countSpecified ? "" + port.count : "");
                lvi.SubItems.Add(port.incrementBySpecified ? "" + port.incrementBy : "");
                lvi.SubItems.Add(port.replacementCharacter);
                lvi.Tag = port;
                listView.Items.Add(lvi);
            }
        }
 private void EditMatrixPort(lists.ATMLListControl listView)
 {
     if (lvColumns.SelectedItems.Count > 0)
     {
         ListViewItem   lvi  = listView.SelectedItems[0];
         MatrixPortForm form = new MatrixPortForm();
         form.MatrixPort = (MatrixPort)lvi.Tag;
         if (DialogResult.OK == form.ShowDialog())
         {
             MatrixPort port = form.MatrixPort;
             lvi.SubItems[0].Text = port.name;
             lvi.SubItems[1].Text = port.Description;
             lvi.SubItems[2].Text = port.baseIndexSpecified ? "" + port.baseIndex : "";
             lvi.SubItems[3].Text = port.countSpecified ? "" + port.count : "";
             lvi.SubItems[4].Text = port.incrementBySpecified ? "" + port.incrementBy : "";
             lvi.SubItems[5].Text = port.replacementCharacter;
             lvi.Tag = port;
         }
     }
 }
 private void ControlsToData()
 {
     port = base.RepeatedItem as MatrixPort;
 }