Example #1
0
 private void uxAddAddress_Click(object sender, EventArgs e)
 {
     string[] s = MemoryEntryForm.ShowNew();
     if (s != null)
     {
         uxMemoryList.Items.Add(new ListViewItem(s));
     }
 }
Example #2
0
 public static string[] ShowNew()
 {
     newMemory = new MemoryEntryForm();
     newMemory.Text = "New memory address";
     newMemory.uxAdd.Text = "Add";
     newMemory.uxType.SelectedIndex = 1;
     s = null;
     newMemory.ShowDialog();
     return s;
 }
 public static string[] ShowNew()
 {
     newMemory                      = new MemoryEntryForm();
     newMemory.Text                 = "New memory address";
     newMemory.uxAdd.Text           = "Add";
     newMemory.uxType.SelectedIndex = 1;
     s = null;
     newMemory.ShowDialog();
     return(s);
 }
Example #4
0
 public static string[] ShowEdit(string[] data)
 {
     newMemory = new MemoryEntryForm();
     newMemory.Text = "Edit memory address";
     newMemory.uxAdd.Text = "Edit";
     newMemory.uxDescription.Text = data[0];
     newMemory.uxAddress.Text = data[1];
     newMemory.uxType.SelectedIndex = newMemory.uxType.Items.IndexOf(data[3]);
     newMemory.ShowDialog();
     return s;
 }
 public static string[] ShowEdit(string[] data)
 {
     newMemory                      = new MemoryEntryForm();
     newMemory.Text                 = "Edit memory address";
     newMemory.uxAdd.Text           = "Edit";
     newMemory.uxDescription.Text   = data[0];
     newMemory.uxAddress.Text       = data[1];
     newMemory.uxType.SelectedIndex = newMemory.uxType.Items.IndexOf(data[3]);
     newMemory.ShowDialog();
     return(s);
 }
Example #6
0
 private void uxMemoryEdit_Click(object sender, EventArgs e)
 {
     if (uxMemoryList.SelectedIndices.Count > 0)
     {
         int      index = uxMemoryList.SelectedIndices[0];
         string[] s     = MemoryEntryForm.ShowEdit(new string[] {
             uxMemoryList.Items[index].SubItems[0].Text,
             uxMemoryList.Items[index].SubItems[1].Text,
             uxMemoryList.Items[index].SubItems[2].Text,
             uxMemoryList.Items[index].SubItems[3].Text
         });
         if (s != null)
         {
             uxMemoryList.Items[index] = new ListViewItem(s);
         }
     }
 }