コード例 #1
0
ファイル: MainWindow.cs プロジェクト: jsj2008/gui-vm
        private void hardDriveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (hardDrivePeripheralForm == null)
            {
                hardDrivePeripheralForm = new HardDrivePeripheralForm();

                // Set the parent form of the child window.
                hardDrivePeripheralForm.MdiParent = this;
                // Display the new form.
                hardDrivePeripheralForm.Text = "Hard Drive";

                hardDrivePeripheralForm.FormClosing += Close_FormHD;
            }

            hardDrivePeripheralForm.Show();
        }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: jsj2008/gui-vm
 public void Close_FormHD(object sender, EventArgs e)
 {
     hardDrivePeripheralForm.Stop_Thread();
     hardDrivePeripheralForm = null;
 }