Ejemplo n.º 1
0
 void newshipmentForm_Closed(object sender, EventArgs e)
 {
     shipmentForm = null;
 }
Ejemplo n.º 2
0
        private void BtnShipment_Click(object sender, RoutedEventArgs e)
        {
            if (shipmentForm == null || shipmentForm.IsActive)
            {
                shipmentForm = new Shipment();
                shipmentForm.Show();
                //Add a event handler to set null our window object when it will be closed
                shipmentForm.Closed += new EventHandler(newshipmentForm_Closed);
            }
            //If the window was created and your window isn't active
            //we call the method Activate to call the specific window to front
            else
            {

                shipmentForm.Activate();
            }
        }