Exemplo n.º 1
0
        private void createChildWindow(string path = null)
        {
            WaveFile wave;
            WaveForm baby;

            if (path == null)
            {
                wave = new WaveFile();
                baby = new WaveForm(this, wave);
                baby.updateReport("New sine waves generated.");
            }
            else
            {
                try {
                    wave = new WaveFile(path);
                    baby = new WaveForm(this, wave);
                    baby.updateReport(wave.getName() + " opened successfully!");
                } catch (Exception e) {
                    MessageBox.Show("Opening Failed: " + e.Message);
                    return;
                }
            }

            children.Add(baby);
            activeChild = baby;
            baby.Show();
            updateWindowMenu();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor:  can only create a WaveForm with a WaveFile supplied.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="wave"></param>
        public WaveForm(Mixer parent, WaveFile wave)
        {
            this.wave   = wave;
            this.parent = parent;
            InitializeComponent();
            panelFourier.setBottomMargin(statusBar.Height);
            this.Text = wave.getName();

            updateStatusBar();
            calculateDFT();
            panelWave.setSamples(wave.samples);
            panelFourier.SampleRate = wave.sampleRate;
        }
Exemplo n.º 3
0
 public void setPath(String path)
 {
     wave.setPath(path);
     this.Text = wave.getName();
 }
Exemplo n.º 4
0
        private void createChildWindow(string path = null)
        {
            WaveFile wave;
            WaveForm baby;
            if (path == null) {
                wave = new WaveFile();
                baby = new WaveForm(this, wave);
                baby.updateReport("New sine waves generated.");
            } else {
                try {
                    wave = new WaveFile(path);
                    baby = new WaveForm(this, wave);
                    baby.updateReport(wave.getName()+" opened successfully!");
                } catch (Exception e) {
                    MessageBox.Show("Opening Failed: " + e.Message);
                    return;
                }
            }

            children.Add(baby);
            activeChild = baby;
            baby.Show();
            updateWindowMenu();
        }