Beispiel #1
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            var childForm = new AudioForm
            {
                MdiParent = this,
                Text      = @"Окно " + _childFormNumber++
            };

            childForm.Show();
        }
Beispiel #2
0
        private void OpenFile(object sender, EventArgs e)
        {
            var openFileDialog = new OpenFileDialog
            {
                InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal),
                Filter           = @"Звуковые файлы (*.wav)|*.wav|Все файлы (*.*)|*.*"
            };

            if (openFileDialog.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            string fileName  = openFileDialog.FileName;
            var    childForm = new AudioForm
            {
                MdiParent = this,
                Text      = @"Окно " + _childFormNumber++
            };

            childForm.Show();
        }