コード例 #1
0
        /// <summary>
        /// Create a new child instance of Average Units form and display it
        /// </summary>
        private void ClickNewAverageUnits(object sender, EventArgs e)
        {
            // Get the current instance of the AverageUnits form or create a new one if not there
            formAverageUnitsShippedByEmployee averageUnits = formAverageUnitsShippedByEmployee.Instance;

            // Assign it's MDI parent to be the form this event was called in
            averageUnits.MdiParent = this;

            // Dispaly the form and set it as the focus
            averageUnits.Show();
            averageUnits.Focus();
        }
コード例 #2
0
 /// <summary>
 /// When the form is closed release the instance.
 /// </summary>
 private void AverageUnitsFormClosed(object sender, FormClosedEventArgs e)
 {
     instance = null;
 }