Beispiel #1
0
 private void copy_Click(object sender, EventArgs e)
 {
     if (Overlap != null)
     {
         copiedOverlap = Overlap.Copy();
     }
 }
Beispiel #2
0
        // Spawning
        public Overlap Copy()
        {
            Overlap copy = new Overlap();

            copy.B0b7 = B0b7;
            copy.B1b7 = B1b7;
            copy.B2b5 = B2b5;
            copy.B2b6 = B2b6;
            copy.B2b7 = B2b7;
            copy.X    = X;
            copy.Y    = Y;
            copy.Z    = Z;
            copy.Type = Type;
            return(copy);
        }
Beispiel #3
0
 private void AddNew(Overlap overlap)
 {
     if (Model.FreeOverlapSpace() >= 4)
     {
         this.listBox.Focus();
         if (overlaps.Count < 28)
         {
             if (listBox.Items.Count > 0)
             {
                 overlaps.Insert(Index + 1, overlap);
             }
             else
             {
                 overlaps.Insert(0, overlap);
             }
             int reselect;
             if (listBox.Items.Count > 0)
             {
                 reselect = Index;
             }
             else
             {
                 reselect = -1;
             }
             BuildListBox(reselect);
         }
         else
         {
             MessageBox.Show("Could not insert any more overlaps. The maximum number of overlaps allowed per area is 28.",
                             "LAZY SHELL", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show("Could not insert the field. " + Model.MaximumSpaceExceeded("overlaps"),
                         "LAZY SHELL", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #4
0
 private void duplicate_Click(object sender, EventArgs e)
 {
     AddNew(Overlap.Copy());
 }