public TestControl() { locationChart = new Point[8]; locationChart[0] = new Point(Screen.PrimaryScreen.WorkingArea.X + 10, Screen.PrimaryScreen.WorkingArea.Y + 10); // yourvoice_wave = new WaveViewerForm(); refvoice_wave = new WaveViewerForm(); yourvoice_freq = new MfccChartForm(); refvoice_freq = new MfccChartForm(); locationChart[1] = new Point(locationChart[0].X + yourvoice_freq.Width + 10, locationChart[0].Y); locationChart[2] = new Point(locationChart[0].X, locationChart[0].Y + yourvoice_freq.Height + 10); locationChart[3] = new Point(locationChart[0].X + yourvoice_freq.Width + 10, locationChart[0].Y + yourvoice_freq.Height + 10); yourvoice_mfcc = new MfccChartForm(); refvoice_mfcc = new MfccChartForm(); locationChart[4] = new Point(locationChart[0].X, locationChart[0].Y + 2 * yourvoice_freq.Height + 20); locationChart[5] = new Point(locationChart[0].X + yourvoice_freq.Width + 10, locationChart[0].Y + 2 * yourvoice_freq.Height + 20); yourvoice_detal = new MfccChartForm(); refvoice_detal = new MfccChartForm(); locationChart[6] = new Point(locationChart[0].X, locationChart[0].Y + 2 * yourvoice_freq.Height + 20); locationChart[7] = new Point(locationChart[0].X + yourvoice_freq.Width + 10, locationChart[0].Y + 2 * yourvoice_freq.Height + 20); yourvoice_double = new MfccChartForm(); refvoice_double = new MfccChartForm(); InitializeComponent(); selectShowChart.ShowChartYourWave += DisplayYourWaveChart; selectShowChart.ShowChartYourFreq += DisplayYourFreqChart; selectShowChart.ShowChartYourMfcc += DisplayYourMfccChart; selectShowChart.ShowChartYourDetal += DisplayYourDetalChart; selectShowChart.ShowChartYourDouble += DisplayYourDoubleChart; selectShowChart.ShowChartRefWave += DisplayRefWaveChart; selectShowChart.ShowChartRefFreq += DisplayRefFreqChart; selectShowChart.ShowChartRefMfcc += DisplayRefMfccChart; selectShowChart.ShowChartRefDetal += DisplayRefDetalChart; selectShowChart.ShowChartRefDouble += DisplayRefDoubleChart; mfcc_setting = new MfccOptions(); }
private void SetDataRefWaveChart() { if (refvoice_wave.IsDisposed) { refvoice_wave = new WaveViewerForm(); refvoice_wave.Title = "Your File: " + Path.GetFileName(yourNameFile); if (refmfcc != null && refmfcc.IsValid == (int)State.SUCCESSED) { refvoice_wave.Data = refmfcc.Data; } refvoice_wave.Text = "Wave Chart"; } if (changed_reffile) { if (refvoice_wave != null && refmfcc.IsValid == (int)State.SUCCESSED) { refvoice_wave.Title = "Ref File: " + Path.GetFileName(refNameFile); refvoice_wave.Data = refmfcc.Data; } refvoice_wave.Text = "Wave Chart"; } }
private void SetDataYourWaveChart() { if (yourvoice_wave == null || yourvoice_wave.IsDisposed) { yourvoice_wave = new WaveViewerForm(); yourvoice_wave.Hide(); yourvoice_wave.Title = "Your File: " + Path.GetFileName(yourNameFile); if (yourmfcc != null && yourmfcc.IsValid == (int)State.SUCCESSED) { yourvoice_wave.Data = yourmfcc.Data; } yourvoice_wave.Text = "Wave Chart"; } if (changed_yourfile) { yourvoice_wave.Title = "Your File: " + Path.GetFileName(yourNameFile); if (yourmfcc != null && yourmfcc.IsValid == (int)State.SUCCESSED) { yourvoice_wave.Data = yourmfcc.Data; } yourvoice_wave.Text = "Wave Chart"; } }